The OpenD Programming Language

OpenTypeFont

Parses a font from a font file (which could contain data for several of them).

Members

Functions

ascent
int ascent()
capHeight
int capHeight()
descent
int descent()
familyName
string familyName()
fileData
const(ubyte)[] fileData()
fullFontName
string fullFontName()
getBaselineOffset
float getBaselineOffset(FontBaseline baseline)
glyphForChar
GlyphDesc glyphForChar(dchar ch)

Return the glyph used when a char is requested that the font doesn't provide.

hasGlyphFor
bool hasGlyphFor(dchar ch)

Does this font has a glyph for this codepoint?

horizontalAdvance
int horizontalAdvance(dchar ch)
horizontalAdvanceForGlyph
int horizontalAdvanceForGlyph(int glyphIndex)
isMonospaced
bool isMonospaced()
leftSideBearing
int leftSideBearing(dchar ch)
lineGap
int lineGap()
maxAvailableChar
dchar maxAvailableChar()

maximum Unicode char available in this font

measureText
OpenTypeTextMetrics measureText(const(char)[] text)

Returns text metrics for this piece of text (single line assumed), in glyph units.

numGlyphs
int numGlyphs()
postScriptItalicAngle
float postScriptItalicAngle()
postScriptName
string postScriptName()
style
OpenTypeFontStyle style()
subFamilyName
string subFamilyName()
weight
OpenTypeFontWeight weight()

Meta