public int sceFontGetCharGlyphImage_Clip(FontHandle FontHandle, ushort CharCode, GlyphImage* GlyphImagePointer, int ClipX, int ClipY, int ClipWidth, int ClipHeight) { var Font = Fonts.Get(FontHandle); var Glyph = Font.GetGlyph(CharCode); var Face = Glyph.Face; var PixelFormat = GlyphImagePointer->PixelFormat; var Buffer = PspMemory.PspAddressToPointerSafe(GlyphImagePointer->Buffer); var BufferHeight = GlyphImagePointer->BufferHeight; var BufferWidth = GlyphImagePointer->BufferWidth; var Position = GlyphImagePointer->Position; var GlyphBitmap = Face.GetBitmap(); var OutputBitmap = new PspBitmap(PixelFormat, (int)BufferWidth, (int)BufferHeight, (byte*)Buffer); try { for (int y = 0; y < ClipHeight; y++) { for (int x = 0; x < ClipWidth; x++) { //Console.WriteLine(); OutputBitmap.SetPixel(x, y, new OutputPixel(GlyphBitmap.GetPixel(x + ClipX, y + ClipY))); //OutputBitmap.SetPixel(x, y, new OutputPixel(Color.Red)); } } } catch (Exception Exception) { Console.Error.WriteLine(Exception); } //for (int n = 0; n < ) //Console.Error.WriteLine("'{0}': {1}", (char)CharCode, Glyph); //throw (new NotImplementedException()); return 0; }