Add a FC_HINT_STYLE key for patterns, with possible values

HINT_NONE/HINT_SLIGHT/HINT_MEDIUM/HINT_FULL. (Bug #117)
This commit is contained in:
Owen Taylor 2003-09-23 20:12:20 +00:00
parent 44f59f7168
commit f077d662c0
4 changed files with 25 additions and 0 deletions

View File

@ -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

View 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,

View 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);
}
}

View 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])