Refactor Devanagari key-styles

Change-Id: I799b04317d5b7daff4bb230294b2de474e5585eb
main
Tadashi G. Takaoka 2014-04-03 14:47:38 +09:00
parent 87d30a76b1
commit 303f440311
19 changed files with 104 additions and 47 deletions

View File

@ -26,7 +26,8 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<!-- U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
<Key
<key-style
latin:styleName="baseKeyDevanagariSignAnusvara"
latin:keySpec="&#x0902;"
latin:keyLabelFlags="fontNormal" />
</merge>

View File

@ -40,8 +40,9 @@
</default>
</switch>
<!-- U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU -->
<Key
latin:keyStyle="moreKeysDevanagariSignCandrabindu"
<key-style
latin:styleName="baseKeyDevanagariSignCandrabindu"
latin:parentStyle="moreKeysDevanagariSignCandrabindu"
latin:keySpec="&#x0901;"
latin:keyLabelFlags="fontNormal" />
</merge>

View File

@ -36,14 +36,23 @@
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x097D;,&#x0970;,&#x093D;" />
</case>
<case
latin:keyboardLayoutSet="nepali_romanized"
>
<!-- U+093C: "़" DEVANAGARI SIGN NUKTA -->
<key-style
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x093C;" />
</case>
<default>
<key-style
latin:styleName="moreKeysDevanagariSignNukta" />
</default>
</switch>
<!-- U+093C: "़" DEVANAGARI SIGN NUKTA -->
<Key
latin:keyStyle="moreKeysDevanagariSignNukta"
<key-style
latin:styleName="baseKeyDevanagariSignNukta"
latin:parentStyle="moreKeysDevanagariSignNukta"
latin:keySpec="&#x093C;"
latin:keyLabelFlags="fontNormal" />
</merge>

View File

@ -26,7 +26,8 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<!-- U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
<Key
<key-style
latin:styleName="baseKeyDevanagariVowelSignCandraO"
latin:keySpec="&#x0949;"
latin:keyLabelFlags="fontNormal" />
</merge>

View File

@ -48,8 +48,9 @@
</default>
</switch>
<!-- U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
<Key
latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
<key-style
latin:styleName="baseKeyDevanagariVowelSignVocalicR"
latin:parentStyle="moreKeysDevanagariVowelSignVocalicR"
latin:keySpec="&#x0943;"
latin:keyLabelFlags="fontNormal" />
</merge>

View File

@ -27,7 +27,8 @@
>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
<Key
<key-style
latin:styleName="baseKeyDevanagariSignAnusvara"
latin:keySpec="&#x25CC;&#x0902;|&#x0902;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>

View File

@ -42,8 +42,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU -->
<Key
latin:keyStyle="moreKeysDevanagariSignCandrabindu"
<key-style
latin:styleName="baseKeyDevanagariSignCandrabindu"
latin:parentStyle="moreKeysDevanagariSignCandrabindu"
latin:keySpec="&#x25CC;&#x0901;|&#x0901;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>

View File

@ -37,6 +37,15 @@
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x25CC;&#x097D;|&#x097D;,&#x25CC;&#x0970;|&#x0970;,&#x25CC;&#x093D;|&#x093D;" />
</case>
<case
latin:keyboardLayoutSet="nepali_romanized"
>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+093C: "़" DEVANAGARI SIGN NUKTA -->
<key-style
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x25CC;&#x093C;|&#x093C;" />
</case>
<default>
<key-style
latin:styleName="moreKeysDevanagariSignNukta" />
@ -44,8 +53,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+093C: "़" DEVANAGARI SIGN NUKTA -->
<Key
latin:keyStyle="moreKeysDevanagariSignNukta"
<key-style
latin:styleName="baseKeyDevanagariSignNukta"
latin:parentStyle="moreKeysDevanagariSignNukta"
latin:keySpec="&#x25CC;&#x093C;|&#x093C;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>

View File

@ -27,7 +27,8 @@
>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
<Key
<key-style
latin:styleName="baseKeyDevanagariVowelSignCandraO"
latin:keySpec="&#x25CC;&#x0949;|&#x0949;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>

View File

@ -50,8 +50,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
<Key
latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
<key-style
latin:styleName="baseKeyDevanagariVowelSignVocalicR"
latin:parentStyle="moreKeysDevanagariVowelSignVocalicR"
latin:keySpec="&#x25CC;&#x0943;|&#x0943;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>

View File

