Interface MapFont.Builder
- Enclosing interface:
MapFont
public static interface MapFont.Builder
Collects the glyphs of a font.
- Since:
- 0.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the font.fallback(MapFont.Glyph fallback) Sets the glyph drawn for missing characters, a hollow box by default.fallbackTo(MapFont font) Copies every glyph of another font that this builder does not have yet, for the characters0-0xFFFF.Adds or replaces a glyph drawn as text, one string per row,#for drawn pixels.glyph(int codePoint, MapFont.Glyph glyph) Adds or replaces a glyph.letterSpacing(int letterSpacing) Sets how many empty columns separate two glyphs,1by default.
-
Method Details
-
glyph
Adds or replaces a glyph.- Parameters:
codePoint- the characterglyph- its pixels- Returns:
- this builder
- Since:
- 0.1.0
-
glyph
Adds or replaces a glyph drawn as text, one string per row,#for drawn pixels.- Parameters:
codePoint- the charactertop- the line row of the first row, seeMapFont.Glyphrows- the rows; the longest gives the width- Returns:
- this builder
- Since:
- 0.1.0
-
fallbackTo
Copies every glyph of another font that this builder does not have yet, for the characters0-0xFFFF.- Parameters:
font- the font- Returns:
- this builder
- Since:
- 0.1.0
-
letterSpacing
Sets how many empty columns separate two glyphs,1by default.- Parameters:
letterSpacing- the spacing, at least0- Returns:
- this builder
- Since:
- 0.1.0
-
fallback
Sets the glyph drawn for missing characters, a hollow box by default.- Parameters:
fallback- the glyph- Returns:
- this builder
- Since:
- 0.1.0
-
build
-