font: add font_glyph_for_utf8()

This function fills in a struct glyph with glyph bitmap data for the
provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo
surface).
This commit is contained in:
Daniel Eklöf 2019-07-28 20:37:59 +02:00
parent 175dc9cf94
commit 9e57ba2108
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 94 additions and 76 deletions

View file

@ -206,9 +206,11 @@ struct primary {
uint32_t serial;
};
struct glyph_cache {
cairo_glyph_t *glyphs;
int count;
struct glyph {
void *data;
cairo_surface_t *surf;
int left;
int top;
};
struct font {