Ziafont ======= Ziafont reads TrueType/OpenType font files and draws characters and strings as SVG elements. Unlike the SVG element, the output of Ziafont's SVG will render identically on any system, independent of whether the original font is available. However, the SVG will not be text-searchable, as characters are replaced by curves. Ziafont supports fonts with TrueType glyph outlines contained in a "glyf" table in the font (these fonts typically have a .ttf extensions), or fonts with a "CFF " table (typically with a .otf extension). Kerning adjustment is supported if the font has a "GPOS" table, and ligature substitution is supported if the font has a "GSUB" table. Example ------- .. jupyter-execute:: import ziafont font = ziafont.Font('NotoSerif-Regular.ttf') font.text('Ziafont!') .. jupyter-execute:: s = font.text('Z').svg() print(s[:80]) # Just show 80 characters here... | Installation ------------ Ziafont can be installed using pip: .. code-block:: bash pip install ziafont No dependencies are required. | Demo ---- See Ziafont in action as it runs in your browser through PyScript `here `_! | Support ------- If you appreciate Ziafont, buy me a coffee to show your support! .. raw:: html | Source code is available on `Bitbucket `_. Ziafont is used by the `Ziamath `_ and `Ziaplot `_ Python packages. ---- .. toctree:: :maxdepth: 2 :caption: Contents: strings.rst glyphs.rst api.rst