@ -92,9 +92,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+0967: "१" DEVANAGARI DIGIT ONE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_au" />
<!-- U+0967: "१" DEVANAGARI DIGIT ONE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAu"
latin:keyHintLabel="1"
@ -102,9 +102,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ai" />
<!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAi"
latin:keyHintLabel="2"
@ -112,9 +112,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_aa" />
<!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAa"
latin:keyHintLabel="3"
@ -122,9 +122,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+096A: "४" DEVANAGARI DIGIT FOUR -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ii" />
<!-- U+096A: "४" DEVANAGARI DIGIT FOUR -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignIi"
latin:keyHintLabel="4"
@ -132,9 +132,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+096B: "५" DEVANAGARI DIGIT FIVE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_uu" />
<!-- U+096B: "५" DEVANAGARI DIGIT FIVE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignUu"
latin:keyHintLabel="5"

View File

@ -33,7 +33,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
<Key
latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+0923: "ण" DEVANAGARI LETTER NNA -->
<Key
latin:keySpec="&#x0923;"
@ -59,7 +61,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
<Key
latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
<!-- U+091E: "ञ" DEVANAGARI LETTER NYA -->
<Key
latin:keySpec="&#x091E;"
@ -70,9 +74,16 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_vowel_sign_candra_o" />
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_candra_o" />
<Key
latin:keyStyle="baseKeyDevanagariVowelSignCandraO" />
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
<Key
latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+092E: "म" DEVANAGARI LETTER MA
U+0950: "ॐ" DEVANAGARI OM -->
<Key
@ -112,7 +123,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_nukta" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_nukta" />
<Key
latin:keyStyle="baseKeyDevanagariSignNukta" />
</default>
</switch>
</merge>

View File

@ -44,7 +44,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
<Key
latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
<!-- U+0925: "थ" DEVANAGARI LETTER THA -->
<Key
latin:keySpec="&#x0925;"
@ -81,21 +83,25 @@
latin:keyLabelFlags="fontNormal" />
</case>
<default>
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_sign_nukta" />
<!-- U+091F: "ट" DEVANAGARI LETTER TTA
U+0967: "१" DEVANAGARI DIGIT ONE
U+093C: "़" DEVANAGARI SIGN NUKTA -->
U+0967: "१" DEVANAGARI DIGIT ONE -->
<Key
latin:keySpec="&#x091F;"
latin:keyHintLabel="1"
latin:additionalMoreKeys="&#x0967;,1"
latin:moreKeys="&#x093C;"
latin:keyStyle="moreKeysDevanagariSignNukta"
latin:keyLabelFlags="fontNormal" />
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_au" />
<!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAu"
latin:keyHintLabel="2"
@ -103,9 +109,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_e" />
<!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignE"
latin:keyHintLabel="3"
@ -134,9 +140,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+096D: "७" DEVANAGARI DIGIT SEVEN -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_u" />
<!-- U+096D: "७" DEVANAGARI DIGIT SEVEN -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignU"
latin:keyHintLabel="7"
@ -144,9 +150,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+096E: "८" DEVANAGARI DIGIT EIGHT -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_i" />
<!-- U+096E: "८" DEVANAGARI DIGIT EIGHT -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignI"
latin:keyHintLabel="8"
@ -154,9 +160,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+096F: "९" DEVANAGARI DIGIT NINE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_o" />
<!-- U+096F: "९" DEVANAGARI DIGIT NINE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignO"
latin:keyHintLabel="9"

View File

@ -41,7 +41,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
<Key
latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+092D: "भ" DEVANAGARI LETTER BHA -->
<Key
latin:keySpec="&#x092D;"
@ -54,7 +56,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
<Key
latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"

View File

@ -91,7 +91,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
<Key
latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
</case>
<default>
<!-- U+091F: "ट" DEVANAGARI LETTER TTA

View File

@ -41,7 +41,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
<Key
latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+0926/U+094D/U+0926: "द्द" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DA -->
<Key
latin:keySpec="&#x0926;&#x094D;&#x0926;"

View File

@ -29,7 +29,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
<Key
latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"

View File

@ -29,7 +29,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
<Key
latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"
@ -53,9 +55,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<!-- U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_sign_visarga" />
<!-- U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA -->
<Key
latin:keyStyle="baseKeyDevanagariSignVisarga"
latin:moreKeys="&#x093D;" />

View File

@ -72,8 +72,7 @@ public final class NepaliRomanized extends LayoutBase {
// U+091F: "ट" DEVANAGARI LETTER TTA
// U+0967: "१" DEVANAGARI DIGIT ONE
// U+093C: "़" DEVANAGARI SIGN NUKTA
// TODO: Nukta should be moreKey(SIGN_NUKTA, "\u093C").
key("\u091F", joinMoreKeys("\u0967", "1", "\u093C")),
key("\u091F", joinMoreKeys("\u0967", "1", key(SIGN_NUKTA, "\u093C"))),
// U+094C: "ौ" DEVANAGARI VOWEL SIGN AU
// U+0968: "२" DEVANAGARI DIGIT TWO
key(VOWEL_SIGN_AU, "\u094C", joinMoreKeys("\u0968", "2")),