summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/fontconfig-user.sgml2
-rw-r--r--fontconfig/fontconfig.h2
-rw-r--r--src/fcfreetype.c8
-rw-r--r--src/fcname.c2
4 files changed, 13 insertions, 1 deletions
diff --git a/doc/fontconfig-user.sgml b/doc/fontconfig-user.sgml
index 775d1f72..b54ba7a1 100644
--- a/doc/fontconfig-user.sgml
+++ b/doc/fontconfig-user.sgml
@@ -473,6 +473,8 @@ symbolic names for common font values:
extralight weight 40
ultralight weight 40
light weight 50
+ demilight weight 65
+ semilight weight 65
book weight 75
regular weight 80
normal weight 80
diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
index 8575cc4d..1f26cb40 100644
--- a/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig.h
@@ -131,6 +131,8 @@ typedef int FcBool;
#define FC_WEIGHT_EXTRALIGHT 40
#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT
#define FC_WEIGHT_LIGHT 50
+#define FC_WEIGHT_DEMILIGHT 65
+#define FC_WEIGHT_SEMILIGHT FC_WEIGHT_DEMILIGHT
#define FC_WEIGHT_BOOK 75
#define FC_WEIGHT_REGULAR 80
#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 000b1010..0e1ff5d3 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1095,6 +1095,8 @@ static const FcStringConst weightConsts[] = {
{ (FC8) "thin", FC_WEIGHT_THIN },
{ (FC8) "extralight", FC_WEIGHT_EXTRALIGHT },
{ (FC8) "ultralight", FC_WEIGHT_ULTRALIGHT },
+ { (FC8) "demilight", FC_WEIGHT_DEMILIGHT },
+ { (FC8) "semilight", FC_WEIGHT_SEMILIGHT },
{ (FC8) "light", FC_WEIGHT_LIGHT },
{ (FC8) "book", FC_WEIGHT_BOOK },
{ (FC8) "regular", FC_WEIGHT_REGULAR },
@@ -1632,8 +1634,12 @@ FcFreeTypeQueryFace (const FT_Face face,
weight = FC_WEIGHT_THIN;
else if (os2->usWeightClass < 250)
weight = FC_WEIGHT_EXTRALIGHT;
- else if (os2->usWeightClass < 350)
+ else if (os2->usWeightClass < 325)
weight = FC_WEIGHT_LIGHT;
+ else if (os2->usWeightClass < 365)
+ weight = FC_WEIGHT_SEMILIGHT;
+ else if (os2->usWeightClass < 390)
+ weight = FC_WEIGHT_BOOK;
else if (os2->usWeightClass < 450)
weight = FC_WEIGHT_REGULAR;
else if (os2->usWeightClass < 550)
diff --git a/src/fcname.c b/src/fcname.c
index 46661787..1d8fe757 100644
--- a/src/fcname.c
+++ b/src/fcname.c
@@ -136,6 +136,8 @@ static const FcConstant _FcBaseConstants[] = {
{ (FcChar8 *) "thin", "weight", FC_WEIGHT_THIN, },
{ (FcChar8 *) "extralight", "weight", FC_WEIGHT_EXTRALIGHT, },
{ (FcChar8 *) "ultralight", "weight", FC_WEIGHT_EXTRALIGHT, },
+ { (FcChar8 *) "demilight", "weight", FC_WEIGHT_DEMILIGHT, },
+ { (FcChar8 *) "semilight", "weight", FC_WEIGHT_DEMILIGHT, },
{ (FcChar8 *) "light", "weight", FC_WEIGHT_LIGHT, },
{ (FcChar8 *) "book", "weight", FC_WEIGHT_BOOK, },
{ (FcChar8 *) "regular", "weight", FC_WEIGHT_REGULAR, },