Derives ascent and descent data for the font face. Since the computation is based on the available glyphs and not all of the font's glyphs might be included in the font face, the ascent/descent might be off (based on minimum y-offset).
Font face to find ascent and/or descent for (if missing).
Suggested size of the font face as read from the font file. Note that the actual size of the font face is determined by the sum of ascent and descent (which should equal the font files info size).
Asynchronously loads a fnt-file and referenced pages to create a font face from them.
Font face object to transform data into.
Font face data, probably fetched from an URL.
Uniform resource locator string referencing the fnt-file that was loaded.
Whether or not to enable headless mode. If enabled, pages are not loaded.
Parses the char fields for character id (code point), x, y, width, height, xoffset, yoffset, xadvance to store them in the font face as instances of Glyph. This relies on fontFace.base and fontFace.glyphTextureExtent, so execute processCommon() first.
The stream of the 'char' identifier.
The font face in which the loaded glyph texture is stored.
Parses the common fields for lineHeight, base, ascent, descent, scaleW and scaleH to store them in the font face. If ascent and/or descent are not available, they can be computed using the largest y-offset (ascent = baseline - max_yoffset) and descent can be derived as well (descent = - fontsize + ascent).
The stream of the 'common' identifier.
The font face in which the parsed values are stored.
Parses the info fields for padding values and stores them in the font face
The stream of the 'info' identifier.
The font face in which the padding is stored.
Parses the kerning fields for first and second character and the amount, to store them in the font face.
The stream of the 'kerning' identifier.
The font face in which the kerning tuples are stored.
Parses a page to load the associated png-file, i.e., the glyph atlas.
The stream of the 'page' identifier.
The font face in which the loaded glyph texture is stored.
Uniform resource locator string referencing the fnt-file (used for base path retrieval).
Parses to find key-value pairs for given mandatory keys.
The stream from which the pairs should be read.
The found pairs are only valid if the mandatory keys are found.
Transforms input raw data of a text-based font file to a font face (@see FontFace) specification. All referenced pages/glyph atlases will be loaded and setup as well. This is intended to be used directly by the FontFace and is not required to be exposed to webgl-operates public API.