summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-05-01 14:31:04 +0000
committerKeith Packard <keithp@keithp.com>2003-05-01 14:31:04 +0000
commit3760a63825f931b7d5ef44b991c83f597b50f1a4 (patch)
treea69ff848a6f2974e296d000ca0949e1ea2b3d539
parent1af9b7b4d945b1f15ea5c2d9a20cfecef4f3e199 (diff)
Add demi and book postscript weight names. Allow spaces in postscript and X
matching
-rw-r--r--src/fcfreetype.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 3ee7b50..f46e139 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -747,10 +747,12 @@ FcFreeTypeQuery (const FcChar8 *file,
{ "extralight", FC_WEIGHT_EXTRALIGHT },
{ "ultralight", FC_WEIGHT_ULTRALIGHT },
{ "light", FC_WEIGHT_LIGHT },
+ { "book", FC_WEIGHT_BOOK },
{ "regular", FC_WEIGHT_REGULAR },
{ "normal", FC_WEIGHT_NORMAL },
{ "medium", FC_WEIGHT_MEDIUM },
{ "demibold", FC_WEIGHT_DEMIBOLD },
+ { "demi", FC_WEIGHT_DEMIBOLD },
{ "semibold", FC_WEIGHT_SEMIBOLD },
{ "bold", FC_WEIGHT_BOLD },
{ "extrabold", FC_WEIGHT_EXTRABOLD },
@@ -761,7 +763,7 @@ FcFreeTypeQuery (const FcChar8 *file,
#define NUM_PS_WEIGHTS (sizeof (ps_weights) / sizeof (ps_weights[0]))
int w;
for (w = 0; w < NUM_PS_WEIGHTS; w++)
- if (!FcStrCmpIgnoreCase ((FcChar8 *) ps_weights[w].name,
+ if (!FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) ps_weights[w].name,
(FcChar8 *) psfontinfo.weight))
{
weight = ps_weights[w].value;
@@ -845,7 +847,7 @@ FcFreeTypeQuery (const FcChar8 *file,
if (FcDebug () & FC_DBG_SCANV)
printf ("\nsetwidth: %s\n", prop.u.atom);
for (i = 0; i < sizeof (FcSetWidths) / sizeof (FcSetWidths[0]); i++)
- if (!FcStrCmpIgnoreCase ((FcChar8 *) prop.u.atom,
+ if (!FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) prop.u.atom,
FcSetWidths[i].width_name))
{
width = FcSetWidths[i].width;