mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
font: don't warn when failing to get hinting/antialias
These properties aren't always included in the pattern, and when they aren't, trying to get them will fail. This isn't an error, just fallback to a default value.
This commit is contained in:
parent
0ca20e3e6c
commit
df929a251a
1 changed files with 2 additions and 6 deletions
8
font.c
8
font.c
|
|
@ -54,15 +54,11 @@ font_from_name(const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
FcBool fc_hinting, fc_antialias;
|
FcBool fc_hinting, fc_antialias;
|
||||||
if (FcPatternGetBool(final_pattern, FC_HINTING,0, &fc_hinting) != FcResultMatch) {
|
if (FcPatternGetBool(final_pattern, FC_HINTING,0, &fc_hinting) != FcResultMatch)
|
||||||
LOG_WARN("failed to get fontconfig hinting style");
|
|
||||||
fc_hinting = FcTrue;
|
fc_hinting = FcTrue;
|
||||||
}
|
|
||||||
|
|
||||||
if (FcPatternGetBool(final_pattern, FC_ANTIALIAS, 0, &fc_antialias) != FcResultMatch) {
|
if (FcPatternGetBool(final_pattern, FC_ANTIALIAS, 0, &fc_antialias) != FcResultMatch)
|
||||||
LOG_WARN("failed to get fontconfig antialias");
|
|
||||||
fc_antialias = FcTrue;
|
fc_antialias = FcTrue;
|
||||||
}
|
|
||||||
|
|
||||||
cairo_font_options_set_hint_style(
|
cairo_font_options_set_hint_style(
|
||||||
options, fc_hinting ? CAIRO_HINT_STYLE_DEFAULT : CAIRO_HINT_STYLE_NONE);
|
options, fc_hinting ? CAIRO_HINT_STYLE_DEFAULT : CAIRO_HINT_STYLE_NONE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue