stb-truetype.monkey2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Namespace stb.truetype
  2. #Import "native/stb_truetype.c"
  3. #Import "native/stb_truetype.h"
  4. Extern
  5. Struct stbtt_fontinfo
  6. End
  7. Struct stbtt_bakedchar
  8. Field x0:UShort
  9. Field y0:UShort
  10. Field x1:UShort
  11. Field y1:UShort
  12. Field xoff:Float
  13. Field yoff:Float
  14. Field xadvance:Float
  15. End
  16. Function stbtt_InitFont:Int( info:stbtt_fontinfo Ptr,data:UByte Ptr,offset:Int )
  17. Function stbtt_FindGlyphIndex:Int( info:stbtt_fontinfo Ptr,unicode_codepoint:Int )
  18. Function stbtt_ScaleForPixelHeight:Float( info:stbtt_fontinfo Ptr,pixels:Float )
  19. Function stbtt_GetFontVMetrics:Void( info:stbtt_fontinfo Ptr,ascent:Int Ptr,descent:Int Ptr,lineGap:Int Ptr )
  20. Function stbtt_GetCodepointHMetrics:Void( info:stbtt_fontinfo Ptr,codepoint:Int,advanceWidth:Int Ptr,leftSideBearing:Int Ptr )
  21. Function stbtt_GetCodepointKernAdvance:Int( info:stbtt_fontinfo Ptr,ch1:Int,ch2:Int )
  22. Function stbtt_GetGlyphHMetrics:Void( info:stbtt_fontinfo Ptr,glyph:Int,advanceWidth:Int Ptr,leftSideBearing:Int Ptr )
  23. Function stbtt_MakeGlyphBitmap:Void( info:stbtt_fontinfo Ptr,output:UByte Ptr,out_w:Int,out_h:Int,out_stride:Int,scale_x:Float,scale_y:Float,glyph:Int )
  24. Function stbtt_GetGlyphBitmapBox:Void( info:stbtt_fontinfo Ptr,glyph:Int,scale_x:Float,scale_y:Float,ix0:Int Ptr,iy0:Int Ptr,ix1:Int Ptr,iy1:Int Ptr )
  25. Function stbtt_BakeFontBitmap( data:UByte Ptr,offset:Int,pixel_height:Float,pixels:UByte Ptr,pw:Int,ph:Int,first_char:Int,num_chars:Int,chardata:stbtt_bakedchar Ptr )