mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-28 07:58:00 -04:00
font: initial support for fontconfig font fallback
When we've exhausted our own fallback list, try the font list provided by fontconfig. This means, the user's fallback fonts have priority, but in case all of them fail, we hopefully get lucky with fontconfig...
This commit is contained in:
parent
75830ba016
commit
92319d1570
2 changed files with 124 additions and 46 deletions
5
font.h
5
font.h
|
|
@ -6,6 +6,7 @@
|
|||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_LCD_FILTER_H
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include <cairo.h>
|
||||
|
||||
#include "tllist.h"
|
||||
|
|
@ -28,6 +29,10 @@ struct glyph {
|
|||
typedef tll(struct glyph) hash_entry_t;
|
||||
|
||||
struct font {
|
||||
FcPattern *fc_pattern;
|
||||
FcFontSet *fc_fonts;
|
||||
int fc_idx;
|
||||
|
||||
FT_Face face;
|
||||
int load_flags;
|
||||
int render_flags;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue