From ef258807ec53ed9639dd68e897de98dbe81f408c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 10 Jan 2007 18:14:16 +0000 Subject: Handle FONT_WEIGHT_INHERIT. 2007-01-10 Bruno Haible * cr-fonts.c (cr_font_weight_get_bolder): Handle FONT_WEIGHT_INHERIT. svn path=/trunk/; revision=311 --- src/cr-fonts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cr-fonts.c b/src/cr-fonts.c index 35c57ad..94c4f2c 100644 --- a/src/cr-fonts.c +++ b/src/cr-fonts.c @@ -766,7 +766,10 @@ cr_font_variant_to_string (enum CRFontVariant a_code) enum CRFontWeight cr_font_weight_get_bolder (enum CRFontWeight a_weight) { - if (a_weight >= FONT_WEIGHT_900) { + if (a_weight == FONT_WEIGHT_INHERIT) { + cr_utils_trace_info ("can't return a bolder weight for FONT_WEIGHT_INHERIT") ; + return a_weight; + } else if (a_weight >= FONT_WEIGHT_900) { return FONT_WEIGHT_900 ; } else if (a_weight < FONT_WEIGHT_NORMAL) { return FONT_WEIGHT_NORMAL ; -- cgit v1.2.1