Skip to content

v0.9.0

Choose a tag to compare

@kenshaw kenshaw released this 15 Nov 10:57
· 18 commits to main since this release

This release exports the loading of the system fonts of the renderer (D46).

go get github.com/xo/okage@v0.9.0

The fonts of the system

svg.FontDatabase.LoadOSFonts() loads the fonts of the system and of the home directory into a database. It calls LoadSystemFonts with the root of the file system and LoadUserFonts with the home directory that os.UserHomeDir gives. On Windows, the root is the volume of %WINDIR%.

The Renderer now calls LoadOSFonts to load its fonts. A program that shapes text with its own database, beside a Renderer, loads the same fonts as the renderer. LoadOSFonts does not set the generic families. The Renderer still sets them.