TinyLine
v2.0

com.tinyline.tiny2d
Class TinyFont

java.lang.Object
  extended bycom.tinyline.tiny2d.TinyFont

public final class TinyFont
extends java.lang.Object

The TinyFont class defines a collection of glyphs together with the information necessary to use those glyphs.

The TinyFont includes the information necessary to map characters to glyphs, to determine the size of glyph areas and to position the glyph area.

The characteristics and attributes of TinyFont correspond closely to the SVG fonts. Various font metrics, such as advance values and baseline locations, and the glyph outlines themselves, are expressed in units that are relative to an abstract square whose height is the intended distance between lines of type in the same type size.

This square is called the EM square and it is the design grid on which the glyph outlines are defined. The value of the units-per-em attribute on the TinyFont specifies how many units the EM square is divided into. Common values are, for example, 1000 (Type 1) and 2048 (TrueType, TrueType GX and Open-Type).

The design grid for TinyFont fonts, along with the initial coordinate system for the glyphs, has the y-axis pointing upward for consistency with accepted industry practice for many popular font formats.

Version:
2.0

Author:
Andrew Girow

Field Summary
 int ascent
          The maximum unaccented height of the TinyFont within the font coordinate system.
 int baseline
          The lower baseline of the TinyFont.
 int descent
          The maximum unaccented depth of the TinyFont within the font coordinate system.
 TinyString fontFamily
          The family name of this TinyFont.
 TinyHash glyphs
          The glyph table of this TinyFont.
 int horizAdvX
          The default horizontal advance value of this TinyFont after rendering a glyph in horizontal orientation.
 TinyGlyph missing_glyph
          The missing glyph of this TinyFont.
 int unitsPerEm
          The number of coordinate units on the em square, the size of the design grid on which glyphs are laid out.
 int vertAdvY
          The default vertical advance after rendering a glyph in vertical orientation.
 
Constructor Summary
TinyFont()
          Constructs and initializes a new TinyFont object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

horizAdvX

public int horizAdvX
The default horizontal advance value of this TinyFont after rendering a glyph in horizontal orientation. Glyph widths are required to be non-negative.


vertAdvY

public int vertAdvY
The default vertical advance after rendering a glyph in vertical orientation.


fontFamily

public TinyString fontFamily
The family name of this TinyFont.


unitsPerEm

public int unitsPerEm
The number of coordinate units on the em square, the size of the design grid on which glyphs are laid out. The default value is 2048.


ascent

public int ascent
The maximum unaccented height of the TinyFont within the font coordinate system.


descent

public int descent
The maximum unaccented depth of the TinyFont within the font coordinate system.


baseline

public int baseline
The lower baseline of the TinyFont.


glyphs

public TinyHash glyphs
The glyph table of this TinyFont.


missing_glyph

public TinyGlyph missing_glyph
The missing glyph of this TinyFont.

Constructor Detail

TinyFont

public TinyFont()
Constructs and initializes a new TinyFont object.


TinyLine
v2.0

Provided under the terms of the TinyLine License Agreement that has been included with this distribution