Exemple #1
0
        public int GetGlyphWidthByUcs(int ucs)
        {
            int  width = 0;
            bool success;

            success = glyphWidths.TryGetValue(ucs, out width);

            if (success)
            {
                return(width);
            }

            PGFGlyph glyph = font.GetGlyphByUcs(ucs);

            if (glyph == null)
            {
                return(DEFAULT_SPACE_SIZE);
            }

            width = glyph.width;

            glyphWidths[ucs] = width;

            return(width);
        }
Exemple #2
0
        public void ChangeSpaceSize(int newSize)
        {
            PGFGlyph space = font.GetGlyphByIndex(0x20);

            space.width = newSize;
            space.SaveGylph();

            font.SaveFont(fontDestination);
        }