summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
commit0de5be92a3a0fe27e8521fc4de67e19b1057842e (patch)
treee93a390fe965486cca19498840cb8d7904252fec /Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c
parent27ce96eea3f1190bd744448cfa149e8d767af95a (diff)
revert freetype to 2.10.4
git-svn-id: svn://tug.org/texlive/trunk@60360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c57
1 files changed, 21 insertions, 36 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c b/Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c
index 5d078937e18..bbf7b6b1f9a 100644
--- a/Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c
+++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afshaper.c
@@ -4,7 +4,7 @@
*
* HarfBuzz interface for accessing OpenType features (body).
*
- * Copyright (C) 2013-2021 by
+ * Copyright (C) 2013-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -132,24 +132,13 @@
/* Convert a HarfBuzz script tag into the corresponding OpenType */
/* tag or tags -- some Indic scripts like Devanagari have an old */
/* and a new set of features. */
- {
- unsigned int tags_count = 3;
- hb_tag_t tags[3];
-
-
- hb_ot_tags_from_script_and_language( script,
- HB_LANGUAGE_INVALID,
- &tags_count,
- tags,
- NULL,
- NULL );
- script_tags[0] = tags_count > 0 ? tags[0] : HB_TAG_NONE;
- script_tags[1] = tags_count > 1 ? tags[1] : HB_TAG_NONE;
- script_tags[2] = tags_count > 2 ? tags[2] : HB_TAG_NONE;
- }
+ hb_ot_tags_from_script( script,
+ &script_tags[0],
+ &script_tags[1] );
- /* If the second tag is HB_OT_TAG_DEFAULT_SCRIPT, change that to */
- /* HB_TAG_NONE except for the default script. */
+ /* `hb_ot_tags_from_script' usually returns HB_OT_TAG_DEFAULT_SCRIPT */
+ /* as the second tag. We change that to HB_TAG_NONE except for the */
+ /* default script. */
if ( default_script )
{
if ( script_tags[0] == HB_TAG_NONE )
@@ -168,6 +157,9 @@
/* HarfBuzz maps them to `DFLT', which we don't want to handle here */
if ( script_tags[0] == HB_OT_TAG_DEFAULT_SCRIPT )
goto Exit;
+
+ if ( script_tags[1] == HB_OT_TAG_DEFAULT_SCRIPT )
+ script_tags[1] = HB_TAG_NONE;
}
gsub_lookups = hb_set_create();
@@ -181,9 +173,9 @@
if ( hb_set_is_empty( gsub_lookups ) )
goto Exit; /* nothing to do */
- FT_TRACE4(( "GSUB lookups (style `%s'):\n",
+ FT_TRACE4(( "GSUB lookups (style `%s'):\n"
+ " ",
af_style_names[style_class->style] ));
- FT_TRACE4(( " " ));
#ifdef FT_DEBUG_LEVEL_TRACE
count = 0;
@@ -210,13 +202,12 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !count )
FT_TRACE4(( " (none)" ));
- FT_TRACE4(( "\n" ));
- FT_TRACE4(( "\n" ));
+ FT_TRACE4(( "\n\n" ));
#endif
- FT_TRACE4(( "GPOS lookups (style `%s'):\n",
+ FT_TRACE4(( "GPOS lookups (style `%s'):\n"
+ " ",
af_style_names[style_class->style] ));
- FT_TRACE4(( " " ));
gpos_lookups = hb_set_create();
hb_ot_layout_collect_lookups( face,
@@ -251,8 +242,7 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !count )
FT_TRACE4(( " (none)" ));
- FT_TRACE4(( "\n" ));
- FT_TRACE4(( "\n" ));
+ FT_TRACE4(( "\n\n" ));
#endif
/*
@@ -363,10 +353,8 @@
{
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !( count % 10 ) )
- {
- FT_TRACE4(( "\n" ));
- FT_TRACE4(( " " ));
- }
+ FT_TRACE4(( "\n"
+ " " ));
FT_TRACE4(( " %d", idx ));
count++;
@@ -388,12 +376,9 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( !count )
- {
- FT_TRACE4(( "\n" ));
- FT_TRACE4(( " (none)" ));
- }
- FT_TRACE4(( "\n" ));
- FT_TRACE4(( "\n" ));
+ FT_TRACE4(( "\n"
+ " (none)" ));
+ FT_TRACE4(( "\n\n" ));
#endif
Exit: