diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-09-23 20:12:20 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2003-09-23 20:12:20 +0000 |
commit | f077d662c001468eb2aa1261549accd9ff3de401 (patch) | |
tree | 81b12ea6296b32ecedf5cc522d4ac0b37dc6083e | |
parent | 44f59f71688d557b75a94e2a8786ec5ae80308ae (diff) |
Add a FC_HINT_STYLE key for patterns, with possible values
HINT_NONE/HINT_SLIGHT/HINT_MEDIUM/HINT_FULL. (Bug #117)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | fontconfig/fontconfig.h | 7 | ||||
-rw-r--r-- | src/fcdefault.c | 5 | ||||
-rw-r--r-- | src/fcname.c | 6 |
4 files changed, 25 insertions, 0 deletions
@@ -1,5 +1,12 @@ 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 aren't used for normal writing. (Bug #116) diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index cb5f95f..3e0237d 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -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, diff --git a/src/fcdefault.c b/src/fcdefault.c index b070ea8..39cf27d 100644 --- a/src/fcdefault.c +++ b/src/fcdefault.c @@ -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); + } } diff --git a/src/fcname.c b/src/fcname.c index b15b8fb..c1df41b 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -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]) |