aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-18 08:03:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-18 08:03:08 +0000
commitdf929a251a2b40573ae47e3ea534532a0696b605 (patch)
tree82c0593fa7579c366ce9083a14e406845f8445ce
parentrender: time how long time it takes to render a frame (diff)
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.
-rw-r--r--font.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/font.c b/font.c
index 3cb5b597..4d8bd65f 100644
--- a/font.c
+++ b/font.c
@@ -54,15 +54,11 @@ font_from_name(const char *name)
}
FcBool fc_hinting, fc_antialias;
- if (FcPatternGetBool(final_pattern, FC_HINTING,0, &fc_hinting) != FcResultMatch) {
- LOG_WARN("failed to get fontconfig hinting style");
+ if (FcPatternGetBool(final_pattern, FC_HINTING,0, &fc_hinting) != FcResultMatch)
fc_hinting = FcTrue;
- }
- if (FcPatternGetBool(final_pattern, FC_ANTIALIAS, 0, &fc_antialias) != FcResultMatch) {
- LOG_WARN("failed to get fontconfig antialias");
+ if (FcPatternGetBool(final_pattern, FC_ANTIALIAS, 0, &fc_antialias) != FcResultMatch)
fc_antialias = FcTrue;
- }
cairo_font_options_set_hint_style(
options, fc_hinting ? CAIRO_HINT_STYLE_DEFAULT : CAIRO_HINT_STYLE_NONE);