static public glyph_base GetGlyphLogicalData(Table_glyf.header h) { glyph_base gb = null; SimpleGlyph sg = h.GetSimpleGlyph(); if (sg != null) { // glyph is a simple glyph gb = GetSimpleGlyphLogicalData(h); } else { CompositeGlyph cg = h.GetCompositeGlyph(); if (cg != null) { // glyph is a composite glyph gb = GetCompositeGlyphLogicalData(h); } } return(gb); }
// constructor public glyf_cache(Table_glyf OwnerTable, OTFont OwnerFont) { m_arrGlyphs = new ArrayList(); // get each glyph from the glyf table for (uint iGlyph = 0; iGlyph < OwnerFont.GetMaxpNumGlyphs(); iGlyph++) { header h = OwnerTable.GetGlyphHeader(iGlyph, OwnerFont); if (h == null) { m_arrGlyphs.Add(null); } else { glyph_base gb = GetGlyphLogicalData(h); m_arrGlyphs.Add(gb); } } }