[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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
diff --git a/ChangeLog b/ChangeLog
index 489a583..11dcdbc 100644
--- a/ChangeLog
+++ b/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>
* src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 3223358..39ea9bb 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -42,7 +42,7 @@
#undef SCRIPT
-#define SCRIPT( s, S, d, h, ss ) \
+#define SCRIPT( s, S, d, h, H, ss ) \
AF_DEFINE_SCRIPT_CLASS( \
af_ ## s ## _script_class, \
AF_SCRIPT_ ## S, \
@@ -83,7 +83,7 @@
#undef SCRIPT
-#define SCRIPT( s, S, d, h, ss ) \
+#define SCRIPT( s, S, d, h, H, ss ) \
&af_ ## s ## _script_class,
FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index 5b4e439..00441fa 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -34,7 +34,7 @@ FT_BEGIN_HEADER
#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 )
#include "afscript.h"
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index 37254a2..640f9d6 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -122,7 +122,7 @@
#include "afwrtsys.h"
#undef SCRIPT
-#define SCRIPT( s, S, d, h, sss ) \
+#define SCRIPT( s, S, d, h, H, sss ) \
FT_Init_Class_af_ ## s ## _script_class( \
&container->af_script_classes_rec[ss++] );
diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h
index bca5084..4165d26 100644
--- a/src/autofit/afranges.h
+++ b/src/autofit/afranges.h
@@ -26,13 +26,13 @@
FT_BEGIN_HEADER
#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[];
#include "afscript.h"
#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[];
#include "afscript.h"
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index f9b40de..92a8b0c 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -33,85 +33,101 @@
SCRIPT( arab, ARAB,
"Arabic",
HB_SCRIPT_ARABIC,
+ HINTING_BOTTOM_TO_TOP,
"\xD9\x84 \xD8\xAD \xD9\x80" ) /* ل ح ـ */
/* there are no simple forms for letters; we thus use two digit shapes */
SCRIPT( beng, BENG,
"Bengali",
HB_SCRIPT_BENGALI,
+ HINTING_TOP_TO_BOTTOM,
"\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪*/
SCRIPT( cyrl, CYRL,
"Cyrillic",
HB_SCRIPT_CYRILLIC,
+ HINTING_BOTTOM_TO_TOP,
"\xD0\xBE \xD0\x9E" ) /* о О */
SCRIPT( deva, DEVA,
"Devanagari",
HB_SCRIPT_DEVANAGARI,
+ HINTING_TOP_TO_BOTTOM,
"\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */
SCRIPT( grek, GREK,
"Greek",
HB_SCRIPT_GREEK,
+ HINTING_BOTTOM_TO_TOP,
"\xCE\xBF \xCE\x9F" ) /* ο Ο */
SCRIPT( hebr, HEBR,
"Hebrew",
HB_SCRIPT_HEBREW,
+ HINTING_BOTTOM_TO_TOP,
"\xD7\x9D" ) /* ם */
/* only digit zero has a simple shape in the Khmer script */
SCRIPT( khmr, KHMR,
"Khmer",
HB_SCRIPT_KHMER,
+ HINTING_BOTTOM_TO_TOP,
"\xE1\x9F\xA0" ) /* ០ */
SCRIPT( khms, KHMS,
"Khmer Symbols",
HB_SCRIPT_INVALID,
+ HINTING_BOTTOM_TO_TOP,
"\xE1\xA7\xA1 \xE1\xA7\xAA" ) /* ᧡ ᧪ */
/* only digit zero has a simple shape in the Lao script */
SCRIPT( lao, LAO,
"Lao",
HB_SCRIPT_LAO,
+ HINTING_BOTTOM_TO_TOP,
"\xE0\xBB\x90" ) /* ໐ */
SCRIPT( latn, LATN,
"Latin",
HB_SCRIPT_LATIN,
+ HINTING_BOTTOM_TO_TOP,
"o O 0" )
SCRIPT( latb, LATB,
"Latin Subscript Fallback",
HB_SCRIPT_INVALID,
+ HINTING_BOTTOM_TO_TOP,
"\xE2\x82\x92 \xE2\x82\x80" ) /* ₒ ₀ */
SCRIPT( latp, LATP,
"Latin Superscript Fallback",
HB_SCRIPT_INVALID,
+ HINTING_BOTTOM_TO_TOP,
"\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */
SCRIPT( mymr, MYMR,
"Myanmar",
HB_SCRIPT_MYANMAR,
+ HINTING_BOTTOM_TO_TOP,
"\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */
SCRIPT( none, NONE,
"no script",
HB_SCRIPT_INVALID,
+ HINTING_BOTTOM_TO_TOP,
"" )
/* there are no simple forms for letters; we thus use two digit shapes */
SCRIPT( telu, TELU,
"Telugu",
HB_SCRIPT_TELUGU,
+ HINTING_BOTTOM_TO_TOP,
"\xE0\xB1\xA6 \xE0\xB1\xA7" ) /* ౦ ౧ */
SCRIPT( thai, THAI,
"Thai",
HB_SCRIPT_THAI,
+ HINTING_BOTTOM_TO_TOP,
"\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */
#ifdef AF_CONFIG_OPTION_INDIC
@@ -119,56 +135,67 @@
SCRIPT( gujr, GUJR,
"Gujarati",
HB_SCRIPT_GUJARATI,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( guru, GURU,
"Gurmukhi",
HB_SCRIPT_GURMUKHI,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( knda, KNDA,
"Kannada",
HB_SCRIPT_KANNADA,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( limb, LIMB,
"Limbu",
HB_SCRIPT_LIMBU,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( mlym, MLYM,
"Malayalam",
HB_SCRIPT_MALAYALAM,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( orya, ORYA,
"Oriya",
HB_SCRIPT_ORIYA,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( sinh, SINH,
"Sinhala",
HB_SCRIPT_SINHALA,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( sund, SUND,
"Sundanese",
HB_SCRIPT_SUNDANESE,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( sylo, SYLO,
"Syloti Nagri",
HB_SCRIPT_SYLOTI_NAGRI,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( taml, TAML,
"Tamil",
HB_SCRIPT_TAMIL,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( tibt, TIBT,
"Tibetan",
HB_SCRIPT_TIBETAN,
+ HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
#endif /* AF_CONFIG_OPTION_INDIC */
@@ -178,6 +205,7 @@
SCRIPT( hani, HANI,
"CJKV ideographs",
HB_SCRIPT_HAN,
+ HINTING_BOTTOM_TO_TOP,
"\xE7\x94\xB0 \xE5\x9B\x97" ) /* 田 囗 */
#endif /* AF_CONFIG_OPTION_CJK */
diff --git a/src/autofit/afshaper.c b/src/autofit/afshaper.c
index 6ba9190..c9be619 100644
--- a/src/autofit/afshaper.c
+++ b/src/autofit/afshaper.c
@@ -86,7 +86,7 @@
/* load HarfBuzz script tags */
#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[] =
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index b483619..0134877 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -309,7 +309,7 @@ extern void* _af_debug_hints;
*/
#undef SCRIPT
-#define SCRIPT( s, S, d, h, ss ) \
+#define SCRIPT( s, S, d, h, H, ss ) \
AF_SCRIPT_ ## S,
/* The list of known scripts. */