public int getEndPtOfContours(int i) { GlyfCompositeComp c = getCompositeCompEndPt(i); if (c != null) { GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); return gd.getEndPtOfContours(i - c.getFirstContour()) + c.getFirstIndex(); } return 0; }
public byte getFlags(int i) { GlyfCompositeComp c = getCompositeComp(i); if (c != null) { GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); return gd.getFlags(i - c.getFirstIndex()); } return 0; }
public int getPointCount() { GlyfCompositeComp c = _components.get(_components.size() - 1); GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); if (gd != null) { return c.getFirstIndex() + gd.getPointCount(); } else { return 0; } }
protected GlyfCompositeComp getCompositeCompEndPt(int i) { GlyfCompositeComp c; for (int j = 0; j < _components.size(); j++) { c = _components.get(j); GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); if (c.getFirstContour() <= i && i < (c.getFirstContour() + gd.getContourCount())) { return c; } } return null; }
protected GlyfCompositeComp getCompositeComp(int i) { GlyfCompositeComp c; for (int n = 0; n < _components.size(); n++) { c = _components.get(n); GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); if (c.getFirstIndex() <= i && i < (c.getFirstIndex() + gd.getPointCount())) { return c; } } return null; }
public short getYCoordinate(int i) { GlyfCompositeComp c = getCompositeComp(i); if (c != null) { GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); int n = i - c.getFirstIndex(); int x = gd.getXCoordinate(n); int y = gd.getYCoordinate(n); short y1 = (short) c.scaleY(x, y); y1 += c.getYTranslate(); return y1; } return 0; }