Native Chic font parsing, glyph metrics, outlines, rasterization, and atlas packing based on stb_truetype.
Functions
STBTT_POINT_SIZE : func(size : f32) -> f32
stbtt_GetCodepointShape : func(info : ^stbtt_fontinfo, unicode_codepoint : i32, vertices : ^^stbtt_vertex) -> i32
stbtt_GetCodepointBox : func(info : ^stbtt_fontinfo, codepoint : i32, x0 : ^i32, y0 : ^i32, x1 : ^i32, y1 : ^i32) -> i32
stbtt_IsGlyphEmpty : func(info : ^stbtt_fontinfo, glyph_index : i32) -> i32
stbtt_GetKerningTableLength : func(info : ^stbtt_fontinfo) -> i32
stbtt_GetKerningTable : func(info : ^stbtt_fontinfo, table : ^stbtt_kerningentry, table_length : i32) -> i32
stbtt_GetCodepointKernAdvance : func(info : ^stbtt_fontinfo, ch1 : i32, ch2 : i32) -> i32
stbtt_GetCodepointHMetrics : func(info : ^stbtt_fontinfo, codepoint : i32, advanceWidth : ^i32, leftSideBearing : ^i32)
stbtt_GetFontVMetricsOS2 : func(info : ^stbtt_fontinfo, typoAscent : ^i32, typoDescent : ^i32, typoLineGap : ^i32) -> i32
stbtt_GetFontBoundingBox : func(info : ^stbtt_fontinfo, x0 : ^i32, y0 : ^i32, x1 : ^i32, y1 : ^i32)
stbtt_ScaleForPixelHeight : func(info : ^stbtt_fontinfo, height : f32) -> f32
stbtt_ScaleForMappingEmToPixels : func(info : ^stbtt_fontinfo, pixels : f32) -> f32
stbtt_FreeShape : func(info : ^stbtt_fontinfo, v : ^stbtt_vertex)
stbtt_GetCodepointBitmapBoxSubpixel : func(font : ^stbtt_fontinfo, codepoint : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, ix0 : ^i32, iy0 : ^i32, ix1 : ^i32, iy1 : ^i32)
stbtt_GetCodepointBitmapBox : func(font : ^stbtt_fontinfo, codepoint : i32, scale_x : f32, scale_y : f32, ix0 : ^i32, iy0 : ^i32, ix1 : ^i32, iy1 : ^i32)
stbtt_FreeBitmap : func(bitmap : ^u8, userdata : ^void)
stbtt_GetGlyphBitmapSubpixel : func(info : ^stbtt_fontinfo, scale_x_arg : f32, scale_y_arg : f32, shift_x : f32, shift_y : f32, glyph : i32, width : ^i32, height : ^i32, xoff : ^i32, yoff : ^i32) -> ^u8
stbtt_GetGlyphBitmap : func(info : ^stbtt_fontinfo, scale_x : f32, scale_y : f32, glyph : i32, width : ^i32, height : ^i32, xoff : ^i32, yoff : ^i32) -> ^u8
stbtt_GetCodepointBitmapSubpixel : func(info : ^stbtt_fontinfo, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, codepoint : i32, width : ^i32, height : ^i32, xoff : ^i32, yoff : ^i32) -> ^u8
stbtt_MakeCodepointBitmapSubpixel : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, codepoint : i32)
stbtt_GetCodepointBitmap : func(info : ^stbtt_fontinfo, scale_x : f32, scale_y : f32, codepoint : i32, width : ^i32, height : ^i32, xoff : ^i32, yoff : ^i32) -> ^u8
stbtt_MakeCodepointBitmap : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, codepoint : i32)
stbtt_GetScaledFontVMetrics : func(fontdata : ^u8, index : i32, size : f32, ascent : ^f32, descent : ^f32, lineGap : ^f32)
stbtt_FindGlyphIndex : func(info : ^stbtt_fontinfo, unicode_codepoint : i32) -> i32
stbtt_GetGlyphBox : func(info : ^stbtt_fontinfo, glyph_index : i32, x0 : ^i32, y0 : ^i32, x1 : ^i32, y1 : ^i32) -> i32
stbtt_GetGlyphHMetrics : func(info : ^stbtt_fontinfo, glyph_index : i32, advanceWidth : ^i32, leftSideBearing : ^i32)
stbtt_GetGlyphKernAdvance : func(info : ^stbtt_fontinfo, g1 : i32, g2 : i32) -> i32
stbtt_GetFontVMetrics : func(info : ^stbtt_fontinfo, ascent : ^i32, descent : ^i32, lineGap : ^i32)
stbtt_GetGlyphBitmapBoxSubpixel : func(font : ^stbtt_fontinfo, glyph : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, ix0 : ^i32, iy0 : ^i32, ix1 : ^i32, iy1 : ^i32)
stbtt_GetGlyphBitmapBox : func(font : ^stbtt_fontinfo, glyph : i32, scale_x : f32, scale_y : f32, ix0 : ^i32, iy0 : ^i32, ix1 : ^i32, iy1 : ^i32)
stbtt_GetFontOffsetForIndex : func(data : ^u8, index : i32) -> i32
stbtt_InitFont : func(info : ^stbtt_fontinfo, data : ^u8, offset : i32) -> i32
stbtt_GetFontNameString : func(font : ^stbtt_fontinfo, length : ^i32, platformID : i32, encodingID : i32, languageID : i32, nameID : i32) -> ^u8
stbtt_GetNumberOfFonts : func(data : ^u8) -> i32
stbtt_FindMatchingFont : func(fontdata : ^u8, name : ^u8, flags : i32) -> i32
stbtt_CompareUTF8toUTF16_bigendian : func(s1 : ^u8, len1 : i32, s2 : ^u8, len2 : i32) -> i32
stbtt_GetGlyphShape : func(info : ^stbtt_fontinfo, glyph_index : i32, pvertices : ^^stbtt_vertex) -> i32
stbtt_GetBakedQuad : func(chardata : ^stbtt_bakedchar, pw : i32, ph : i32, char_index : i32, xpos : ^f32, ypos : ^f32, q : ^stbtt_aligned_quad, opengl_fillrule : i32)
stbtt_PackBegin : func(spc : ^stbtt_pack_context, pixels : ^u8, pw : i32, ph : i32, stride_in_bytes : i32, padding : i32, alloc_context : ^void) -> i32
stbtt_PackEnd : func(spc : ^stbtt_pack_context)
stbtt_PackSetOversampling : func(spc : ^stbtt_pack_context, h_oversample : u32, v_oversample : u32)
stbtt_PackSetSkipMissingCodepoints : func(spc : ^stbtt_pack_context, skip : i32)
stbtt_PackFontRangesGatherRects : func(spc : ^stbtt_pack_context, info : ^stbtt_fontinfo, ranges : ^stbtt_pack_range, num_ranges : i32, rects : ^stbrp_rect) -> i32
stbtt_PackFontRangesRenderIntoRects : func(spc : ^stbtt_pack_context, info : ^stbtt_fontinfo, ranges : ^stbtt_pack_range, num_ranges : i32, rects : ^stbrp_rect) -> i32
stbtt_PackFontRangesPackRects : func(spc : ^stbtt_pack_context, rects : ^stbrp_rect, num_rects : i32)
stbtt_PackFontRanges : func(spc : ^stbtt_pack_context, fontdata : ^u8, font_index : i32, ranges : ^stbtt_pack_range, num_ranges : i32) -> i32
stbtt_PackFontRange : func(spc : ^stbtt_pack_context, fontdata : ^u8, font_index : i32, font_size : f32, first_unicode_codepoint_in_range : i32, num_chars_in_range : i32, chardata_for_range : ^stbtt_packedchar) -> i32
stbtt_GetPackedQuad : func(chardata : ^stbtt_packedchar, pw : i32, ph : i32, char_index : i32, xpos : ^f32, ypos : ^f32, q : ^stbtt_aligned_quad, align_to_integer : i32)
stbtt_BakeFontBitmap : func(data : ^u8, offset : i32, pixel_height : f32, pixels : ^u8, pw : i32, ph : i32, first_char : i32, num_chars : i32, chardata : ^stbtt_bakedchar) -> i32
stbtt_MakeCodepointBitmapSubpixelPrefilter : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, oversample_x : i32, oversample_y : i32, sub_x : ^f32, sub_y : ^f32, codepoint : i32)
stbtt_MakeGlyphBitmapSubpixelPrefilter : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, prefilter_x : i32, prefilter_y : i32, sub_x : ^f32, sub_y : ^f32, glyph : i32)
stbtt_Rasterize : func(result : ^stbtt__bitmap, flatness_in_pixels : f32, vertices : ^stbtt_vertex, num_verts : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, x_off : i32, y_off : i32, invert : i32, userdata : ^void)
stbtt_MakeGlyphBitmapSubpixel : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, shift_x : f32, shift_y : f32, glyph : i32)
stbtt_MakeGlyphBitmap : func(info : ^stbtt_fontinfo, output : ^u8, out_w : i32, out_h : i32, out_stride : i32, scale_x : f32, scale_y : f32, glyph : i32)
chic_stbtt_get_face_metrics : func(data : ^u8, data_size : i64, metrics : ^StbTrueTypeFaceMetrics) -> i32
Read unscaled face metrics. Returns 1 on success, 0 on failure.
chic_stbtt_get_glyph_metrics : func(data : ^u8, data_size : i64, codepoint : u32, scale : f32, metrics : ^StbTrueTypeGlyphMetrics) -> i32
Resolve a Unicode scalar and its scaled bitmap bounds.
A positive bounded range also rejects NaN with Chic's ordered comparisons.
chic_stbtt_get_glyph_kerning : func(data : ^u8, data_size : i64, left_glyph_index : i32, right_glyph_index : i32, advance_adjustment : ^i32) -> i32
Return unscaled horizontal pair adjustment from GPOS or the kern table.
chic_stbtt_rasterize_glyph : func(data : ^u8, data_size : i64, glyph_index : i32, scale : f32, output : ^u8, output_size : i64, width : i32, height : i32, stride : i32) -> i32
Write grayscale coverage into the caller's buffer; preserve stride padding.