[autofit] Start implementing hinting direction (up/down, down/up).
Right now, it does nothing. * src/autofit/afscript.h: Add another parameter to `SCRIPT', specifying hinting direction. * src/autofit/afglobal.c, scr/autofit/afglobal.h, src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c, src/autofit/aftypes.h: Extend `SCRIPT' definitions.
This commit is contained in:
parent
9c1a2b0439
commit
b0de5a82f1
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2015-12-23 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[autofit] Start implementing hinting direction (up/down, down/up).
|
||||||
|
|
||||||
|
Right now, it does nothing.
|
||||||
|
|
||||||
|
* src/autofit/afscript.h: Add another parameter to `SCRIPT',
|
||||||
|
specifying hinting direction.
|
||||||
|
|
||||||
|
* src/autofit/afglobal.c, scr/autofit/afglobal.h,
|
||||||
|
src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
|
||||||
|
src/autofit/aftypes.h: Extend `SCRIPT' definitions.
|
||||||
|
|
||||||
2015-12-22 Werner Lemberg <wl@gnu.org>
|
2015-12-22 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
|
* src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
AF_DEFINE_SCRIPT_CLASS( \
|
AF_DEFINE_SCRIPT_CLASS( \
|
||||||
af_ ## s ## _script_class, \
|
af_ ## s ## _script_class, \
|
||||||
AF_SCRIPT_ ## S, \
|
AF_SCRIPT_ ## S, \
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
&af_ ## s ## _script_class,
|
&af_ ## s ## _script_class,
|
||||||
|
|
||||||
FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
|
FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
|
||||||
|
|
|
@ -34,7 +34,7 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )
|
AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )
|
||||||
|
|
||||||
#include "afscript.h"
|
#include "afscript.h"
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
#include "afwrtsys.h"
|
#include "afwrtsys.h"
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, sss ) \
|
#define SCRIPT( s, S, d, h, H, sss ) \
|
||||||
FT_Init_Class_af_ ## s ## _script_class( \
|
FT_Init_Class_af_ ## s ## _script_class( \
|
||||||
&container->af_script_classes_rec[ss++] );
|
&container->af_script_classes_rec[ss++] );
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
FT_BEGIN_HEADER
|
FT_BEGIN_HEADER
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
extern const AF_Script_UniRangeRec af_ ## s ## _uniranges[];
|
extern const AF_Script_UniRangeRec af_ ## s ## _uniranges[];
|
||||||
|
|
||||||
#include "afscript.h"
|
#include "afscript.h"
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
extern const AF_Script_UniRangeRec af_ ## s ## _nonbase_uniranges[];
|
extern const AF_Script_UniRangeRec af_ ## s ## _nonbase_uniranges[];
|
||||||
|
|
||||||
#include "afscript.h"
|
#include "afscript.h"
|
||||||
|
|
|
@ -33,85 +33,101 @@
|
||||||
SCRIPT( arab, ARAB,
|
SCRIPT( arab, ARAB,
|
||||||
"Arabic",
|
"Arabic",
|
||||||
HB_SCRIPT_ARABIC,
|
HB_SCRIPT_ARABIC,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xD9\x84 \xD8\xAD \xD9\x80" ) /* ل ح ـ */
|
"\xD9\x84 \xD8\xAD \xD9\x80" ) /* ل ح ـ */
|
||||||
|
|
||||||
/* there are no simple forms for letters; we thus use two digit shapes */
|
/* there are no simple forms for letters; we thus use two digit shapes */
|
||||||
SCRIPT( beng, BENG,
|
SCRIPT( beng, BENG,
|
||||||
"Bengali",
|
"Bengali",
|
||||||
HB_SCRIPT_BENGALI,
|
HB_SCRIPT_BENGALI,
|
||||||
|
HINTING_TOP_TO_BOTTOM,
|
||||||
"\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪*/
|
"\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪*/
|
||||||
|
|
||||||
SCRIPT( cyrl, CYRL,
|
SCRIPT( cyrl, CYRL,
|
||||||
"Cyrillic",
|
"Cyrillic",
|
||||||
HB_SCRIPT_CYRILLIC,
|
HB_SCRIPT_CYRILLIC,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xD0\xBE \xD0\x9E" ) /* о О */
|
"\xD0\xBE \xD0\x9E" ) /* о О */
|
||||||
|
|
||||||
SCRIPT( deva, DEVA,
|
SCRIPT( deva, DEVA,
|
||||||
"Devanagari",
|
"Devanagari",
|
||||||
HB_SCRIPT_DEVANAGARI,
|
HB_SCRIPT_DEVANAGARI,
|
||||||
|
HINTING_TOP_TO_BOTTOM,
|
||||||
"\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */
|
"\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */
|
||||||
|
|
||||||
SCRIPT( grek, GREK,
|
SCRIPT( grek, GREK,
|
||||||
"Greek",
|
"Greek",
|
||||||
HB_SCRIPT_GREEK,
|
HB_SCRIPT_GREEK,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xCE\xBF \xCE\x9F" ) /* ο Ο */
|
"\xCE\xBF \xCE\x9F" ) /* ο Ο */
|
||||||
|
|
||||||
SCRIPT( hebr, HEBR,
|
SCRIPT( hebr, HEBR,
|
||||||
"Hebrew",
|
"Hebrew",
|
||||||
HB_SCRIPT_HEBREW,
|
HB_SCRIPT_HEBREW,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xD7\x9D" ) /* ם */
|
"\xD7\x9D" ) /* ם */
|
||||||
|
|
||||||
/* only digit zero has a simple shape in the Khmer script */
|
/* only digit zero has a simple shape in the Khmer script */
|
||||||
SCRIPT( khmr, KHMR,
|
SCRIPT( khmr, KHMR,
|
||||||
"Khmer",
|
"Khmer",
|
||||||
HB_SCRIPT_KHMER,
|
HB_SCRIPT_KHMER,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE1\x9F\xA0" ) /* ០ */
|
"\xE1\x9F\xA0" ) /* ០ */
|
||||||
|
|
||||||
SCRIPT( khms, KHMS,
|
SCRIPT( khms, KHMS,
|
||||||
"Khmer Symbols",
|
"Khmer Symbols",
|
||||||
HB_SCRIPT_INVALID,
|
HB_SCRIPT_INVALID,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE1\xA7\xA1 \xE1\xA7\xAA" ) /* ᧡ ᧪ */
|
"\xE1\xA7\xA1 \xE1\xA7\xAA" ) /* ᧡ ᧪ */
|
||||||
|
|
||||||
/* only digit zero has a simple shape in the Lao script */
|
/* only digit zero has a simple shape in the Lao script */
|
||||||
SCRIPT( lao, LAO,
|
SCRIPT( lao, LAO,
|
||||||
"Lao",
|
"Lao",
|
||||||
HB_SCRIPT_LAO,
|
HB_SCRIPT_LAO,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE0\xBB\x90" ) /* ໐ */
|
"\xE0\xBB\x90" ) /* ໐ */
|
||||||
|
|
||||||
SCRIPT( latn, LATN,
|
SCRIPT( latn, LATN,
|
||||||
"Latin",
|
"Latin",
|
||||||
HB_SCRIPT_LATIN,
|
HB_SCRIPT_LATIN,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o O 0" )
|
"o O 0" )
|
||||||
|
|
||||||
SCRIPT( latb, LATB,
|
SCRIPT( latb, LATB,
|
||||||
"Latin Subscript Fallback",
|
"Latin Subscript Fallback",
|
||||||
HB_SCRIPT_INVALID,
|
HB_SCRIPT_INVALID,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE2\x82\x92 \xE2\x82\x80" ) /* ₒ ₀ */
|
"\xE2\x82\x92 \xE2\x82\x80" ) /* ₒ ₀ */
|
||||||
|
|
||||||
SCRIPT( latp, LATP,
|
SCRIPT( latp, LATP,
|
||||||
"Latin Superscript Fallback",
|
"Latin Superscript Fallback",
|
||||||
HB_SCRIPT_INVALID,
|
HB_SCRIPT_INVALID,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */
|
"\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */
|
||||||
|
|
||||||
SCRIPT( mymr, MYMR,
|
SCRIPT( mymr, MYMR,
|
||||||
"Myanmar",
|
"Myanmar",
|
||||||
HB_SCRIPT_MYANMAR,
|
HB_SCRIPT_MYANMAR,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */
|
"\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */
|
||||||
|
|
||||||
SCRIPT( none, NONE,
|
SCRIPT( none, NONE,
|
||||||
"no script",
|
"no script",
|
||||||
HB_SCRIPT_INVALID,
|
HB_SCRIPT_INVALID,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"" )
|
"" )
|
||||||
|
|
||||||
/* there are no simple forms for letters; we thus use two digit shapes */
|
/* there are no simple forms for letters; we thus use two digit shapes */
|
||||||
SCRIPT( telu, TELU,
|
SCRIPT( telu, TELU,
|
||||||
"Telugu",
|
"Telugu",
|
||||||
HB_SCRIPT_TELUGU,
|
HB_SCRIPT_TELUGU,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE0\xB1\xA6 \xE0\xB1\xA7" ) /* ౦ ౧ */
|
"\xE0\xB1\xA6 \xE0\xB1\xA7" ) /* ౦ ౧ */
|
||||||
|
|
||||||
SCRIPT( thai, THAI,
|
SCRIPT( thai, THAI,
|
||||||
"Thai",
|
"Thai",
|
||||||
HB_SCRIPT_THAI,
|
HB_SCRIPT_THAI,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */
|
"\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */
|
||||||
|
|
||||||
#ifdef AF_CONFIG_OPTION_INDIC
|
#ifdef AF_CONFIG_OPTION_INDIC
|
||||||
|
@ -119,56 +135,67 @@
|
||||||
SCRIPT( gujr, GUJR,
|
SCRIPT( gujr, GUJR,
|
||||||
"Gujarati",
|
"Gujarati",
|
||||||
HB_SCRIPT_GUJARATI,
|
HB_SCRIPT_GUJARATI,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( guru, GURU,
|
SCRIPT( guru, GURU,
|
||||||
"Gurmukhi",
|
"Gurmukhi",
|
||||||
HB_SCRIPT_GURMUKHI,
|
HB_SCRIPT_GURMUKHI,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( knda, KNDA,
|
SCRIPT( knda, KNDA,
|
||||||
"Kannada",
|
"Kannada",
|
||||||
HB_SCRIPT_KANNADA,
|
HB_SCRIPT_KANNADA,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( limb, LIMB,
|
SCRIPT( limb, LIMB,
|
||||||
"Limbu",
|
"Limbu",
|
||||||
HB_SCRIPT_LIMBU,
|
HB_SCRIPT_LIMBU,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( mlym, MLYM,
|
SCRIPT( mlym, MLYM,
|
||||||
"Malayalam",
|
"Malayalam",
|
||||||
HB_SCRIPT_MALAYALAM,
|
HB_SCRIPT_MALAYALAM,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( orya, ORYA,
|
SCRIPT( orya, ORYA,
|
||||||
"Oriya",
|
"Oriya",
|
||||||
HB_SCRIPT_ORIYA,
|
HB_SCRIPT_ORIYA,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( sinh, SINH,
|
SCRIPT( sinh, SINH,
|
||||||
"Sinhala",
|
"Sinhala",
|
||||||
HB_SCRIPT_SINHALA,
|
HB_SCRIPT_SINHALA,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( sund, SUND,
|
SCRIPT( sund, SUND,
|
||||||
"Sundanese",
|
"Sundanese",
|
||||||
HB_SCRIPT_SUNDANESE,
|
HB_SCRIPT_SUNDANESE,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( sylo, SYLO,
|
SCRIPT( sylo, SYLO,
|
||||||
"Syloti Nagri",
|
"Syloti Nagri",
|
||||||
HB_SCRIPT_SYLOTI_NAGRI,
|
HB_SCRIPT_SYLOTI_NAGRI,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( taml, TAML,
|
SCRIPT( taml, TAML,
|
||||||
"Tamil",
|
"Tamil",
|
||||||
HB_SCRIPT_TAMIL,
|
HB_SCRIPT_TAMIL,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
SCRIPT( tibt, TIBT,
|
SCRIPT( tibt, TIBT,
|
||||||
"Tibetan",
|
"Tibetan",
|
||||||
HB_SCRIPT_TIBETAN,
|
HB_SCRIPT_TIBETAN,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"o" ) /* XXX */
|
"o" ) /* XXX */
|
||||||
|
|
||||||
#endif /* AF_CONFIG_OPTION_INDIC */
|
#endif /* AF_CONFIG_OPTION_INDIC */
|
||||||
|
@ -178,6 +205,7 @@
|
||||||
SCRIPT( hani, HANI,
|
SCRIPT( hani, HANI,
|
||||||
"CJKV ideographs",
|
"CJKV ideographs",
|
||||||
HB_SCRIPT_HAN,
|
HB_SCRIPT_HAN,
|
||||||
|
HINTING_BOTTOM_TO_TOP,
|
||||||
"\xE7\x94\xB0 \xE5\x9B\x97" ) /* 田 囗 */
|
"\xE7\x94\xB0 \xE5\x9B\x97" ) /* 田 囗 */
|
||||||
|
|
||||||
#endif /* AF_CONFIG_OPTION_CJK */
|
#endif /* AF_CONFIG_OPTION_CJK */
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
/* load HarfBuzz script tags */
|
/* load HarfBuzz script tags */
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) h,
|
#define SCRIPT( s, S, d, h, H, ss ) h,
|
||||||
|
|
||||||
|
|
||||||
static const hb_script_t scripts[] =
|
static const hb_script_t scripts[] =
|
||||||
|
|
|
@ -309,7 +309,7 @@ extern void* _af_debug_hints;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef SCRIPT
|
#undef SCRIPT
|
||||||
#define SCRIPT( s, S, d, h, ss ) \
|
#define SCRIPT( s, S, d, h, H, ss ) \
|
||||||
AF_SCRIPT_ ## S,
|
AF_SCRIPT_ ## S,
|
||||||
|
|
||||||
/* The list of known scripts. */
|
/* The list of known scripts. */
|
||||||
|
|
Loading…
Reference in New Issue