private void WritePixels(ref GlyphDecodeInfo DecodeInfo, Int32 NrOfPixels, bool Color) { for (int i = 0; i < NrOfPixels; i++) { if (DecodeInfo.IsBitmapReady()) { return; } PutFontPixel(DecodeInfo.BitmapX + DecodeInfo.OffsetX, DecodeInfo.BitmapY + DecodeInfo.OffsetY, Color); DecodeInfo.MoveOnePixel(); } }
private void DrawGlyph(GlyphDecodeInfo DecodeInfo, BDF_Glyph_Header GlyphHeader) { while (!DecodeInfo.IsBitmapReady()) { Int32 Pixels0 = DecodeBitFieldUnsigned(DecodeInfo, (byte)FontHeader.m0); Int32 Pixels1 = DecodeBitFieldUnsigned(DecodeInfo, (byte)FontHeader.m1); do { WritePixels(ref DecodeInfo, Pixels0, false); WritePixels(ref DecodeInfo, Pixels1, true); } while (DecodeBitFieldUnsigned(DecodeInfo, 1) == 1); } }