|
|
|
@ -35,7 +35,7 @@ |
|
|
|
|
#include "hb-ot-shape-complex-private.hh" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define USE_TABLE_ELEMENT_TYPE uint16_t |
|
|
|
|
#define USE_TABLE_ELEMENT_TYPE uint8_t |
|
|
|
|
|
|
|
|
|
/* Cateories used in the Universal Shaping Engine spec:
|
|
|
|
|
* https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm
|
|
|
|
@ -90,70 +90,6 @@ enum use_category_t { |
|
|
|
|
USE_SMBlw = 42 /* SYM_MOD_BELOW */ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/* Categories used in IndicSyllabicCategory.txt from UCD. */ |
|
|
|
|
enum indic_syllabic_category_t |
|
|
|
|
{ |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_AVAGRAHA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_BINDU, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_BRAHMI_JOINING_NUMBER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CANTILLATION_MARK, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_KILLER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_PRECEDING_REPHA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_PREFIXED, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_CONSONANT_WITH_STACKER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_INVISIBLE_STACKER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_JOINER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_NON_JOINER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_NUKTA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_NUMBER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_OTHER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_PURE_KILLER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_TONE_LETTER, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_TONE_MARK, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_VIRAMA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_VISARGA, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_VOWEL, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT, |
|
|
|
|
INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/* Categories used in IndicPositionalCategory.txt from UCD */ |
|
|
|
|
enum indic_positional_category_t { |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_BOTTOM, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_BOTTOM_AND_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_LEFT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_LEFT_AND_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_NOT_APPLICABLE, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_OVERSTRUCK, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP_AND_BOTTOM, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP_AND_LEFT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP_AND_LEFT_AND_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_TOP_AND_RIGHT, |
|
|
|
|
INDIC_POSITIONAL_CATEGORY_VISUAL_ORDER_LEFT, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation
|
|
|
|
|
* because gcc fails to optimize the latter and fills the table in at runtime. */ |
|
|
|
|
#define USE_COMBINE_CATEGORIES(S,P) \ |
|
|
|
|
(ASSERT_STATIC_EXPR_ZERO (S < 255 && P < 255) + \
|
|
|
|
|
((P << 8) | S)) |
|
|
|
|
|
|
|
|
|
HB_INTERNAL USE_TABLE_ELEMENT_TYPE |
|
|
|
|
hb_use_get_categories (hb_codepoint_t u); |
|
|
|
|
|
|
|
|
|