doc/svghmi/fonts.rst
author Edouard Tisserant <edouard@beremiz.fr>
Tue, 23 Jul 2024 17:05:59 +0200
changeset 3999 1479acf750e2
parent 3936 129202e555e0
permissions -rw-r--r--
MQTT: WIP fix modified status not being set when adding and modifying topics or attributes.

Fix loading of CSV that was not applying model types, and that not checking conformance either.
3925
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
Include fonts in HMI
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
====================
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
3936
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
     4
Text inside HMI designed with Inkscape may not display properly in web browser.
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
     5
The reason is that Inkscape and targeted web browser may disagree on fonts support.
3925
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
3936
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
     7
To keep HMI text design consistent, missing fonts can be added to project in order
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
     8
to have them served together with HMI so that web browser can support them.
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
     9
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    10
Fonts used by Inkscape
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    11
----------------------
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    12
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    13
* System fonts
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    14
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    15
    Vector fonts available at system level are systematically available
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    16
    in Inkscape
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    17
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    18
* User fonts
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    19
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    20
    When selected in Inkscape preferences, Inkscape also considers fonts
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    21
    from these sources:
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    22
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    23
    - "fonts" directory in Inkscape user's directory
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    24
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    25
    - arbitrary absolute font directories set by user 
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    26
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    27
    There is no way to point to a directory relative to the SVG file
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    28
    being edited.
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    29
    At the time of writing this documentation, Inkscape doesn't support
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    30
    embedding font in SVG file.
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    31
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    32
    User then have to regularly update Inkscape preferences to ensure
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    33
    that fonts used in currently edited design are available when editing
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    34
    it.
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    35
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    36
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    37
Supported font types in SVGHMI
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    38
------------------------------
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    39
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    40
    * Web Open Font Format 1 and 2
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    41
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    42
        ``.woff```, ``.woff2``
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    43
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    44
    * TrueType fonts
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    45
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    46
        ``.ttf``
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    47
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    48
    * OpenType fonts
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    49
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    50
        ``.otf``
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    51
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    52
    .. note:: 
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    53
129202e555e0 More documentation. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 3925
diff changeset
    54
        In order to be embedded in HMI, fonts are encoded base64 
3925
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
Add/remove fonts
1d383b4c0a23 Doc: re-organize existing, sketch outline, add SVGHMI intro.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    57
----------------