|
| #define | STBTT_STATIC |
| |
| #define | STB_TRUETYPE_IMPLEMENTATION |
| |
| #define | STBTT_ifloor(x) ((int) floor(x)) |
| |
| #define | STBTT_iceil(x) ((int) ceil(x)) |
| |
| #define | STBTT_sqrt(x) sqrt(x) |
| |
| #define | STBTT_pow(x, y) pow(x,y) |
| |
| #define | STBTT_fmod(x, y) fmod(x,y) |
| |
| #define | STBTT_cos(x) cos(x) |
| |
| #define | STBTT_acos(x) acos(x) |
| |
| #define | STBTT_fabs(x) fabs(x) |
| |
| #define | STBTT_malloc(x, u) ((void)(u),malloc(x)) |
| |
| #define | STBTT_free(x, u) ((void)(u),free(x)) |
| |
| #define | STBTT_assert(x) assert(x) |
| |
| #define | STBTT_strlen(x) strlen(x) |
| |
| #define | STBTT_memcpy memcpy |
| |
| #define | STBTT_memset memset |
| |
| #define | PLUTOVG_STB_TRUETYPE_H |
| |
| #define | STBTT_DEF static |
| |
| #define | STBTT_POINT_SIZE(x) (-(x)) |
| |
| #define | stbtt_vertex_type short |
| |
| #define | STBTT_MACSTYLE_DONTCARE 0 |
| |
| #define | STBTT_MACSTYLE_BOLD 1 |
| |
| #define | STBTT_MACSTYLE_ITALIC 2 |
| |
| #define | STBTT_MACSTYLE_UNDERSCORE 4 |
| |
| #define | STBTT_MACSTYLE_NONE 8 |
| |
| #define | STBTT_MAX_OVERSAMPLE 8 |
| |
| #define | STBTT_RASTERIZER_VERSION 2 |
| |
| #define | STBTT__NOTUSED(v) (void)sizeof(v) |
| |
| #define | stbtt__buf_get16(b) stbtt__buf_get((b), 2) |
| |
| #define | stbtt__buf_get32(b) stbtt__buf_get((b), 4) |
| |
| #define | ttBYTE(p) (* (stbtt_uint8 *) (p)) |
| |
| #define | ttCHAR(p) (* (stbtt_int8 *) (p)) |
| |
| #define | ttFixed(p) ttLONG(p) |
| |
| #define | stbtt_tag4(p, c0, c1, c2, c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) |
| |
| #define | stbtt_tag(p, str) stbtt_tag4(p,str[0],str[1],str[2],str[3]) |
| |
| #define | STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0} |
| |
| #define | STBTT__CSERR(s) (0) |
| |
| #define | STBTT_GPOS_TODO_assert(x) |
| |
| #define | STBTT__COMPARE(a, b) ((a)->y0 < (b)->y0) |
| |
| #define | STBTT__OVER_MASK (STBTT_MAX_OVERSAMPLE-1) |
| |
| #define | STBTT_min(a, b) ((a) < (b) ? (a) : (b)) |
| |
| #define | STBTT_max(a, b) ((a) < (b) ? (b) : (a)) |
| |
| #define | novasvg_mutex_init(mutex) ((void)(mutex)) |
| |
| #define | novasvg_mutex_lock(mutex) ((void)(mutex)) |
| |
| #define | novasvg_mutex_unlock(mutex) ((void)(mutex)) |
| |
| #define | novasvg_mutex_destroy(mutex) ((void)(mutex)) |
| |
| #define | GLYPH_CACHE_INIT_CAPACITY 128 |
| |
|
| NOVASVG_INLINE void | novasvg::render::text_iterator_init (text_iterator_t *it, const void *text, int length, text_encoding_t encoding) |
| | Initializes a text iterator.
|
| |
| NOVASVG_INLINE bool | novasvg::render::text_iterator_has_next (const text_iterator_t *it) |
| | Checks if there are more code points to iterate.
|
| |
| NOVASVG_INLINE codepoint_t | novasvg::render::text_iterator_next (text_iterator_t *it) |
| | Retrieves the next code point and advances the iterator.
|
| |
| NOVASVG_INLINE font_face_t * | novasvg::render::font_face_load_from_file (const char *filename, int ttcindex) |
| | Loads a font face from a file.
|
| |
| NOVASVG_INLINE font_face_t * | novasvg::render::font_face_load_from_data (const void *data, unsigned int length, int ttcindex, destroy_func_t destroy_func, void *closure) |
| | Loads a font face from memory.
|
| |
| NOVASVG_INLINE font_face_t * | novasvg::render::font_face_reference (font_face_t *face) |
| | Increments the reference count of a font face.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_destroy (font_face_t *face) |
| | Decrements the reference count and potentially destroys the font face.
|
| |
| NOVASVG_INLINE int | novasvg::render::font_face_get_reference_count (const font_face_t *face) |
| | Retrieves the current reference count of a font face.
|
| |
| NOVASVG_INLINE float | novasvg::render::font_face_get_units_per_em (const font_face_t *face) |
| |
| NOVASVG_INLINE void | novasvg::render::font_face_enumerate_codepoints (const font_face_t *face, void(*callback)(uint32_t codepoint, void *closure), void *closure) |
| |
| NOVASVG_INLINE void | novasvg::render::font_face_get_metrics (const font_face_t *face, float size, float *ascent, float *descent, float *line_gap, rect_t *extents) |
| | Retrieves metrics for a font face at a specified size.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_get_glyph_metrics (font_face_t *face, float size, codepoint_t codepoint, float *advance_width, float *left_side_bearing, rect_t *extents) |
| | Retrieves metrics for a specified glyph at a given size.
|
| |
| NOVASVG_INLINE float | novasvg::render::font_face_get_kern_advance (font_face_t *face, float size, codepoint_t ch1, codepoint_t ch2) |
| |
| NOVASVG_INLINE float | novasvg::render::font_face_get_glyph_path (font_face_t *face, float size, float x, float y, codepoint_t codepoint, path_t *path) |
| | Retrieves the path of a glyph and its advance width.
|
| |
| NOVASVG_INLINE float | novasvg::render::font_face_traverse_glyph_path (font_face_t *face, float size, float x, float y, codepoint_t codepoint, path_traverse_func_t traverse_func, void *closure) |
| | Traverses the path of a glyph and calls a callback for each path element.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_init_ligatures (font_face_t *face) |
| |
| NOVASVG_INLINE codepoint_t | novasvg::render::font_face_apply_ligature (font_face_t *face, text_iterator_t *it, codepoint_t codepoint) |
| |
| NOVASVG_INLINE float | novasvg::render::font_face_text_extents (font_face_t *face, float size, const void *text, int length, text_encoding_t encoding, rect_t *extents) |
| | Computes the bounding box of a text string and its advance width.
|
| |
| NOVASVG_INLINE font_face_cache_t * | novasvg::render::font_face_cache_create (void) |
| | Create a new, empty font‐face cache.
|
| |
| NOVASVG_INLINE font_face_cache_t * | novasvg::render::font_face_cache_reference (font_face_cache_t *cache) |
| | Increments the reference count of a font‐face cache.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_cache_destroy (font_face_cache_t *cache) |
| | Decrement the reference count of a font‐face cache and destroy it when it reaches zero.
|
| |
| NOVASVG_INLINE int | novasvg::render::font_face_cache_reference_count (const font_face_cache_t *cache) |
| | Retrieve the current reference count of a font‐face cache.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_cache_reset (font_face_cache_t *cache) |
| | Remove all entries from a font‐face cache.
|
| |
| NOVASVG_INLINE void | novasvg::render::font_face_cache_add (font_face_cache_t *cache, const char *family, bool bold, bool italic, font_face_t *face) |
| | Add a font face to the cache with the specified family and style.
|
| |
| NOVASVG_INLINE bool | novasvg::render::font_face_cache_add_file (font_face_cache_t *cache, const char *family, bool bold, bool italic, const char *filename, int ttcindex) |
| | Load a font face from a file and add it to the cache with the specified family and style.
|
| |
| NOVASVG_INLINE font_face_t * | novasvg::render::font_face_cache_get (font_face_cache_t *cache, const char *family, bool bold, bool italic) |
| | Retrieve a font face from the cache by family and style.
|
| |
| NOVASVG_INLINE int | novasvg::render::font_face_cache_load_file (font_face_cache_t *cache, const char *filename) |
| | Load all font faces from a file and add them to the cache.
|
| |
| NOVASVG_INLINE int | novasvg::render::font_face_cache_load_dir (font_face_cache_t *cache, const char *dirname) |
| | Load all font faces from files in a directory recursively and add them to the cache.
|
| |
| NOVASVG_INLINE int | novasvg::render::font_face_cache_load_sys (font_face_cache_t *cache) |
| | Load all available system font faces and add them to the cache.
|
| |