From 2b5090e54b291df69b4b1537de954e44962ffc36 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 5 Feb 2015 09:25:40 +0100 Subject: [PATCH] Synchronize with FreeType [4/4]. This corresponds to commit 19146a5302a47ee8430a00bfa8c2acaf9539d6a2, `[autofit] Add support for Thai script.'. --- lib/tablue.dat | 27 ++++++++++++++++++++++++++- lib/taranges.c | 6 ++++++ lib/tastyles.h | 7 +++++++ lib/ttfautohint-scripts.h | 5 +++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/lib/tablue.dat b/lib/tablue.dat index 84e16e1..415d5d6 100644 --- a/lib/tablue.dat +++ b/lib/tablue.dat @@ -126,10 +126,24 @@ TA_BLUE_STRING_ENUM TA_BLUE_STRINGS_ARRAY TA_BLUE_STRING_MAX_LEN: // this is just for convenience to simplify reading TA_BLUE_STRING_TELUGU_TOP "ఇ ఌ ఙ ఞ ణ ఱ ౯" - TA_BLUE_STRING_TELUGU_BOTTOM "అ క చ ర ఽ ౨ ౬" + TA_BLUE_STRING_THAI_TOP + "บ เ แ อ ก า" + TA_BLUE_STRING_THAI_BOTTOM + "บ ป ษ ฯ อ ย ฮ" + TA_BLUE_STRING_THAI_ASCENDER + "ป ฝ ฟ" + TA_BLUE_STRING_THAI_LARGE_ASCENDER + "โ ใ ไ" + TA_BLUE_STRING_THAI_DESCENDER + "ฎ ฏ ฤ ฦ" + TA_BLUE_STRING_THAI_LARGE_DESCENDER + "ญ ฐ" + TA_BLUE_STRING_THAI_DIGIT_TOP + "๐ ๑ ๓" + // The blue zone stringsets, as used in the script styles, cf. `tastyles.h'. // // The TA_BLUE_PROPERTY_XXX flags are defined in `tablue.h'; here some @@ -248,4 +262,15 @@ TA_BLUE_STRINGSET_ENUM TA_BLUE_STRINGSETS_ARRAY TA_BLUE_STRINGSET_MAX_LEN: { TA_BLUE_STRING_TELUGU_BOTTOM, 0 } { TA_BLUE_STRING_MAX, 0 } + TA_BLUE_STRINGSET_THAI + { TA_BLUE_STRING_THAI_TOP, TA_BLUE_PROPERTY_LATIN_TOP | + TA_BLUE_PROPERTY_LATIN_X_HEIGHT } + { TA_BLUE_STRING_THAI_BOTTOM, 0 } + { TA_BLUE_STRING_THAI_ASCENDER, TA_BLUE_PROPERTY_LATIN_TOP } + { TA_BLUE_STRING_THAI_LARGE_ASCENDER, TA_BLUE_PROPERTY_LATIN_TOP } + { TA_BLUE_STRING_THAI_DESCENDER, 0 } + { TA_BLUE_STRING_THAI_LARGE_DESCENDER, 0 } + { TA_BLUE_STRING_THAI_DIGIT_TOP, 0 } + { TA_BLUE_STRING_MAX, 0 } + // END diff --git a/lib/taranges.c b/lib/taranges.c index 9eaf719..bb505f6 100644 --- a/lib/taranges.c +++ b/lib/taranges.c @@ -94,6 +94,12 @@ const TA_Script_UniRangeRec ta_telu_uniranges[] = TA_UNIRANGE_REC( 0UL, 0UL) }; +const TA_Script_UniRangeRec ta_thai_uniranges[] = +{ + TA_UNIRANGE_REC(0x0E00UL, 0x0E7FUL), /* Thai */ + TA_UNIRANGE_REC( 0UL, 0UL) +}; + const TA_Script_UniRangeRec ta_none_uniranges[] = { TA_UNIRANGE_REC(0UL, 0UL) diff --git a/lib/tastyles.h b/lib/tastyles.h index ce2028b..3670092 100644 --- a/lib/tastyles.h +++ b/lib/tastyles.h @@ -120,6 +120,13 @@ STYLE(telu_dflt, TELU_DFLT, TA_BLUE_STRINGSET_TELU, TA_COVERAGE_DEFAULT) +STYLE(thai_dflt, THAI_DFLT, + "Thai default style", + TA_WRITING_SYSTEM_LATIN, + TA_SCRIPT_THAI, + TA_BLUE_STRINGSET_THAI, + TA_COVERAGE_DEFAULT) + STYLE(none_dflt, NONE_DFLT, "no style", TA_WRITING_SYSTEM_DUMMY, diff --git a/lib/ttfautohint-scripts.h b/lib/ttfautohint-scripts.h index 95bb052..e055855 100644 --- a/lib/ttfautohint-scripts.h +++ b/lib/ttfautohint-scripts.h @@ -58,6 +58,11 @@ SCRIPT(telu, TELU, HB_SCRIPT_TELUGU, 0xC19, 0xC12, 0x0) /* ఙ ఒ */ +SCRIPT(thai, THAI, + "Thai", + HB_SCRIPT_THAI, + 0xE32, 0xE45, 0xE50) /* า ๅ ๐ */ + SCRIPT(none, NONE, "no script", HB_SCRIPT_INVALID, -- 2.11.4.GIT