Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
ba4bd5b9
by Dominik Röttsches at 2022-11-12T17:11:36+01:00
3 changed files:
Changes:
... | ... | @@ -739,6 +739,24 @@ FT_BEGIN_HEADER |
739 | 739 | #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
740 | 740 | |
741 | 741 | |
742 | + /**************************************************************************
|
|
743 | + *
|
|
744 | + * Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude
|
|
745 | + * support for 'boring' OpenType specification expansions.
|
|
746 | + *
|
|
747 | + * https://github.com/harfbuzz/boring-expansion-spec
|
|
748 | + *
|
|
749 | + * Right now, the following features are covered:
|
|
750 | + *
|
|
751 | + * - 'avar' version 2.0
|
|
752 | + *
|
|
753 | + * Most likely, this is a temporary configuration option to be removed in
|
|
754 | + * the near future, since it is assumed that eventually those features are
|
|
755 | + * added to the OpenType standard.
|
|
756 | + */
|
|
757 | +/* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
|
|
758 | + |
|
759 | + |
|
742 | 760 | /**************************************************************************
|
743 | 761 | *
|
744 | 762 | * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
|
... | ... | @@ -739,6 +739,24 @@ FT_BEGIN_HEADER |
739 | 739 | #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
740 | 740 | |
741 | 741 | |
742 | + /**************************************************************************
|
|
743 | + *
|
|
744 | + * Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude
|
|
745 | + * support for 'boring' OpenType specification expansions.
|
|
746 | + *
|
|
747 | + * https://github.com/harfbuzz/boring-expansion-spec
|
|
748 | + *
|
|
749 | + * Right now, the following features are covered:
|
|
750 | + *
|
|
751 | + * - 'avar' version 2.0
|
|
752 | + *
|
|
753 | + * Most likely, this is a temporary configuration option to be removed in
|
|
754 | + * the near future, since it is assumed that eventually those features are
|
|
755 | + * added to the OpenType standard.
|
|
756 | + */
|
|
757 | +/* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
|
|
758 | + |
|
759 | + |
|
742 | 760 | /**************************************************************************
|
743 | 761 | *
|
744 | 762 | * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an
|
... | ... | @@ -364,10 +364,13 @@ |
364 | 364 | |
365 | 365 | FT_Long version;
|
366 | 366 | FT_Long axisCount;
|
367 | - FT_ULong table_offset;
|
|
368 | 367 | FT_ULong table_len;
|
368 | + |
|
369 | +#ifndef TT_CONFIG_OPTION_NO_BORING_EXPANSION
|
|
370 | + FT_ULong table_offset;
|
|
369 | 371 | FT_ULong store_offset;
|
370 | 372 | FT_ULong axisMap_offset;
|
373 | +#endif
|
|
371 | 374 | |
372 | 375 | |
373 | 376 | FT_TRACE2(( "AVAR " ));
|
... | ... | @@ -380,7 +383,9 @@ |
380 | 383 | return;
|
381 | 384 | }
|
382 | 385 | |
386 | +#ifndef TT_CONFIG_OPTION_NO_BORING_EXPANSION
|
|
383 | 387 | table_offset = FT_STREAM_POS();
|
388 | +#endif
|
|
384 | 389 | |
385 | 390 | if ( FT_FRAME_ENTER( table_len ) )
|
386 | 391 | return;
|
... | ... | @@ -388,7 +393,11 @@ |
388 | 393 | version = FT_GET_LONG();
|
389 | 394 | axisCount = FT_GET_LONG();
|
390 | 395 | |
391 | - if ( version != 0x00010000L && version != 0x00020000L )
|
|
396 | + if ( version != 0x00010000L
|
|
397 | +#ifndef TT_CONFIG_OPTION_NO_BORING_EXPANSION
|
|
398 | + && version != 0x00020000L
|
|
399 | +#endif
|
|
400 | + )
|
|
392 | 401 | {
|
393 | 402 | FT_TRACE2(( "bad table version\n" ));
|
394 | 403 | goto Exit;
|
... | ... | @@ -445,6 +454,7 @@ |
445 | 454 | FT_TRACE5(( "\n" ));
|
446 | 455 | }
|
447 | 456 | |
457 | +#ifndef TT_CONFIG_OPTION_NO_BORING_EXPANSION
|
|
448 | 458 | if ( version < 0x00020000L )
|
449 | 459 | goto Exit;
|
450 | 460 | |
... | ... | @@ -472,6 +482,7 @@ |
472 | 482 | if ( error )
|
473 | 483 | goto Exit;
|
474 | 484 | }
|
485 | +#endif
|
|
475 | 486 | |
476 | 487 | |
477 | 488 | Exit:
|