Font2dDesc

lumin.glyph. Font2dDesc

Object that can be used to create a BitmapFontResource object.

Constructor

new Font2dDesc(advanceDir, flowDir, tileSize, qualityopt, minAlphaopt)

Parameters:
Name Type Attributes Default Description
advanceDir lumin.glyph.AdvanceDirection
flowDir lumin.text.FlowDirection
tileSize number
quality lumin.glyph.Quality <optional>
Quality.kStd
minAlpha number <optional>
0.15

Members

advanceDirection :lumin.glyph.AdvanceDirection

Direction to the next glyph along the baseline.

Type:

(static, constant) DEFAULT :lumin.glyph.Font2dDesc

Type:

flowDirection :lumin.text.FlowDirection

Direction from one line of text to the next.

Type:

minAlphaToDiscard :number

Control the minimum alpha value rendered in each glyph of the
font. Values above 0.2 will cause aliasing to display around
the edges of some fonts. Depending on the use case, however,
this may be acceptable in return for improved blending of
overlapping letters (e.g., as is the norm in a cursive font).
Values much below 0.1, however, can lead to visible edges
from overlapping glyphs in the rendered text.

Type:
  • number

quality :lumin.glyph.Quality

Control the quality of the rendered text. Note kStd
does not require glyph pre-processing of fonts. The other
quality levels require the font file to be pre-processed
(e.g., with the "prefont" tool; see /tools/prefont/).
In that case, the above tileSize field must match that of
the pre-processed resources, or the Font2dResource will
not load correctly.

Type:

tileSize :number

The size of all glyph images are given by this parameter; e.g., 32,
which implies each glyph will occupy a 32x32 region of a glyph sheet.

Type:
  • number