The OpenD Programming Language

FontRegistry

FontRegistry register partial font information for all fonts from the system directories, plus the ones added by the user. Aggregates all fonts by family, a bit like a browser or Word does. This allows to get one particular physical font with just a family name, an approximate weight etc. Without such font-matching, it's impractical and you need to give explicit ttf files manually.

Constructors

this
this()

Create a font registry, parsing every available fonts.

Members

Functions

findBestMatchingFont
OpenTypeFont findBestMatchingFont(string familyName, OpenTypeFontWeight weight, OpenTypeFontStyle style)
registerFontFile
void registerFontFile(string pathToTrueTypeFontFile)

Add a font file to parse. Registers every font within that file. Important: the file must outlive the FontRegistry itself.

Meta