PixelFarm.Drawing.Fonts.NativeFontFace.ReloadGlyphFromIndex C# (CSharp) Method

ReloadGlyphFromIndex() private method

private ReloadGlyphFromIndex ( uint glyphIndex, int pixelSize ) : FontGlyph
glyphIndex uint
pixelSize int
return FontGlyph
        internal FontGlyph ReloadGlyphFromIndex(uint glyphIndex, int pixelSize)
        {
            if (currentFacePixelSize != pixelSize)
            {
                currentFacePixelSize = pixelSize;
                NativeMyFontsLib.MyFtSetPixelSizes(this.ftFaceHandle, pixelSize);
            }

            //--------------------------------------------------

            var fontGlyph = new FontGlyph();
            NativeMyFontsLib.MyFtLoadGlyph(ftFaceHandle, glyphIndex, out fontGlyph.glyphMatrix);
            BuildOutlineGlyph(fontGlyph, pixelSize);
            return fontGlyph;
        }
        internal FontGlyph ReloadGlyphFromChar(char unicodeChar, int pixelSize)

Usage Example

示例#1
0
        public override FontGlyph GetGlyphByIndex(uint glyphIndex)
        {
            FontGlyph found;

            if (!dicGlyphs2.TryGetValue(glyphIndex, out found))
            {
                //not found glyph
                found = ownerFace.ReloadGlyphFromIndex(glyphIndex, fontSizeInPixelUnit);
                this.dicGlyphs2.Add(glyphIndex, found);
            }
            return(found);
        }