[amalgam] More
Part of https://github.com/harfbuzz/harfbuzz/issues/1809
This commit is contained in:
parent
d115a9e022
commit
d8b5353e07
|
@ -36,7 +36,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
basic_features[] =
|
myanmar_basic_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Basic features.
|
* Basic features.
|
||||||
|
@ -48,7 +48,7 @@ basic_features[] =
|
||||||
HB_TAG('p','s','t','f'),
|
HB_TAG('p','s','t','f'),
|
||||||
};
|
};
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
other_features[] =
|
myanmar_other_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Other features.
|
* Other features.
|
||||||
|
@ -60,7 +60,7 @@ other_features[] =
|
||||||
HB_TAG('p','s','t','s'),
|
HB_TAG('p','s','t','s'),
|
||||||
};
|
};
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
positioning_features[] =
|
myanmar_positioning_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Positioning features.
|
* Positioning features.
|
||||||
|
@ -104,19 +104,19 @@ collect_features_myanmar (hb_ot_shape_planner_t *plan)
|
||||||
|
|
||||||
map->add_gsub_pause (reorder_myanmar);
|
map->add_gsub_pause (reorder_myanmar);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (basic_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_basic_features); i++)
|
||||||
{
|
{
|
||||||
map->enable_feature (basic_features[i], F_MANUAL_ZWJ);
|
map->enable_feature (myanmar_basic_features[i], F_MANUAL_ZWJ);
|
||||||
map->add_gsub_pause (nullptr);
|
map->add_gsub_pause (nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
map->add_gsub_pause (_hb_clear_syllables);
|
map->add_gsub_pause (_hb_clear_syllables);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (other_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_other_features); i++)
|
||||||
map->enable_feature (other_features[i], F_MANUAL_ZWJ);
|
map->enable_feature (myanmar_other_features[i], F_MANUAL_ZWJ);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (positioning_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (myanmar_positioning_features); i++)
|
||||||
map->enable_feature (positioning_features[i]);
|
map->enable_feature (myanmar_positioning_features[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -274,7 +274,7 @@ initial_reordering_consonant_syllable (hb_buffer_t *buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
initial_reordering_syllable (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
reorder_syllable_myanmar (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||||
hb_face_t *face HB_UNUSED,
|
hb_face_t *face HB_UNUSED,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int start, unsigned int end)
|
unsigned int start, unsigned int end)
|
||||||
|
@ -358,7 +358,7 @@ reorder_myanmar (const hb_ot_shape_plan_t *plan,
|
||||||
insert_dotted_circles (plan, font, buffer);
|
insert_dotted_circles (plan, font, buffer);
|
||||||
|
|
||||||
foreach_syllable (buffer, start, end)
|
foreach_syllable (buffer, start, end)
|
||||||
initial_reordering_syllable (plan, font->face, buffer, start, end);
|
reorder_syllable_myanmar (plan, font->face, buffer, start, end);
|
||||||
|
|
||||||
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category);
|
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category);
|
||||||
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position);
|
HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position);
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
basic_features[] =
|
use_basic_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Basic features.
|
* Basic features.
|
||||||
|
@ -59,7 +59,7 @@ basic_features[] =
|
||||||
HB_TAG('c','j','c','t'),
|
HB_TAG('c','j','c','t'),
|
||||||
};
|
};
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
arabic_features[] =
|
use_arabic_features[] =
|
||||||
{
|
{
|
||||||
HB_TAG('i','s','o','l'),
|
HB_TAG('i','s','o','l'),
|
||||||
HB_TAG('i','n','i','t'),
|
HB_TAG('i','n','i','t'),
|
||||||
|
@ -71,7 +71,7 @@ arabic_features[] =
|
||||||
HB_TAG('f','i','n','2'),
|
HB_TAG('f','i','n','2'),
|
||||||
HB_TAG('f','i','n','3'),
|
HB_TAG('f','i','n','3'),
|
||||||
};
|
};
|
||||||
/* Same order as arabic_features. Don't need Syriac stuff.*/
|
/* Same order as use_arabic_features. Don't need Syriac stuff.*/
|
||||||
enum joining_form_t {
|
enum joining_form_t {
|
||||||
ISOL,
|
ISOL,
|
||||||
INIT,
|
INIT,
|
||||||
|
@ -80,7 +80,7 @@ enum joining_form_t {
|
||||||
_NONE
|
_NONE
|
||||||
};
|
};
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
other_features[] =
|
use_other_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Other features.
|
* Other features.
|
||||||
|
@ -94,7 +94,7 @@ other_features[] =
|
||||||
HB_TAG('p','s','t','s'),
|
HB_TAG('p','s','t','s'),
|
||||||
};
|
};
|
||||||
static const hb_tag_t
|
static const hb_tag_t
|
||||||
positioning_features[] =
|
use_positioning_features[] =
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Positioning features.
|
* Positioning features.
|
||||||
|
@ -145,24 +145,24 @@ collect_features_use (hb_ot_shape_planner_t *plan)
|
||||||
map->add_gsub_pause (record_pref_use);
|
map->add_gsub_pause (record_pref_use);
|
||||||
|
|
||||||
/* "Orthographic unit shaping group" */
|
/* "Orthographic unit shaping group" */
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (basic_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (use_basic_features); i++)
|
||||||
map->enable_feature (basic_features[i], F_MANUAL_ZWJ);
|
map->enable_feature (use_basic_features[i], F_MANUAL_ZWJ);
|
||||||
|
|
||||||
map->add_gsub_pause (reorder_use);
|
map->add_gsub_pause (reorder_use);
|
||||||
map->add_gsub_pause (_hb_clear_syllables);
|
map->add_gsub_pause (_hb_clear_syllables);
|
||||||
|
|
||||||
/* "Topographical features" */
|
/* "Topographical features" */
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (arabic_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (use_arabic_features); i++)
|
||||||
map->add_feature (arabic_features[i]);
|
map->add_feature (use_arabic_features[i]);
|
||||||
map->add_gsub_pause (nullptr);
|
map->add_gsub_pause (nullptr);
|
||||||
|
|
||||||
/* "Standard typographic presentation" */
|
/* "Standard typographic presentation" */
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (other_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (use_other_features); i++)
|
||||||
map->enable_feature (other_features[i], F_MANUAL_ZWJ);
|
map->enable_feature (use_other_features[i], F_MANUAL_ZWJ);
|
||||||
|
|
||||||
/* "Positional feature application" */
|
/* "Positional feature application" */
|
||||||
for (unsigned int i = 0; i < ARRAY_LENGTH (positioning_features); i++)
|
for (unsigned int i = 0; i < ARRAY_LENGTH (use_positioning_features); i++)
|
||||||
map->enable_feature (positioning_features[i]);
|
map->enable_feature (use_positioning_features[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct use_shape_plan_t
|
struct use_shape_plan_t
|
||||||
|
@ -309,7 +309,7 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan,
|
||||||
hb_mask_t masks[4], all_masks = 0;
|
hb_mask_t masks[4], all_masks = 0;
|
||||||
for (unsigned int i = 0; i < 4; i++)
|
for (unsigned int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
masks[i] = plan->map.get_1_mask (arabic_features[i]);
|
masks[i] = plan->map.get_1_mask (use_arabic_features[i]);
|
||||||
if (masks[i] == plan->map.get_global_mask ())
|
if (masks[i] == plan->map.get_global_mask ())
|
||||||
masks[i] = 0;
|
masks[i] = 0;
|
||||||
all_masks |= masks[i];
|
all_masks |= masks[i];
|
||||||
|
|
Loading…
Reference in New Issue