Package com.google.typography.font.sfntly.table.core

Examples of com.google.typography.font.sfntly.table.core.HorizontalMetricsTable


  public Glyph getGlyph(char ch) {
    int glyphIndex = lookupGlyphIndex(ch);
    com.google.typography.font.sfntly.table.truetype.Glyph glyph = getGlyph(glyphIndex);

   
      HorizontalMetricsTable hmtx = font.getTable(Tag.hmtx);
     
      double width = toPixels(glyph.xMax() - glyph.xMin());
      double height = toPixels(glyph.yMax() - glyph.yMin());
      double advance = toPixels(hmtx.advanceWidth(glyphIndex));
     
      SfntlyGlyph sfntlyGlyph = new SfntlyGlyph(advance, width, height, glyph);
      sfntlyGlyph.setScale(size / unitsPerEm);
      sfntlyGlyph.setYBounds(yMin, yMax);
      sfntlyGlyph.setFontSize(size);
View Full Code Here

TOP

Related Classes of com.google.typography.font.sfntly.table.core.HorizontalMetricsTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.