Class GlyphOutlines

java.lang.Object
org.scilab.forge.jlatexmath.GlyphOutlines

public final class GlyphOutlines extends Object
The outlines of the glyphs of the TeX fonts, read from a glyphs.bin file made by tools/jlatexmath-glyphs/GenerateGlyphOutlines.java (the format is described there).

No dependency on java.awt, javax.* or reflection: the same code runs on the JVM and in the TeaVM builds, and gives the same numbers everywhere. A glyph is given to a GlyphOutlines.Sink as a sequence of absolute points, in font units, y axis up.

  • Method Details

    • getFontNames

      public Set<String> getFontNames()
      The names of the fonts of this file (TTF file names without ".ttf").
    • getFont

      public GlyphOutlines.GlyphFont getFont(String ttfName)
      The font of a TTF file name, with or without ".ttf", or null.
    • forBase

      public static GlyphOutlines forBase(Object base)
      The outlines that go with the fonts of a registration object: the file fonts/glyphs.bin of the package of its class. base is null for the base fonts, the registration object for an alphabet (Cyrillic, Greek), as in FontInfo.

      Read on the first use only, nothing is parsed by a diagram without math.

    • parse

      public static GlyphOutlines parse(byte[] data)
      Parses the content of a glyphs.bin file: finds the glyphs, decodes none.