|
ginnOS
The reference: libc, the libraries and the kernel
|
what the bragi sources share: the font, the face and the glyph. More...
Go to the source code of this file.
Data Structures | |
| struct | bragi_font |
| struct | bragi_glyph |
| one glyph image in a face's cache. More... | |
| struct | bragi_face |
Macros | |
| #define | STBTT_assert(x) |
| #define | BRAGI_UNITS 64 |
| #define | BRAGI_SUBPIXELS 4 |
| #define | BRAGI_HASH_SIZE 256 |
Typedefs | |
| typedef struct bragi_glyph | bragi_glyph_t |
| one glyph image in a face's cache. | |
Functions | |
| bragi_face_t * | bragi_find_glyph (bragi_face_t *face, uint32_t codepoint, int *glyph) |
| find the face (this one or a fallback) and the glyph for a character. | |
| int32_t | bragi_advance (const bragi_face_t *face, int glyph) |
| the advance of a glyph in 1/64 pixels. | |
| int32_t | bragi_kerning (const bragi_face_t *face, int left, int right) |
| the kerning between two glyphs of the same face, in 1/64 pixels. | |
| const bragi_glyph_t * | bragi_glyph (bragi_face_t *face, int glyph, int subpixel) |
| a glyph image from the cache, made if it is not there. | |
| void | bragi_blend_mask (gfx_buffer_t *buf, int32_t x, int32_t y, const uint8_t *mask, int32_t width, int32_t height, int32_t stride, gfx_color_t color) |
| blend a coverage mask in a colour over buf (in sRGB, as browsers do). | |
what the bragi sources share: the font, the face and the glyph.
| #define STBTT_assert | ( | x | ) |
| #define BRAGI_UNITS 64 |
| #define BRAGI_SUBPIXELS 4 |
| #define BRAGI_HASH_SIZE 256 |
| typedef struct bragi_glyph bragi_glyph_t |
one glyph image in a face's cache.
| bragi_face_t * bragi_find_glyph | ( | bragi_face_t * | face, |
| uint32_t | codepoint, | ||
| int * | glyph ) |
find the face (this one or a fallback) and the glyph for a character.
with no face that has it, the face itself and glyph 0 (the "missing glyph" box).
| int32_t bragi_advance | ( | const bragi_face_t * | face, |
| int | glyph ) |
the advance of a glyph in 1/64 pixels.
| int32_t bragi_kerning | ( | const bragi_face_t * | face, |
| int | left, | ||
| int | right ) |
the kerning between two glyphs of the same face, in 1/64 pixels.
| const bragi_glyph_t * bragi_glyph | ( | bragi_face_t * | face, |
| int | glyph, | ||
| int | subpixel ) |
a glyph image from the cache, made if it is not there.
| subpixel | 0 to BRAGI_SUBPIXELS - 1. |
| void bragi_blend_mask | ( | gfx_buffer_t * | buf, |
| int32_t | x, | ||
| int32_t | y, | ||
| const uint8_t * | mask, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | stride, | ||
| gfx_color_t | color ) |
blend a coverage mask in a colour over buf (in sRGB, as browsers do).
| color | premultiplied; its alpha scales the coverage. |