unsafe public void UpdateData(IntPtr data, FreeTypeFontApi.FreeTypeGlyph glyph) { for (int y = 0; y < glyph.height; y++) { byte *srcPtr = (byte *)data.ToPointer(); fixed(byte *dstPtr = m_rawData) { int srcIndex = y * glyph.width * glyph.bpp; int dstIndex = ((m_y + y) * m_canvasSize + m_x) * glyph.bpp; FreeTypeFontApi.UFT_MemoryCopy((IntPtr)(dstPtr + dstIndex), (IntPtr)(srcPtr + srcIndex), glyph.width * glyph.bpp); } } if (m_texureUpdated != null) { m_texureUpdated(); } }
public void Advance(FreeTypeFontApi.FreeTypeGlyph glyph) { m_x += glyph.width + s_glyphPadding; }