From 2e5c75b061a98e8d225d1c3cd0f1f859b7f9a345 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 12 Mar 2015 06:25:25 +0100 Subject: [PATCH] Synchronize with FreeType. This corresponds to commit d3284462c3f227a4bc396fa9f3b716e46d43f5c8, `[autofit] Add support for Arabic script.'. --- lib/tablue.dat | 10 ++++++++++ lib/taranges.c | 11 +++++++++++ lib/tastyles.h | 8 ++++++++ lib/ttfautohint-scripts.h | 5 +++++ 4 files changed, 34 insertions(+) diff --git a/lib/tablue.dat b/lib/tablue.dat index 415d5d6..b20dd86 100644 --- a/lib/tablue.dat +++ b/lib/tablue.dat @@ -70,6 +70,11 @@ TA_BLUE_STRING_ENUM TA_BLUE_STRINGS_ARRAY TA_BLUE_STRING_MAX_LEN: + TA_BLUE_STRING_ARABIC_TOP + "ا إ ل ك ط ظ" + TA_BLUE_STRING_ARABIC_JOIN + "ت ث ط ظ ك" + TA_BLUE_STRING_CYRILLIC_CAPITAL_TOP "БВЕПЗОСЭ" TA_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM @@ -211,6 +216,11 @@ TA_BLUE_STRING_ENUM TA_BLUE_STRINGS_ARRAY TA_BLUE_STRING_MAX_LEN: TA_BLUE_STRINGSET_ENUM TA_BLUE_STRINGSETS_ARRAY TA_BLUE_STRINGSET_MAX_LEN: + TA_BLUE_STRINGSET_ARAB + { TA_BLUE_STRING_ARABIC_TOP, TA_BLUE_PROPERTY_LATIN_TOP } + { TA_BLUE_STRING_ARABIC_JOIN, 0 } + { TA_BLUE_STRING_MAX, 0 } + TA_BLUE_STRINGSET_CYRL { TA_BLUE_STRING_CYRILLIC_CAPITAL_TOP, TA_BLUE_PROPERTY_LATIN_TOP } { TA_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } diff --git a/lib/taranges.c b/lib/taranges.c index bb505f6..60c60d6 100644 --- a/lib/taranges.c +++ b/lib/taranges.c @@ -20,6 +20,17 @@ #include "taranges.h" +const TA_Script_UniRangeRec ta_arab_uniranges[] = +{ + TA_UNIRANGE_REC( 0x0600UL, 0x06FFUL), /* Arabic */ + TA_UNIRANGE_REC( 0x0750UL, 0x07FFUL), /* Arabic Supplement */ + TA_UNIRANGE_REC( 0x08A0UL, 0x08FFUL), /* Arabic Extended-A */ + TA_UNIRANGE_REC( 0xFB50UL, 0xFDFFUL), /* Arabic Presentation Forms-A */ + TA_UNIRANGE_REC( 0xFE70UL, 0xFEFFUL), /* Arabic Presentation Forms-B */ + TA_UNIRANGE_REC(0x1EE00UL, 0x1EEFFUL), /* Arabic Mathematical Alphabetic Symbols */ + TA_UNIRANGE_REC( 0UL, 0UL) +}; + const TA_Script_UniRangeRec ta_cyrl_uniranges[] = { TA_UNIRANGE_REC(0x0400UL, 0x04FFUL), /* Cyrillic */ diff --git a/lib/tastyles.h b/lib/tastyles.h index 3670092..31e9862 100644 --- a/lib/tastyles.h +++ b/lib/tastyles.h @@ -84,6 +84,14 @@ "default", \ DEFAULT) + +STYLE(arab_dflt, ARAB_DFLT, + "Arabic default style", + TA_WRITING_SYSTEM_LATIN, + TA_SCRIPT_ARAB, + TA_BLUE_STRINGSET_ARAB, + TA_COVERAGE_DEFAULT) + META_STYLE_LATIN(cyrl, CYRL, "Cyrillic") STYLE(deva_dflt, DEVA_DFLT, diff --git a/lib/ttfautohint-scripts.h b/lib/ttfautohint-scripts.h index e055855..4befa79 100644 --- a/lib/ttfautohint-scripts.h +++ b/lib/ttfautohint-scripts.h @@ -28,6 +28,11 @@ * the standard width of stems). */ +SCRIPT(arab, ARAB, + "Arabic", + HB_SCRIPT_ARABIC, + 0x644, 0x62D, 0x640) /* ل ح ـ */ + SCRIPT(cyrl, CYRL, "Cyrillic", HB_SCRIPT_CYRILLIC, -- 2.11.4.GIT