private boolean buildVerticalHeader(COSDictionary cidFont) throws IOException { VerticalHeaderTable vhea = ttf.getVerticalHeader(); if (vhea == null) { LOG.warn("Font to be subset is set to vertical, but has no 'vhea' table"); return false; } float scaling = 1000f / ttf.getHeader().getUnitsPerEm(); long v = Math.round(vhea.getAscender() * scaling); long w1 = Math.round(-vhea.getAdvanceHeightMax() * scaling); if (v != 880 || w1 != -1000) { COSArray cosDw2 = new COSArray(); cosDw2.add(COSInteger.get(v)); cosDw2.add(COSInteger.get(w1)); cidFont.setItem(COSName.DW2, cosDw2); } return true; }
public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException VerticalHeaderTable vHeader = ttf.getVerticalHeader(); numVMetrics = vHeader.getNumberOfVMetrics(); int numGlyphs = ttf.getNumberOfGlyphs();
VerticalHeaderTable vhea = ttf.getVerticalHeader(); VerticalMetricsTable vmtx = ttf.getVerticalMetrics(); GlyphTable glyf = ttf.getGlyph();
private boolean buildVerticalHeader(COSDictionary cidFont) throws IOException { VerticalHeaderTable vhea = ttf.getVerticalHeader(); if (vhea == null) { LOG.warn("Font to be subset is set to vertical, but has no 'vhea' table"); return false; } float scaling = 1000f / ttf.getHeader().getUnitsPerEm(); long v = Math.round(vhea.getAscender() * scaling); long w1 = Math.round(-vhea.getAdvanceHeightMax() * scaling); if (v != 880 || w1 != -1000) { COSArray cosDw2 = new COSArray(); cosDw2.add(COSInteger.get(v)); cosDw2.add(COSInteger.get(w1)); cidFont.setItem(COSName.DW2, cosDw2); } return true; }
VerticalHeaderTable vhea = ttf.getVerticalHeader(); VerticalMetricsTable vmtx = ttf.getVerticalMetrics(); GlyphTable glyf = ttf.getGlyph();
public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException VerticalHeaderTable vHeader = ttf.getVerticalHeader(); numVMetrics = vHeader.getNumberOfVMetrics(); int numGlyphs = ttf.getNumberOfGlyphs();
public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException VerticalHeaderTable vHeader = ttf.getVerticalHeader(); numVMetrics = vHeader.getNumberOfVMetrics(); int numGlyphs = ttf.getNumberOfGlyphs();