]> git.wh0rd.org Git - fontconfig.git/commitdiff
Add a FC_HINT_STYLE key for patterns, with possible values
authorOwen Taylor <otaylor@redhat.com>
Tue, 23 Sep 2003 20:12:20 +0000 (20:12 +0000)
committerOwen Taylor <otaylor@redhat.com>
Tue, 23 Sep 2003 20:12:20 +0000 (20:12 +0000)
    HINT_NONE/HINT_SLIGHT/HINT_MEDIUM/HINT_FULL. (Bug #117)

ChangeLog
fontconfig/fontconfig.h
src/fcdefault.c
src/fcname.c

index 2adb4c3733c5b3a722c2e8ff659201812eb974d2..cc86d87daa7dc5a16af8272cf79ecea222b4f380 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-09-23  Owen Taylor <otaylor@redhat.com>
+
+       * fontconfig/fontconfig.h  src/fcdefault.c (FcDefaultSubstitute)
+       src/fcname.c: Add a FC_HINT_STYLE key for patterns, with
+       possible values HINT_NONE/HINT_SLIGHT/HINT_MEDIUM/HINT_FULL.
+       (Bug #117)
+
 2003-09-23  Owen Taylor <otaylor@redhat.com>
 
        * fc-lang/ka.orth: Remove Georgian capitals, they
index cb5f95f3ac79dc94d1e90b057b5ede939b1d738c..3e0237d878bfb8205ba3317007eba461572f35d4 100644 (file)
@@ -70,6 +70,7 @@ typedef int           FcBool;
 #define FC_FOUNDRY         "foundry"           /* String */
 #define FC_ANTIALIAS       "antialias"         /* Bool (depends) */
 #define FC_HINTING         "hinting"           /* Bool (true) */
+#define FC_HINT_STYLE      "hintstyle"         /* Int */
 #define FC_VERTICAL_LAYOUT  "verticallayout"   /* Bool (false) */
 #define FC_AUTOHINT        "autohint"          /* Bool (false) */
 #define FC_GLOBAL_ADVANCE   "globaladvance"    /* Bool (true) */
@@ -140,6 +141,12 @@ typedef int                FcBool;
 #define FC_RGBA_VBGR       4
 #define FC_RGBA_NONE       5
 
+/* hinting style */
+#define FC_HINT_NONE        0
+#define FC_HINT_SLIGHT      1
+#define FC_HINT_MEDIUM      2
+#define FC_HINT_FULL        3
 typedef enum _FcType {
     FcTypeVoid, 
     FcTypeInteger, 
index b070ea8430eb38d2fedb82db2a89461c424f4260..39cf27dfd7077d690c262a734bbdac988bd58152 100644 (file)
@@ -144,4 +144,9 @@ FcDefaultSubstitute (FcPattern *pattern)
     {
        FcPatternAddInteger (pattern, FC_FONTVERSION, 0x7fffffff);
     }
+
+    if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch)
+    {
+       FcPatternAddInteger (pattern, FC_HINT_STYLE, FC_HINT_FULL);
+    }
 }
index b15b8fb6702845e76083e9873160baaf33f5ad69..c1df41b5fa43ada5c71d16070adce41cb24db5e4 100644 (file)
@@ -41,6 +41,7 @@ static const FcObjectType _FcBaseObjectTypes[] = {
     { FC_FOUNDRY,      FcTypeString, },
 /*    { FC_CORE,               FcTypeBool, }, */
     { FC_ANTIALIAS,    FcTypeBool, },
+    { FC_HINT_STYLE,    FcTypeInteger, },
     { FC_HINTING,      FcTypeBool, },
     { FC_VERTICAL_LAYOUT,   FcTypeBool, },
     { FC_AUTOHINT,     FcTypeBool, },
@@ -177,6 +178,11 @@ static const FcConstant _FcBaseConstants[] = {
     { (FcChar8 *) "vrgb",          "rgba",         FC_RGBA_VRGB },
     { (FcChar8 *) "vbgr",          "rgba",         FC_RGBA_VBGR },
     { (FcChar8 *) "none",          "rgba",         FC_RGBA_NONE },
+
+    { (FcChar8 *) "hintnone",      "hintstyle",   FC_HINT_NONE },
+    { (FcChar8 *) "hintslight",            "hintstyle",   FC_HINT_SLIGHT },
+    { (FcChar8 *) "hintmedium",            "hintstyle",   FC_HINT_MEDIUM },
+    { (FcChar8 *) "hintfull",      "hintstyle",   FC_HINT_FULL },
 };
 
 #define NUM_FC_CONSTANTS   (sizeof _FcBaseConstants/sizeof _FcBaseConstants[0])