提交 be8b9f5f 编写于 作者: B Behdad Esfahbod

[Indic] Start refactoring different matra positions per script

上级 deeb540a
......@@ -69,15 +69,23 @@ enum indic_position_t {
POS_RA_TO_BECOME_REPH,
POS_PRE_M,
POS_PRE_C,
POS_BASE_C,
POS_AFTER_MAIN,
POS_ABOVE_C,
POS_BEFORE_SUB,
POS_BELOW_C,
POS_ABOVE_M,
POS_BELOW_M,
POS_AFTER_SUB,
POS_BEFORE_POST,
POS_POST_C,
POS_POST_M,
POS_AFTER_POST,
POS_FINAL_C,
POS_SMVD
POS_SMVD,
POS_END
};
/* Categories used in IndicSyllabicCategory.txt from UCD. */
......@@ -111,9 +119,9 @@ enum indic_matra_category_t {
INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_BASE_C,
INDIC_MATRA_CATEGORY_LEFT = POS_PRE_M,
INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_M,
INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_M,
INDIC_MATRA_CATEGORY_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_TOP = POS_BEFORE_POST,
INDIC_MATRA_CATEGORY_BOTTOM = POS_BEFORE_POST,
INDIC_MATRA_CATEGORY_RIGHT = POS_AFTER_POST,
/* We don't really care much about these since we decompose them
* in the generic pre-shaping layer. They will only be used if
......@@ -124,13 +132,13 @@ enum indic_matra_category_t {
* TODO: There are some split matras without Unicode decompositions.
* We have to figure out what to do with them.
*/
INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = POS_BELOW_M,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT = POS_ABOVE_M,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = POS_POST_M,
INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = POS_AFTER_POST,
INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = POS_AFTER_POST,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = POS_BEFORE_POST,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = POS_AFTER_POST,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT = POS_BEFORE_POST,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = POS_AFTER_POST,
INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = POS_AFTER_POST,
INDIC_MATRA_CATEGORY_INVISIBLE = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
INDIC_MATRA_CATEGORY_OVERSTRUCK = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
......
......@@ -846,7 +846,7 @@ final_reordering_syllable (hb_buffer_t *buffer,
new_reph_pos = base;
/* XXX Skip potential pre-base reordering Ra. */
while (new_reph_pos < end &&
!( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_BELOW_C) | FLAG (POS_POST_C) | FLAG (POS_POST_M) | FLAG (POS_SMVD))))
!( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_BELOW_C) | FLAG (POS_POST_C) | FLAG (POS_AFTER_POST) | FLAG (POS_SMVD))))
new_reph_pos++;
if (new_reph_pos < end)
goto reph_move;
......@@ -862,7 +862,7 @@ final_reordering_syllable (hb_buffer_t *buffer,
{
new_reph_pos = base;
while (new_reph_pos < end &&
!( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_POST_M) | FLAG (POS_SMVD))))
!( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_AFTER_POST) | FLAG (POS_SMVD))))
new_reph_pos++;
if (new_reph_pos < end)
goto reph_move;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册