[truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family.
* include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): Deprecated. * src/sfnt/sfobjs.c (sfnt_load_face): Updated. * docs/CHANGES: Updated.
This commit is contained in:
parent
693f56ffcd
commit
141f0ea5ab
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2017-01-24 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family.
|
||||||
|
|
||||||
|
* include/freetype/ftsnames.h
|
||||||
|
(FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
|
||||||
|
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros.
|
||||||
|
(FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
|
||||||
|
FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated.
|
||||||
|
|
||||||
|
* include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY,
|
||||||
|
TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros.
|
||||||
|
(TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY):
|
||||||
|
Deprecated.
|
||||||
|
|
||||||
|
* src/sfnt/sfobjs.c (sfnt_load_face): Updated.
|
||||||
|
|
||||||
|
* docs/CHANGES: Updated.
|
||||||
|
|
||||||
2017-01-23 Werner Lemberg <wl@gnu.org>
|
2017-01-23 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[base] Add `FT_Set_Default_Properties' (#49187).
|
[base] Add `FT_Set_Default_Properties' (#49187).
|
||||||
|
|
16
docs/CHANGES
16
docs/CHANGES
|
@ -23,6 +23,22 @@ CHANGES BETWEEN 2.7.1 and 2.7.2
|
||||||
call this function, but `FT_New_Library' does not (similar to
|
call this function, but `FT_New_Library' does not (similar to
|
||||||
`FT_Add_Default_Modules').
|
`FT_Add_Default_Modules').
|
||||||
|
|
||||||
|
- To be in sync with OpenType version 1.7 and newer, macros
|
||||||
|
|
||||||
|
FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
|
||||||
|
FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY,
|
||||||
|
TT_NAME_ID_PREFERRED_FAMILY
|
||||||
|
TT_NAME_ID_PREFERRED_SUBFAMILY
|
||||||
|
|
||||||
|
are renamed to
|
||||||
|
|
||||||
|
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
|
||||||
|
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY,
|
||||||
|
TT_NAME_ID_TYPOGRAPHIC_FAMILY
|
||||||
|
TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
|
||||||
|
|
||||||
|
The old macro names are deprecated (but still available).
|
||||||
|
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
|
|
|
@ -162,31 +162,43 @@ FT_BEGIN_HEADER
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* @constant:
|
* @constant:
|
||||||
* FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
|
* FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A constant used as the tag of @FT_Parameter structures to make
|
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
|
||||||
* FT_Open_Face() ignore preferred family subfamily names in `name'
|
* family names in the `name' table (introduced in OpenType version
|
||||||
* table since OpenType version 1.4. For backwards compatibility with
|
* 1.4). Use this for backwards compatibility with legacy systems that
|
||||||
* legacy systems that have a 4-face-per-family restriction.
|
* have a four-faces-per-family restriction.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
|
||||||
|
FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
||||||
|
|
||||||
|
|
||||||
|
/* this constant is deprecated */
|
||||||
|
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
|
||||||
|
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* @constant:
|
* @constant:
|
||||||
* FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
|
* FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A constant used as the tag of @FT_Parameter structures to make
|
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
|
||||||
* FT_Open_Face() ignore preferred subfamily names in `name' table since
|
* subfamily names in the `name' table (introduced in OpenType version
|
||||||
* OpenType version 1.4. For backwards compatibility with legacy
|
* 1.4). Use this for backwards compatibility with legacy systems that
|
||||||
* systems that have a 4-face-per-family restriction.
|
* have a four-faces-per-family restriction.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
|
||||||
|
FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
||||||
|
|
||||||
|
|
||||||
|
/* this constant is deprecated */
|
||||||
|
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
|
||||||
|
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
|
@ -1300,7 +1300,7 @@ FT_BEGIN_HEADER
|
||||||
/* */
|
/* */
|
||||||
/* sbit_table_size :: The size of `sbit_table'. */
|
/* sbit_table_size :: The size of `sbit_table'. */
|
||||||
/* */
|
/* */
|
||||||
/* sbit_table_type :: The sbit table type (CBLC, SBIX, etc.). */
|
/* sbit_table_type :: The sbit table type (CBLC, sbix, etc.). */
|
||||||
/* */
|
/* */
|
||||||
/* sbit_num_strikes :: The number of sbit strikes exposed by */
|
/* sbit_num_strikes :: The number of sbit strikes exposed by */
|
||||||
/* FreeType's API, omitting invalid strikes. */
|
/* FreeType's API, omitting invalid strikes. */
|
||||||
|
|
|
@ -804,8 +804,8 @@ FT_BEGIN_HEADER
|
||||||
#define TT_NAME_ID_LICENSE 13
|
#define TT_NAME_ID_LICENSE 13
|
||||||
#define TT_NAME_ID_LICENSE_URL 14
|
#define TT_NAME_ID_LICENSE_URL 14
|
||||||
/* number 15 is reserved */
|
/* number 15 is reserved */
|
||||||
#define TT_NAME_ID_PREFERRED_FAMILY 16
|
#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16
|
||||||
#define TT_NAME_ID_PREFERRED_SUBFAMILY 17
|
#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17
|
||||||
#define TT_NAME_ID_MAC_FULL_NAME 18
|
#define TT_NAME_ID_MAC_FULL_NAME 18
|
||||||
|
|
||||||
/* The following code is new as of 2000-01-21 */
|
/* The following code is new as of 2000-01-21 */
|
||||||
|
@ -825,7 +825,9 @@ FT_BEGIN_HEADER
|
||||||
/* This is new in OpenType 1.8 */
|
/* This is new in OpenType 1.8 */
|
||||||
#define TT_NAME_ID_VARIATIONS_PREFIX 25
|
#define TT_NAME_ID_VARIATIONS_PREFIX 25
|
||||||
|
|
||||||
/* */
|
/* these two values are deprecated */
|
||||||
|
#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY
|
||||||
|
#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -1079,8 +1079,8 @@
|
||||||
FT_Bool has_outline;
|
FT_Bool has_outline;
|
||||||
FT_Bool is_apple_sbit;
|
FT_Bool is_apple_sbit;
|
||||||
FT_Bool is_apple_sbix;
|
FT_Bool is_apple_sbix;
|
||||||
FT_Bool ignore_preferred_family = FALSE;
|
FT_Bool ignore_typographic_family = FALSE;
|
||||||
FT_Bool ignore_preferred_subfamily = FALSE;
|
FT_Bool ignore_typographic_subfamily = FALSE;
|
||||||
|
|
||||||
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
|
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
|
||||||
|
|
||||||
|
@ -1095,10 +1095,10 @@
|
||||||
|
|
||||||
for ( i = 0; i < num_params; i++ )
|
for ( i = 0; i < num_params; i++ )
|
||||||
{
|
{
|
||||||
if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY )
|
if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY )
|
||||||
ignore_preferred_family = TRUE;
|
ignore_typographic_family = TRUE;
|
||||||
else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY )
|
else if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY )
|
||||||
ignore_preferred_subfamily = TRUE;
|
ignore_typographic_subfamily = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1281,27 +1281,27 @@
|
||||||
face->root.style_name = NULL;
|
face->root.style_name = NULL;
|
||||||
if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
|
if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
|
||||||
{
|
{
|
||||||
if ( !ignore_preferred_family )
|
if ( !ignore_typographic_family )
|
||||||
GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
|
GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
|
||||||
if ( !face->root.family_name )
|
if ( !face->root.family_name )
|
||||||
GET_NAME( FONT_FAMILY, &face->root.family_name );
|
GET_NAME( FONT_FAMILY, &face->root.family_name );
|
||||||
|
|
||||||
if ( !ignore_preferred_subfamily )
|
if ( !ignore_typographic_subfamily )
|
||||||
GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
|
GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
|
||||||
if ( !face->root.style_name )
|
if ( !face->root.style_name )
|
||||||
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
|
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GET_NAME( WWS_FAMILY, &face->root.family_name );
|
GET_NAME( WWS_FAMILY, &face->root.family_name );
|
||||||
if ( !face->root.family_name && !ignore_preferred_family )
|
if ( !face->root.family_name && !ignore_typographic_family )
|
||||||
GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
|
GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
|
||||||
if ( !face->root.family_name )
|
if ( !face->root.family_name )
|
||||||
GET_NAME( FONT_FAMILY, &face->root.family_name );
|
GET_NAME( FONT_FAMILY, &face->root.family_name );
|
||||||
|
|
||||||
GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
|
GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
|
||||||
if ( !face->root.style_name && !ignore_preferred_subfamily )
|
if ( !face->root.style_name && !ignore_typographic_subfamily )
|
||||||
GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
|
GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
|
||||||
if ( !face->root.style_name )
|
if ( !face->root.style_name )
|
||||||
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
|
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue