support for "automatic unpatented hinting" added we still need to determine the list of "trick" CJK fonts that are going to toggle the bytecode interpreter instead of the auto-hinter
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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 62bcd50..6821134 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -594,6 +594,16 @@ FT_BEGIN_HEADER
#define FT_CONFIG_OPTION_OLD_INTERNALS
+ /*
+ * this variable is defined if either unpatented or native TrueType
+ * hinting is requested by the definitions above.
+ */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+# define TT_USE_BYTECODE_INTERPRETER
+#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
+# define TT_USE_BYTECODE_INTERPRETER
+#endif
+
FT_END_HEADER
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 53d7a67..e0e5c55 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
@@ -108,7 +108,7 @@ FT_BEGIN_HEADER
FT_Long b,
FT_Long c );
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 133f360..ef3d3f4 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -211,6 +211,27 @@ FT_BEGIN_HEADER
/* this data when first opened. This field exists only if */
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
+ /* force_autohing ::
+ /* this boolean flag is used to instruct the glyph loader to */
+ /* ignore the format-specific hinter, and use the auto-hinter */
+ /* instead to load all glyphs. */
+ /* */
+ /* if the unpatented bytecode interpreter was compiled withing */
+ /* the library then: */
+ /* */
+ /* - if this is one of the tricky Asian fonts, like Gulim, which */
+ /* absolutely require a bytecode interpreter to load anything */
+ /* properly, the flag will be set to FALSE */
+ /* */
+ /* - for other fonts, the flag will be set to TRUE, and the */
+ /* auto-hinter will be used to scale the glyphs. */
+ /* */
+ /* if the unpatented bytecode interpretr was *not* compiled */
+ /* within the librayr, the flag will always be FALSE */
+ /* */
+ /* the detection of "tricky" fonts is located in the TrueType */
+ /* face loader. */
+ /* */
typedef struct FT_Face_InternalRec_
{
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
@@ -227,6 +248,8 @@ FT_BEGIN_HEADER
FT_Incremental_InterfaceRec* incremental_interface;
#endif
+ FT_Bool force_autohint;
+
} FT_Face_InternalRec;
@@ -621,7 +644,7 @@ FT_BEGIN_HEADER
/* Set this debug hook to a non-null pointer to force unpatented hinting */
- /* for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and */
+ /* for all faces when both TT_USE_BYTECODE_INTERPRETER and */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used */
/* during debugging. */
#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index ede9308..7cae988 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -159,7 +159,7 @@
}
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/* documentation is in ftcalc.h */
@@ -183,7 +183,7 @@
return ( s > 0 ) ? d : -d;
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/* documentation is in freetype.h */
@@ -353,7 +353,7 @@
}
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_BASE_DEF( FT_Long )
FT_MulDiv_No_Round( FT_Long a,
@@ -387,7 +387,7 @@
return ( s < 0 ? -a : a );
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/* documentation is in freetype.h */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 1408543..95f297d 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -567,6 +567,9 @@
if ( FT_LOAD_TARGET_MODE( load_flags ) == FT_RENDER_MODE_LIGHT )
load_flags |= FT_LOAD_FORCE_AUTOHINT;
+ if ( face->internal->force_autohint )
+ load_flags |= FT_LOAD_FORCE_AUTOHINT;
+
/* auto-hinter is preferred and should be used */
if ( ( !FT_DRIVER_HAS_HINTER( driver ) ||
( load_flags & FT_LOAD_FORCE_AUTOHINT ) ) &&
diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c
index 4abb01e..5cb342a 100644
--- a/src/truetype/truetype.c
+++ b/src/truetype/truetype.c
@@ -24,7 +24,7 @@
#include "ttgload.c" /* glyph loader */
#include "ttobjs.c" /* object manager */
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
#include "ttinterp.c"
#endif
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index fa25c25..24cbd0e 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -294,7 +294,7 @@
static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine =
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
FT_TRUETYPE_ENGINE_TYPE_UNPATENTED
@@ -302,11 +302,11 @@
FT_TRUETYPE_ENGINE_TYPE_PATENTED
#endif
-#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_TRUETYPE_ENGINE_TYPE_NONE
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
};
static const FT_ServiceDescRec tt_services[] =
@@ -354,7 +354,7 @@
{
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_MODULE_DRIVER_HAS_HINTER,
#else
0,
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index bbdb766..3d901ac 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -310,7 +310,7 @@
goto Fail;
}
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
if ( IS_HINTED( load->load_flags ) )
{
@@ -320,7 +320,7 @@
FT_MEM_COPY( load->exec->glyphIns, p, (FT_Long)n_ins );
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
p += n_ins;
@@ -528,7 +528,7 @@
gloader->current.num_subglyphs = num_subglyphs;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
{
FT_Stream stream = loader->stream;
@@ -599,14 +599,14 @@
TT_GlyphZone zone = &loader->zone;
FT_Pos origin;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_UInt n_ins;
#else
FT_UNUSED( is_composite );
#endif
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
n_ins = loader->glyph->control_len;
#endif
@@ -615,7 +615,7 @@
if ( origin )
translate_array( zone->n_points, zone->cur, origin, 0 );
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/* save original point positioin in org */
if ( n_ins > 0 )
FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );
@@ -627,7 +627,7 @@
zone->cur[zone->n_points - 1].y =
FT_PIX_ROUND( zone->cur[zone->n_points - 1].y );
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
if ( n_ins > 0 )
{
@@ -966,7 +966,7 @@
outline->tags[outline->n_points + 2] = 0;
outline->tags[outline->n_points + 3] = 0;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
{
FT_Stream stream = loader->stream;
@@ -1435,7 +1435,7 @@
loader->ins_pos = ins_pos;
if ( IS_HINTED( loader->load_flags ) &&
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
subglyph->flags & WE_HAVE_INSTR &&
@@ -1715,7 +1715,7 @@
FT_MEM_ZERO( loader, sizeof ( TT_LoaderRec ) );
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/* load execution context */
{
@@ -1746,7 +1746,7 @@
loader->instructions = exec->glyphIns;
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/* seek to the beginning of the glyph table. For Type 42 fonts */
/* the table might be accessed from a Postscript stream or something */
diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h
index 665c224..c97caf8 100644
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -23,7 +23,7 @@
#include <ft2build.h>
#include "ttobjs.h"
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
#include "ttinterp.h"
#endif
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 183ad79..c810da9 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -32,7 +32,7 @@
#include "tterrors.h"
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
#define TT_MULFIX FT_MulFix
@@ -7816,7 +7816,7 @@
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/* END */
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 3f78137..3dd8b5c 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -29,7 +29,7 @@
#include "tterrors.h"
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
#include "ttinterp.h"
#endif
@@ -51,7 +51,7 @@
#define FT_COMPONENT trace_ttobjs
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
@@ -141,7 +141,7 @@
return error;
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/*************************************************************************/
@@ -205,7 +205,7 @@
goto Bad_Format;
}
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
face->root.face_flags |= FT_FACE_FLAG_HINTER;
#endif
@@ -261,6 +261,17 @@
face->unpatented_hinting = TRUE;
}
+ /* compare the face with a list of well-known "tricky' fonts !!
+ * this list shall be expanded as we find them
+ */
+ if ( !face->unpatented_hinting )
+ {
+ /* XXX: TODO: */
+ if ( strcmp( ttface->family_name, "What?" ) == 0 )
+ face->unpatented_hinting = 1;
+ }
+
+ ttface->internal->force_autohint = !face->unpatented_hinting;
#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
/* initialize standard glyph loading routines */
@@ -331,7 +342,7 @@
/* */
/*************************************************************************/
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
@@ -481,7 +492,7 @@
return error;
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
/*************************************************************************/
@@ -504,7 +515,7 @@
TT_Size size = (TT_Size)ttsize;
FT_Error error = TT_Err_Ok;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Face face = (TT_Face)size->root.face;
FT_Memory memory = face->root.memory;
@@ -589,7 +600,7 @@
if ( error )
tt_size_done( ttsize );
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
size->ttmetrics.valid = FALSE;
size->strike_index = 0xFFFFFFFFUL;
@@ -614,7 +625,7 @@
{
TT_Size size = (TT_Size)ttsize;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Memory memory = size->root.face->memory;
@@ -728,7 +739,7 @@
}
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
{
FT_UInt i;
@@ -757,7 +768,7 @@
error = tt_size_run_prep( size );
}
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
if ( !error )
size->ttmetrics.valid = TRUE;
@@ -784,7 +795,7 @@
tt_driver_init( FT_Module ttdriver ) /* TT_Driver */
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
@@ -816,7 +827,7 @@
FT_LOCAL_DEF( void )
tt_driver_done( FT_Module ttdriver ) /* TT_Driver */
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index b42b735..5801af2 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -109,7 +109,7 @@ FT_BEGIN_HEADER
} TT_GraphicsState;
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_LOCAL( void )
tt_glyphzone_done( TT_GlyphZone zone );
@@ -120,7 +120,7 @@ FT_BEGIN_HEADER
FT_Short maxContours,
TT_GlyphZone zone );
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
@@ -324,7 +324,7 @@ FT_BEGIN_HEADER
FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_UInt num_function_defs; /* number of function definitions */
FT_UInt max_function_defs;
@@ -358,7 +358,7 @@ FT_BEGIN_HEADER
FT_Bool debug;
TT_ExecContext context;
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
} TT_SizeRec;
@@ -412,7 +412,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
tt_size_done( FT_Size ttsize ); /* TT_Size */
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_LOCAL( FT_Error )
tt_size_run_fpgm( TT_Size size );
@@ -420,7 +420,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
tt_size_run_prep( TT_Size size );
-#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#endif /* TT_USE_BYTECODE_INTERPRETER */
FT_LOCAL( FT_Error )
tt_size_reset( TT_Size size );
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index 36e5a66..6641fb7 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -334,7 +334,7 @@
tt_face_load_cvt( TT_Face face,
FT_Stream stream )
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Error error;
FT_Memory memory = stream->memory;
@@ -383,7 +383,7 @@
Exit:
return error;
-#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( face );
FT_UNUSED( stream );
@@ -415,7 +415,7 @@
tt_face_load_fpgm( TT_Face face,
FT_Stream stream )
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Error error;
FT_ULong table_len;
@@ -445,7 +445,7 @@
Exit:
return error;
-#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( face );
FT_UNUSED( stream );
@@ -477,7 +477,7 @@
tt_face_load_prep( TT_Face face,
FT_Stream stream )
{
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Error error;
FT_ULong table_len;
@@ -506,7 +506,7 @@
Exit:
return error;
-#else /* !TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( face );
FT_UNUSED( stream );
diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index e3c4697..82eb0ba 100644
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -199,7 +199,7 @@
{
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
-#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#ifdef TT_USE_BYTECODE_INTERPRETER
FT_MODULE_DRIVER_HAS_HINTER,
#else
0,
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 30d9dcc..3b6c23b 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -209,6 +209,9 @@
if ( info->is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
+ /* note, only define if we have the patented bytecode interpreter,
+ * there are no known "tricky" Type42 fonts that could be loaded
+ * with the unpatented interpreter */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
root->face_flags |= FT_FACE_FLAG_HINTER;
#endif