aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/digraph_utils.cpp
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-04-15 18:25:50 -0700
committerKen Wakasa <kwakasa@google.com>2013-04-16 20:08:42 +0900
commit3970352ea907cbea63e342f370bb0bbb9cc7335a (patch)
tree3ff8847f7169f9df96e993b6b937ad526ccef2c0 /native/jni/src/digraph_utils.cpp
parente01e22e1ea2d8fd3e924ce42b40d0500803ea47e (diff)
downloadlatinime-3970352ea907cbea63e342f370bb0bbb9cc7335a.tar.gz
latinime-3970352ea907cbea63e342f370bb0bbb9cc7335a.tar.xz
latinime-3970352ea907cbea63e342f370bb0bbb9cc7335a.zip
Make digraph lookups case insensitive
Example: Be able to gesture dictionary words that start with an upper-case German umlaut (e.g., Übermensch). Bug: 8493920 Change-Id: I3253bcd236d34c0af60116e5b41e359f2715bf97
Diffstat (limited to 'native/jni/src/digraph_utils.cpp')
-rw-r--r--native/jni/src/digraph_utils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/src/digraph_utils.cpp b/native/jni/src/digraph_utils.cpp
index 6a1ab0271..083442669 100644
--- a/native/jni/src/digraph_utils.cpp
+++ b/native/jni/src/digraph_utils.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "char_utils.h"
#include "binary_format.h"
#include "defines.h"
#include "digraph_utils.h"
@@ -120,10 +121,11 @@ const DigraphUtils::DigraphType DigraphUtils::USED_DIGRAPH_TYPES[] =
/* static */ const DigraphUtils::digraph_t *DigraphUtils::getDigraphForDigraphTypeAndCodePoint(
const DigraphUtils::DigraphType digraphType, const int compositeGlyphCodePoint) {
const DigraphUtils::digraph_t *digraphs = 0;
+ const int compositeGlyphLowerCodePoint = toLowerCase(compositeGlyphCodePoint);
const int digraphsSize =
DigraphUtils::getAllDigraphsForDictionaryAndReturnSize(digraphType, &digraphs);
for (int i = 0; i < digraphsSize; i++) {
- if (digraphs[i].compositeGlyph == compositeGlyphCodePoint) {
+ if (digraphs[i].compositeGlyph == compositeGlyphLowerCodePoint) {
return &digraphs[i];
}
}