[ot-shape] Enable abvm/blwm features by default

Core Text seems to apply them to Latin text, but Uniscribe doesn’t.

See https://github.com/harfbuzz/harfbuzz/pull/1908#issuecomment-521819343
This commit is contained in:
Khaled Hosny 2019-08-16 00:48:26 +02:00
parent 2164bd6f29
commit da5118da77
10 changed files with 6 additions and 55 deletions

View File

@ -131,12 +131,6 @@ indic_features[] =
{HB_TAG('b','l','w','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('p','s','t','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('h','a','l','n'), F_GLOBAL_MANUAL_JOINERS},
/*
* Positioning features.
* We don't care about the types.
*/
{HB_TAG('a','b','v','m'), F_GLOBAL},
{HB_TAG('b','l','w','m'), F_GLOBAL},
};
/*
@ -162,9 +156,6 @@ enum {
_INDIC_PSTS,
_INDIC_HALN,
_INDIC_ABVM,
_INDIC_BLWM,
INDIC_NUM_FEATURES,
INDIC_BASIC_FEATURES = INDIC_INIT, /* Don't forget to update this! */
};

View File

@ -56,12 +56,6 @@ khmer_features[] =
{HB_TAG('a','b','v','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('b','l','w','s'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('p','s','t','s'), F_GLOBAL_MANUAL_JOINERS},
/*
* Positioning features.
* We don't care about the types.
*/
{HB_TAG('a','b','v','m'), F_GLOBAL},
{HB_TAG('b','l','w','m'), F_GLOBAL},
};
/*
@ -79,9 +73,6 @@ enum {
_KHMER_BLWS,
_KHMER_PSTS,
_KHMER_ABVM,
_KHMER_BLWM,
KHMER_NUM_FEATURES,
KHMER_BASIC_FEATURES = _KHMER_PRES, /* Don't forget to update this! */
};

View File

@ -59,24 +59,6 @@ myanmar_other_features[] =
HB_TAG('b','l','w','s'),
HB_TAG('p','s','t','s'),
};
static const hb_tag_t
myanmar_positioning_features[] =
{
/*
* Positioning features.
* We don't care about the types.
*/
/* Pre-release version of Windows 8 Myanmar font had abvm,blwm
* features. The released Windows 8 version of the font (as well
* as the released spec) used 'mark' instead. The Windows 8
* shaper however didn't apply 'mark' but did apply 'mkmk'.
* Perhaps it applied abvm/blwm. This was fixed in a Windows 8
* update, so now it applies mark/mkmk. We are guessing that
* it still applies abvm/blwm too.
*/
HB_TAG('a','b','v','m'),
HB_TAG('b','l','w','m'),
};
static void
setup_syllables_myanmar (const hb_ot_shape_plan_t *plan,
@ -113,9 +95,6 @@ collect_features_myanmar (hb_ot_shape_planner_t *plan)
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_other_features); i++)
map->enable_feature (myanmar_other_features[i], F_MANUAL_ZWJ);
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_positioning_features); i++)
map->enable_feature (myanmar_positioning_features[i]);
}
static void

View File

@ -88,16 +88,6 @@ use_other_features[] =
HB_TAG('p','r','e','s'),
HB_TAG('p','s','t','s'),
};
static const hb_tag_t
use_positioning_features[] =
{
/*
* Positioning features.
* We don't care about the types.
*/
HB_TAG('a','b','v','m'),
HB_TAG('b','l','w','m'),
};
static void
setup_syllables_use (const hb_ot_shape_plan_t *plan,
@ -153,10 +143,6 @@ collect_features_use (hb_ot_shape_planner_t *plan)
/* "Standard typographic presentation" */
for (unsigned int i = 0; i < ARRAY_LENGTH (use_other_features); i++)
map->enable_feature (use_other_features[i], F_MANUAL_ZWJ);
/* "Positional feature application" */
for (unsigned int i = 0; i < ARRAY_LENGTH (use_positioning_features); i++)
map->enable_feature (use_positioning_features[i]);
}
struct use_shape_plan_t

View File

@ -285,6 +285,8 @@ hb_ot_shape_plan_t::position (hb_font_t *font,
static const hb_ot_map_feature_t
common_features[] =
{
{HB_TAG('a','b','v','m'), F_GLOBAL},
{HB_TAG('b','l','w','m'), F_GLOBAL},
{HB_TAG('c','c','m','p'), F_GLOBAL},
{HB_TAG('l','o','c','l'), F_GLOBAL},
{HB_TAG('m','a','r','k'), F_GLOBAL_MANUAL_JOINERS},

View File

@ -14,7 +14,6 @@ TESTS = \
tests/context-matching.tests \
tests/cursive-positioning.tests \
tests/default-ignorables.tests \
tests/dist.tests \
tests/emoji.tests \
tests/fallback-positioning.tests \
tests/hangul-jamo.tests \
@ -42,6 +41,7 @@ TESTS = \
tests/myanmar-syllable.tests \
tests/myanmar-zawgyi.tests \
tests/none-directional.tests \
tests/positioning-features.tests \
tests/rand.tests \
tests/spaces.tests \
tests/simple.tests \

View File

@ -1 +0,0 @@
../fonts/53a91c20e33a596f2be17fb68b382d6b7eb85d5c.ttf::U+0041,U+0056:[A=0+625|V=1+675]

View File

@ -0,0 +1,3 @@
../fonts/53a91c20e33a596f2be17fb68b382d6b7eb85d5c.ttf::U+0041,U+0056:[A=0+625|V=1+675]
../fonts/f79eb71df4e4c9c273b67b89a06e5ff9e3c1f834.ttf::U+006D,U+0315:[m=0+945|uni0315=0@32,-178+0]
../fonts/ea3f63620511b2097200d23774ffef197e829e69.ttf::U+0079,U+0325:[y=0+565|uni0325=0@-422,-240+0]