FastLED 3.9.15
Loading...
Searching...
No Matches
stb_truetype.h
Go to the documentation of this file.
1#pragma once
2
3// stb_truetype.h - Public API for TrueType font processing
4// Part of the FastLED library - adapted from stb_truetype v1.26
5// Original: public domain by Sean Barrett / RAD Game Tools
6//
7// =======================================================================
8//
9// NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES
10//
11// This library does no range checking of the offsets found in the file,
12// meaning an attacker can use it to read arbitrary memory.
13//
14// =======================================================================
15
16#include "fl/stl/stdint.h"
17
18namespace fl {
19namespace third_party {
20namespace truetype {
21
23//
24// INTERNAL TYPES (exposed for structure layout)
25//
26
27// Internal buffer type (private - do not use directly)
28struct stbtt__buf {
29 unsigned char *data;
32};
33
34// Rectangle packer coordinate type
35using stbrp_coord = int32_t;
36
37// Rectangle for packing
38struct stbrp_rect {
41};
42
44//
45// PUBLIC TYPES
46//
47
48// Baked character data for simple bitmap baking API
49struct stbtt_bakedchar {
50 unsigned short x0, y0, x1, y1; // coordinates of bbox in bitmap
51 float xoff, yoff, xadvance;
52};
53
54// Aligned quad for rendering
55struct stbtt_aligned_quad {
56 float x0, y0, s0, t0; // top-left
57 float x1, y1, s1, t1; // bottom-right
58};
59
60// Packed character data for advanced packing API
61struct stbtt_packedchar {
62 unsigned short x0, y0, x1, y1; // coordinates of bbox in bitmap
63 float xoff, yoff, xadvance;
64 float xoff2, yoff2;
65};
66
67// Pack range definition
68struct stbtt_pack_range {
69 float font_size;
70 int32_t first_unicode_codepoint_in_range; // if non-zero, then the chars are continuous
71 int32_t *array_of_unicode_codepoints; // if non-zero, then this is an array
73 stbtt_packedchar *chardata_for_range;
74 unsigned char h_oversample, v_oversample;
75};
76
77// Kerning entry
78struct stbtt_kerningentry {
79 int32_t glyph1; // use stbtt_FindGlyphIndex
82};
83
84// Vertex type for glyph shapes
85#ifndef stbtt_vertex_type
86#define stbtt_vertex_type short
87#endif
88
89struct stbtt_vertex {
91 unsigned char type, padding;
92};
93
94// Vertex types
95enum {
96 STBTT_vmove = 1,
100};
101
103//
104// COMPLETE STRUCT DEFINITIONS
105//
106
107// Packing context - treat as opaque, but defined for stack allocation
108struct stbtt_pack_context {
110 void *pack_info;
117 unsigned char *pixels;
118 void *nodes;
119};
120
121// Font info - treat as opaque, but defined for stack allocation
122struct stbtt_fontinfo {
123 void *userdata;
124 unsigned char *data; // pointer to .ttf file
125 int32_t fontstart; // offset of start of font
126
127 int32_t numGlyphs; // number of glyphs, needed for range checking
128
129 int32_t loca, head, glyf, hhea, hmtx, kern, gpos, svg; // table locations
130 int32_t index_map; // a cmap mapping for our chosen character encoding
131 int32_t indexToLocFormat; // format needed to map from glyph index to glyph
132
133 stbtt__buf cff; // cff font data
134 stbtt__buf charstrings; // the charstring index
135 stbtt__buf gsubrs; // global charstring subroutines index
136 stbtt__buf subrs; // private charstring subroutines index
137 stbtt__buf fontdicts; // array of font dicts
138 stbtt__buf fdselect; // map from glyph to fontdict
139};
140
142//
143// TEXTURE BAKING API
144//
145// Simple API - just call these two functions
146//
147
148// Bake a font bitmap with simple packing
149int32_t stbtt_BakeFontBitmap(const unsigned char *data, int32_t offset,
150 float pixel_height,
151 unsigned char *pixels, int32_t pw, int32_t ph,
152 int32_t first_char, int32_t num_chars,
153 stbtt_bakedchar *chardata);
154
155// Get quad coordinates for a baked character
156void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int32_t pw, int32_t ph,
157 int32_t char_index, float *xpos, float *ypos,
158 stbtt_aligned_quad *q, int32_t opengl_fillrule);
159
160// Get scaled font vertical metrics (helper function)
161void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int32_t index,
162 float size, float *ascent, float *descent, float *lineGap);
163
165//
166// ADVANCED PACKING API
167//
168// More control over packing behavior
169//
170
171// Begin packing characters into a bitmap
172int32_t stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels,
173 int32_t width, int32_t height, int32_t stride_in_bytes,
174 int32_t padding, void *alloc_context);
175
176// End packing - cleanup
178
179// Pack a range of characters
180int32_t stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata,
181 int32_t font_index, float font_size,
182 int32_t first_unicode_codepoint_in_range, int32_t num_chars_in_range,
183 stbtt_packedchar *chardata_for_range);
184
185// Pack multiple ranges
186int32_t stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata,
187 int32_t font_index, stbtt_pack_range *ranges, int32_t num_ranges);
188
189// Set oversampling for higher quality
190void stbtt_PackSetOversampling(stbtt_pack_context *spc, uint32_t h_oversample, uint32_t v_oversample);
191
192// Skip missing codepoints
194
195// Get quad for a packed character
196void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int32_t pw, int32_t ph,
197 int32_t char_index, float *xpos, float *ypos,
198 stbtt_aligned_quad *q, int32_t align_to_integer);
199
200// Advanced: separate gather/pack/render phases
202 stbtt_pack_range *ranges, int32_t num_ranges, stbrp_rect *rects);
205 stbtt_pack_range *ranges, int32_t num_ranges, stbrp_rect *rects);
206
208//
209// FONT LOADING
210//
211
212// Get number of fonts in a TrueType collection
213int32_t stbtt_GetNumberOfFonts(const unsigned char *data);
214
215// Get offset for a specific font in a collection
216int32_t stbtt_GetFontOffsetForIndex(const unsigned char *data, int32_t index);
217
218// Initialize a font
219int32_t stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int32_t offset);
220
222//
223// CHARACTER TO GLYPH INDEX CONVERSION
224//
225
226// Find glyph index for a unicode codepoint
227int32_t stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int32_t unicode_codepoint);
228
230//
231// FONT METRICS
232//
233
234// Scale for pixel height
235float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float pixels);
236
237// Scale for em to pixels mapping
238float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels);
239
240// Get vertical metrics
241void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int32_t *ascent, int32_t *descent, int32_t *lineGap);
242
243// Get OS/2 vertical metrics
245 int32_t *typoDescent, int32_t *typoLineGap);
246
247// Get bounding box
248void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1);
249
250// Get horizontal metrics for a codepoint
251void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int32_t codepoint,
252 int32_t *advanceWidth, int32_t *leftSideBearing);
253
254// Get kerning advance
256
257// Get bounding box for a codepoint
259 int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1);
260
261// Get horizontal metrics for a glyph
262void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int32_t glyph_index,
263 int32_t *advanceWidth, int32_t *leftSideBearing);
264
265// Get glyph kerning advance
267
268// Get glyph bounding box
269int32_t stbtt_GetGlyphBox(const stbtt_fontinfo *info, int32_t glyph_index,
270 int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1);
271
272// Get kerning table
275
277//
278// GLYPH SHAPES
279//
280
281// Check if glyph is empty
282int32_t stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int32_t glyph_index);
283
284// Get shape for a codepoint
285int32_t stbtt_GetCodepointShape(const stbtt_fontinfo *info, int32_t unicode_codepoint,
286 stbtt_vertex **vertices);
287
288// Get shape for a glyph
289int32_t stbtt_GetGlyphShape(const stbtt_fontinfo *info, int32_t glyph_index,
290 stbtt_vertex **vertices);
291
292// Free shape data
293void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices);
294
295// SVG support
296unsigned char *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int32_t gl);
297int32_t stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int32_t unicode_codepoint, const char **svg);
298int32_t stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int32_t gl, const char **svg);
299
301//
302// BITMAP RENDERING
303//
304
305// Free a bitmap
306void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata);
307
308// Get bitmap for a codepoint
309unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y,
310 int32_t codepoint, int32_t *width, int32_t *height,
311 int32_t *xoff, int32_t *yoff);
312
313// Get bitmap with subpixel positioning
314unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y,
315 float shift_x, float shift_y, int32_t codepoint,
316 int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff);
317
318// Render codepoint into existing bitmap
319void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output,
320 int32_t out_w, int32_t out_h, int32_t out_stride,
321 float scale_x, float scale_y, int32_t codepoint);
322
323// Render with subpixel positioning
324void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output,
325 int32_t out_w, int32_t out_h, int32_t out_stride,
326 float scale_x, float scale_y, float shift_x, float shift_y,
327 int32_t codepoint);
328
329// Render with subpixel prefiltering
330void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output,
331 int32_t out_w, int32_t out_h, int32_t out_stride,
332 float scale_x, float scale_y, float shift_x, float shift_y,
333 int32_t oversample_x, int32_t oversample_y,
334 float *sub_x, float *sub_y, int32_t codepoint);
335
336// Get bitmap box for a codepoint
337void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int32_t codepoint,
338 float scale_x, float scale_y,
339 int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1);
340
341// Get bitmap box with subpixel positioning
343 float scale_x, float scale_y, float shift_x, float shift_y,
344 int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1);
345
346// Glyph-based bitmap functions (same as codepoint but use glyph index)
347unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y,
349 int32_t *xoff, int32_t *yoff);
350
351unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y,
352 float shift_x, float shift_y, int32_t glyph,
353 int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff);
354
355void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output,
356 int32_t out_w, int32_t out_h, int32_t out_stride,
357 float scale_x, float scale_y, int32_t glyph);
358
359void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output,
360 int32_t out_w, int32_t out_h, int32_t out_stride,
361 float scale_x, float scale_y, float shift_x, float shift_y,
362 int32_t glyph);
363
364void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output,
365 int32_t out_w, int32_t out_h, int32_t out_stride,
366 float scale_x, float scale_y, float shift_x, float shift_y,
367 int32_t oversample_x, int32_t oversample_y,
368 float *sub_x, float *sub_y, int32_t glyph);
369
370void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int32_t glyph,
371 float scale_x, float scale_y,
372 int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1);
373
375 float scale_x, float scale_y, float shift_x, float shift_y,
376 int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1);
377
379//
380// SIGNED DISTANCE FIELD (SDF) RENDERING
381//
382
383// Free SDF bitmap
384void stbtt_FreeSDF(unsigned char *bitmap, void *userdata);
385
386// Get SDF for a glyph
387unsigned char *stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int32_t glyph,
388 int32_t padding, unsigned char onedge_value, float pixel_dist_scale,
389 int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff);
390
391// Get SDF for a codepoint
392unsigned char *stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int32_t codepoint,
393 int32_t padding, unsigned char onedge_value, float pixel_dist_scale,
394 int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff);
395
397//
398// FONT NAME QUERIES
399//
400
401// Find matching font by name
402int32_t stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int32_t flags);
403
404// Compare UTF8 to UTF16 big-endian
405int32_t stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int32_t len1, const char *s2, int32_t len2);
406
407// Get font name string
408const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int32_t *length,
409 int32_t platformID, int32_t encodingID,
410 int32_t languageID, int32_t nameID);
411
412} // namespace truetype
413} // namespace third_party
414} // namespace fl
int y
Definition simple.h:93
int x
Definition simple.h:92
uint32_t scale_y[NUM_LAYERS]
Definition Fire2023.h:95
uint32_t scale_x[NUM_LAYERS]
Definition Fire2023.h:94
fl::UISlider scale("Scale", 4,.1, 4,.1)
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int32_t oversample_x, int32_t oversample_y, float *sub_x, float *sub_y, int32_t glyph) FL_NOEXCEPT
int32_t stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int32_t glyph1, int32_t glyph2) FL_NOEXCEPT
unsigned char * stbtt_FindSVGDoc(const stbtt_fontinfo *info, int32_t gl) FL_NOEXCEPT
void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int32_t codepoint, int32_t *advanceWidth, int32_t *leftSideBearing) FL_NOEXCEPT
int32_t stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int32_t ch1, int32_t ch2) FL_NOEXCEPT
float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float pixels) FL_NOEXCEPT
unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int32_t glyph, int32_t padding, unsigned char onedge_value, float pixel_dist_scale, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
void stbtt_PackEnd(stbtt_pack_context *spc) FL_NOEXCEPT
void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int32_t codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1) FL_NOEXCEPT
void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1) FL_NOEXCEPT
unsigned char * stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int32_t codepoint, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int32_t codepoint) FL_NOEXCEPT
void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int32_t glyph, float scale_x, float scale_y, int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1) FL_NOEXCEPT
void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices) FL_NOEXCEPT
int32_t stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int32_t *typoAscent, int32_t *typoDescent, int32_t *typoLineGap) FL_NOEXCEPT
int32_t stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int32_t unicode_codepoint, const char **svg) FL_NOEXCEPT
void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int32_t num_rects) FL_NOEXCEPT
void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int32_t pw, int32_t ph, int32_t char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int32_t align_to_integer) FL_NOEXCEPT
int32_t stbtt_BakeFontBitmap(const unsigned char *data, int32_t offset, float pixel_height, unsigned char *pixels, int32_t pw, int32_t ph, int32_t first_char, int32_t num_chars, stbtt_bakedchar *chardata) FL_NOEXCEPT
void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int32_t *ascent, int32_t *descent, int32_t *lineGap) FL_NOEXCEPT
int32_t stbtt_GetCodepointShape(const stbtt_fontinfo *info, int32_t unicode_codepoint, stbtt_vertex **vertices) FL_NOEXCEPT
int32_t stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int32_t flags) FL_NOEXCEPT
void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata) FL_NOEXCEPT
int32_t stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int32_t font_index, stbtt_pack_range *ranges, int32_t num_ranges) FL_NOEXCEPT
int32_t stbtt_GetKerningTableLength(const stbtt_fontinfo *info) FL_NOEXCEPT
int32_t stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int32_t num_ranges, stbrp_rect *rects) FL_NOEXCEPT
float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels) FL_NOEXCEPT
unsigned char * stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int32_t codepoint, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
int32_t stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry *table, int32_t table_length) FL_NOEXCEPT
const char * stbtt_GetFontNameString(const stbtt_fontinfo *font, int32_t *length, int32_t platformID, int32_t encodingID, int32_t languageID, int32_t nameID) FL_NOEXCEPT
void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, int32_t glyph) FL_NOEXCEPT
void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int32_t index, float size, float *ascent, float *descent, float *lineGap) FL_NOEXCEPT
int32_t stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int32_t font_index, float font_size, int32_t first_unicode_char_in_range, int32_t num_chars_in_range, stbtt_packedchar *chardata_for_range) FL_NOEXCEPT
unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int32_t codepoint, int32_t padding, unsigned char onedge_value, float pixel_dist_scale, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
int32_t stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int32_t unicode_codepoint) FL_NOEXCEPT
int32_t stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int32_t glyph_index) FL_NOEXCEPT
int32_t stbtt_GetNumberOfFonts(const unsigned char *data) FL_NOEXCEPT
void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int32_t skip) FL_NOEXCEPT
unsigned char * stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int32_t glyph, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
int32_t stbtt_GetGlyphBox(const stbtt_fontinfo *info, int32_t glyph_index, int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1) FL_NOEXCEPT
void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int32_t codepoint, float scale_x, float scale_y, int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1) FL_NOEXCEPT
void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int32_t pw, int32_t ph, int32_t char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int32_t opengl_fillrule) FL_NOEXCEPT
int32_t stbtt_GetGlyphShape(const stbtt_fontinfo *info, int32_t glyph_index, stbtt_vertex **vertices) FL_NOEXCEPT
void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int32_t glyph, float scale_x, float scale_y, float shift_x, float shift_y, int32_t *ix0, int32_t *iy0, int32_t *ix1, int32_t *iy1) FL_NOEXCEPT
void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int32_t glyph_index, int32_t *advanceWidth, int32_t *leftSideBearing) FL_NOEXCEPT
void stbtt_FreeSDF(unsigned char *bitmap, void *userdata) FL_NOEXCEPT
unsigned char * stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int32_t glyph, int32_t *width, int32_t *height, int32_t *xoff, int32_t *yoff) FL_NOEXCEPT
int32_t stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int32_t num_ranges, stbrp_rect *rects) FL_NOEXCEPT
void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int32_t oversample_x, int32_t oversample_y, float *sub_x, float *sub_y, int32_t codepoint) FL_NOEXCEPT
int32_t stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int32_t width, int32_t height, int32_t stride_in_bytes, int32_t padding, void *alloc_context) FL_NOEXCEPT
int32_t stbtt_GetCodepointBox(const stbtt_fontinfo *info, int32_t codepoint, int32_t *x0, int32_t *y0, int32_t *x1, int32_t *y1) FL_NOEXCEPT
void stbtt_PackSetOversampling(stbtt_pack_context *spc, uint32_t h_oversample, uint32_t v_oversample) FL_NOEXCEPT
int32_t stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int32_t gl, const char **svg) FL_NOEXCEPT
void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int32_t glyph) FL_NOEXCEPT
int32_t stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int32_t offset) FL_NOEXCEPT
int32_t stbtt_GetFontOffsetForIndex(const unsigned char *data, int32_t index) FL_NOEXCEPT
void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int32_t out_w, int32_t out_h, int32_t out_stride, float scale_x, float scale_y, int32_t codepoint) FL_NOEXCEPT
int32_t stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int32_t len1, const char *s2, int32_t len2) FL_NOEXCEPT
fl::u32 uint32_t
Definition coder.h:219
fl::i32 int32_t
Definition coder.h:220
u8 u8 height
Definition blur.h:186
u8 width
Definition blur.h:186
Base definition for an LED controller.
Definition crgb.hpp:179
#define stbtt_vertex_type