summaryrefslogtreecommitdiff
path: root/src/cr-fonts.c
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2007-01-09 17:07:18 +0000
committerDom Lachowicz <doml@src.gnome.org>2007-01-09 17:07:18 +0000
commit8bd67a9630e9997126ac2a1cc272a97ec39dd947 (patch)
treeaa51a20ec6968b61b48b4d98f2fea620ec983eae /src/cr-fonts.c
parent1134e3843d5d9f05c8a58196aeeb1f731ee066c0 (diff)
downloadlibcroco-8bd67a9630e9997126ac2a1cc272a97ec39dd947.tar.gz
gives syntax errors when included twice the return value of
2007-01-09 Dom Lachowicz <domlachowicz@gmail.com> * src/cr-fonts.h: gives syntax errors when included twice * src/cr-fonts.c: the return value of cr_font_family_prepend() should be "the font family list", not CR_OK which is the same as NULL. * src/cr-fonts.c: the logic of cr_font_weight_get_bolder does not take into account the FONT_WEIGHT_INHERIT value, and the shift by 1 can yield out-of-range values. Partial fix svn path=/trunk/; revision=307
Diffstat (limited to 'src/cr-fonts.c')
-rw-r--r--src/cr-fonts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cr-fonts.c b/src/cr-fonts.c
index 9e35128..35c57ad 100644
--- a/src/cr-fonts.c
+++ b/src/cr-fonts.c
@@ -285,7 +285,7 @@ cr_font_family_prepend (CRFontFamily * a_this,
a_family_to_prepend->next = a_this;
a_this->prev = a_family_to_prepend;
- return CR_OK;
+ return a_family_to_prepend;
}
/**
@@ -766,7 +766,7 @@ cr_font_variant_to_string (enum CRFontVariant a_code)
enum CRFontWeight
cr_font_weight_get_bolder (enum CRFontWeight a_weight)
{
- if (a_weight >= NB_FONT_WEIGHTS) {
+ if (a_weight >= FONT_WEIGHT_900) {
return FONT_WEIGHT_900 ;
} else if (a_weight < FONT_WEIGHT_NORMAL) {
return FONT_WEIGHT_NORMAL ;