|
|
|
@ -51,7 +51,7 @@ struct font_options_t : face_options_t |
|
|
|
|
|
|
|
|
|
void add_options (option_parser_t *parser); |
|
|
|
|
|
|
|
|
|
hb_font_t *get_font () const; |
|
|
|
|
void post_parse (GError **error); |
|
|
|
|
|
|
|
|
|
hb_variation_t *variations = nullptr; |
|
|
|
|
unsigned int num_variations = 0; |
|
|
|
@ -64,8 +64,7 @@ struct font_options_t : face_options_t |
|
|
|
|
char *font_funcs = nullptr; |
|
|
|
|
int ft_load_flags = 2; |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
mutable hb_font_t *font = nullptr; |
|
|
|
|
hb_font_t *font = nullptr; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -80,12 +79,10 @@ static struct supported_font_funcs_t { |
|
|
|
|
{"ot", hb_ot_font_set_funcs}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
hb_font_t * |
|
|
|
|
font_options_t::get_font () const |
|
|
|
|
{ |
|
|
|
|
if (font) |
|
|
|
|
return font; |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
font_options_t::post_parse (GError **error) |
|
|
|
|
{ |
|
|
|
|
font = hb_font_create (face); |
|
|
|
|
|
|
|
|
|
if (font_size_x == FONT_SIZE_UPEM) |
|
|
|
@ -137,8 +134,6 @@ font_options_t::get_font () const |
|
|
|
|
#ifdef HAVE_FREETYPE |
|
|
|
|
hb_ft_font_set_load_flags (font, ft_load_flags); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
return font; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|