Maven module :un.api : api-display :
Class : un.engine.painter2d.Font
Extends/Implements : -
Subclasses : -

A Font holds a description of a text glyphs including
size, weight and family.
author  Johann Sorel


Variables : WEIGHT_NONE, WEIGHT_BOLD, DECORATION_NON, DECORATION_UNDERLINE, DECORATION_OVERLINE, DECORATION_LINE_THROUGHT, DECORATION_BLINK
Functions : Font, getFamilies, getSize, getWeight, getMetadata, getGlyph, getGlyph, getGlyphToSizeMatrix, calculateOffset


public int WEIGHT_NONE

public int WEIGHT_BOLD



public int DECORATION_NON

public int DECORATION_UNDERLINE

public int DECORATION_OVERLINE

public int DECORATION_LINE_THROUGHT

public int DECORATION_BLINK



param  families, font family by preference order.
param  size font size
param  weight font weight
public void Font (Chars[] families, float size, int weight)

public Chars[] getFamilies ()

public float getSize ()

public int getWeight ()

public FontMetadata getMetadata ()

public Geometry2D getGlyph (int unicode)

public Geometry2D getGlyph (Char character)


Matrix used to scale font glyph to expected size.
return  Matrix3
public Matrix getGlyphToSizeMatrix ()


Calculate the character X offset in given char array.
param  font
param  text
param  index
return
public double calculateOffset (Font font, CharArray text, int index)