|
NovaSVG 0.11.5
An SVG library
|
Classes | |
| class | box |
| Represents a 2D axis-aligned bounding box. More... | |
Functions | |
| int | add_font_file (const std::string &path) |
| Registers every face in a font file with the font cache that text rendering and measure_text() use. | |
| void | set_system_fonts_enabled (bool enabled) |
| Whether the fonts installed on the machine are used for text. They are by default. | |
| bool | system_fonts_enabled () |
| The setting of set_system_fonts_enabled(). | |
| int nova::vg::add_font_file | ( | const std::string & | path | ) |
Registers every face in a font file with the font cache that text rendering and measure_text() use.
Each face is filed under the family name, weight range and italic flag the font itself declares, so there is nothing to pass but the path. A variable font is registered with the weight range of its wght axis.
| path | A font file (a .ttc collection registers all its faces). |
References NOVA_API.
| void nova::vg::set_system_fonts_enabled | ( | bool | enabled | ) |
Whether the fonts installed on the machine are used for text. They are by default.
Fonts you added yourself (add_font_file(), @font-face) are always used, and so are the fonts built into the library, which draw text for a family nothing else provides. With the installed fonts switched off, a document is laid out and drawn the same on every machine, whatever it has installed.
It may be called at any time, from any thread; it takes effect on the next lookup and can be undone. Switched off before the first text is drawn, the installed fonts are never even read.
| enabled | false to leave the installed fonts out. |
References NOVA_API.
| bool nova::vg::system_fonts_enabled | ( | ) |
The setting of set_system_fonts_enabled().
References NOVA_API.