示例#1
0
        bool GotoTable(uint tag)
        {
            Table t;

            if (Tables.TryGetValue(tag, out t))
            {
                Ix      = t.Offset;
                IxLimit = t.Offset + t.Length;
                return(true);
            }
            return(false);
        }
示例#2
0
        bool KeepInstructions = false;                                              // Are font instructions retained ( not implemented, would need additional tables to be copied to PDF ).

        int XG(int gi)                                                              // Translates a glyph index to the subset value.
        {
            if (gi < 0)
            {
                return(gi);
            }
            int x; if (!Xlat.TryGetValue(gi, out x))

            {
                x = GList.Count; Xlat[gi] = x; GList.Add(gi);
            }

            return(x);
        }
示例#3
0
        int Index(int c) // Get the glyph index for a unicode point, checks Lookup cache first.
        {
            int gi;

            if (!Lookup.TryGetValue(c, out gi))
            {
                gi = Inp.FindGlyph(c);
                if (gi < 0)
                {
                    return(gi);
                }
                Lookup[c] = gi; // cache result to avoid repeated calls to Inp.FindGlyph
            }
            return(gi);
        }