Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 722eeb14 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix drawing Arabic diacritics

Bug: 8001868
Change-Id: I0e5aab266bbaad8c68e4a900b8d5572977a0379d
parent 019bcc62
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ public final class KeyboardTextsSet {
        // U+064E: "َ" ARABIC FATHA
        // U+0640: "ـ" ARABIC TATWEEL
        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
        /* 57 */ "!fixedColumnOrder!7,\u0655,\u0654,\u0652,\u064D,\u064C,\u064B,\u0651,\u0656,\u0670,\u0653,\u0650,\u064F,\u064E,\u0640\u0640\u0640|\u0640",
        /* 57 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
        /* 58 */ "\u0651",
        // U+0661: "١" ARABIC-INDIC DIGIT ONE
        /* 59 */ "\u0661",
@@ -1327,7 +1327,7 @@ public final class KeyboardTextsSet {
        // U+064E: "َ" ARABIC FATHA
        // U+0640: "ـ" ARABIC TATWEEL
        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
        /* 57 */ "!fixedColumnOrder!7,\u0655,\u0652,\u0651,\u064C,\u064D,\u064B,\u0654,\u0656,\u0670,\u0653,\u064F,\u0650,\u064E,\u0640\u0640\u0640|\u0640",
        /* 57 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
        /* 58 */ "\u064B",
        // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE
        /* 59 */ "\u06F1",
+2 −1
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@
         U+064E: "َ" ARABIC FATHA
         U+0640: "ـ" ARABIC TATWEEL -->
    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
    <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7,&#x0655;,&#x0654;,&#x0652;,&#x064D;,&#x064C;,&#x064B;,&#x0651;,&#x0656;,&#x0670;,&#x0653;,&#x0650;,&#x064F;,&#x064E;,&#x0640;&#x0640;&#x0640;|&#x0640;"</string>
    <!-- Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. -->
    <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7,&#x20;&#x0655;|&#x0655;,&#x20;&#x0654;|&#x0654;,&#x20;&#x0652;|&#x0652;,&#x20;&#x064D;|&#x064D;,&#x20;&#x064C;|&#x064C;,&#x20;&#x064B;|&#x064B;,&#x20;&#x0651;|&#x0651;,&#x20;&#x0656;|&#x0656;,&#x20;&#x0670;|&#x0670;,&#x20;&#x0653;|&#x0653;,&#x20;&#x0650;|&#x0650;,&#x20;&#x064F;|&#x064F;,&#x20;&#x064E;|&#x064E;,&#x0640;&#x0640;&#x0640;|&#x0640;"</string>
    <string name="keyhintlabel_for_arabic_diacritics">&#x0651;</string>
</resources>
+2 −1
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@
         U+064E: "َ" ARABIC FATHA
         U+0640: "ـ" ARABIC TATWEEL -->
    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
    <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7,&#x0655;,&#x0652;,&#x0651;,&#x064C;,&#x064D;,&#x064B;,&#x0654;,&#x0656;,&#x0670;,&#x0653;,&#x064F;,&#x0650;,&#x064E;,&#x0640;&#x0640;&#x0640;|&#x0640;"</string>
    <!-- Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. -->
    <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7,&#x20;&#x0655;|&#x0655;,&#x20;&#x0652;|&#x0652;,&#x20;&#x0651;|&#x0651;,&#x20;&#x064C;|&#x064C;,&#x20;&#x064D;|&#x064D;,&#x20;&#x064B;|&#x064B;,&#x20;&#x0654;|&#x0654;,&#x20;&#x0656;|&#x0656;,&#x20;&#x0670;|&#x0670;,&#x20;&#x0653;|&#x0653;,&#x20;&#x064F;|&#x064F;,&#x20;&#x0650;|&#x0650;,&#x20;&#x064E;|&#x064E;,&#x0640;&#x0640;&#x0640;|&#x0640;"</string>
    <string name="keyhintlabel_for_arabic_diacritics">&#x064B;</string>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.inputmethod.latin.maketext;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.ext.DefaultHandler2;

import java.io.IOException;
@@ -48,6 +49,9 @@ public class StringResourceMap {
            parser.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
            parser.parse(is, handler);
        } catch (ParserConfigurationException e) {
        } catch (SAXParseException e) {
            throw new RuntimeException(e.getMessage() + " at line " + e.getLineNumber()
                    + ", column " + e.getColumnNumber());
        } catch (SAXException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IOException e) {