Permalink
Browse files

Add korean emoticon into hanjaComposer

  • Loading branch information...
JimJeon authored and youknowone committed Oct 11, 2018
1 parent 4f76abe commit 66cd4ffe531ad1097be274495d6682434c3ef406
Showing with 6 additions and 1 deletion.
  1. +4 −0 Gureum.xcodeproj/project.pbxproj
  2. +2 −1 OSX/HanjaComposer.swift
@@ -95,6 +95,7 @@
8FB2D1F50746B5A15A5617BE /* libPods-OSXTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E73EDD6DBCA6CA17A1708BE5 /* libPods-OSXTests.a */; };
A34E20012168B21B00B12476 /* GureumTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BAAE062160C6970076C66D /* GureumTests.swift */; };
A34E2025216ADBEC00B12476 /* emoji.txt in Copy Hanja Files */ = {isa = PBXBuildFile; fileRef = A34E2024216ADBEC00B12476 /* emoji.txt */; };
A36A435B216F86780052BE12 /* emoji_ko.txt in Copy Hanja Files */ = {isa = PBXBuildFile; fileRef = A36A4358216F86780052BE12 /* emoji_ko.txt */; };
A3F007682160B09700501606 /* EmoticonComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3F007652160B09700501606 /* EmoticonComposer.swift */; };
B0DE8679435065D0866D2AAF /* Pods_PreferencesApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F10FF4A81E4501FB2F71251 /* Pods_PreferencesApp.framework */; };
DAA59CC398282039EE3F4265 /* libPods-OSX.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 057B3CD9EB092349BD540E8B /* libPods-OSX.a */; };
@@ -179,6 +180,7 @@
dstPath = hanja;
dstSubfolderSpec = 7;
files = (
A36A435B216F86780052BE12 /* emoji_ko.txt in Copy Hanja Files */,
A34E2025216ADBEC00B12476 /* emoji.txt in Copy Hanja Files */,
3835B52E1F5DABB400896BEC /* mssymbol.txt in Copy Hanja Files */,
3835B52D1F5DABAF00896BEC /* hanja.txt in Copy Hanja Files */,
@@ -344,6 +346,7 @@
871B807B2153DDFA0013EE69 /* CIMInputManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CIMInputManager.swift; sourceTree = "<group>"; };
9B1EC9A5CFCEEBC9368AE9A9 /* Pods-PreferencesApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PreferencesApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PreferencesApp/Pods-PreferencesApp.debug.xcconfig"; sourceTree = "<group>"; };
A34E2024216ADBEC00B12476 /* emoji.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = emoji.txt; path = OSX/data/hanja/emoji.txt; sourceTree = "<group>"; };
A36A4358216F86780052BE12 /* emoji_ko.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = emoji_ko.txt; path = OSX/data/hanja/emoji_ko.txt; sourceTree = "<group>"; };
A3BAAE062160C6970076C66D /* GureumTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GureumTests.swift; sourceTree = "<group>"; };
A3F007652160B09700501606 /* EmoticonComposer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmoticonComposer.swift; sourceTree = "<group>"; };
ACF9BC1D0ED009626F8CD0E5 /* Pods-Preferences.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Preferences.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Preferences/Pods-Preferences.debug.xcconfig"; sourceTree = "<group>"; };
@@ -579,6 +582,7 @@
38863C4E140E62D100A8ED76 = {
isa = PBXGroup;
children = (
A36A4358216F86780052BE12 /* emoji_ko.txt */,
A34E2024216ADBEC00B12476 /* emoji.txt */,
387DFFFE1421F1E000DAE6F4 /* Common Input Method */,
38162DF6141263270077AA2D /* OSX */,
View
@@ -15,6 +15,7 @@ class HanjaComposer: CIMComposer {
static let wordTable: HGHanjaTable = HGHanjaTable(contentOfFile: Bundle.main.path(forResource: "hanjaw", ofType: "txt", inDirectory: "hanja")!)
static let reversedTable: HGHanjaTable = HGHanjaTable(contentOfFile: Bundle.main.path(forResource: "hanjar", ofType: "txt", inDirectory: "hanja")!)
static let msSymbolTable: HGHanjaTable = HGHanjaTable(contentOfFile: Bundle.main.path(forResource: "mssymbol", ofType: "txt", inDirectory: "hanja")!)
static let emojiTable: HGHanjaTable = HGHanjaTable(contentOfFile: Bundle.main.path(forResource: "emoji_ko", ofType: "txt", inDirectory: "hanja")!)
var _candidates: [String]?
var _bufferedString: String = ""
@@ -162,7 +163,7 @@ class HanjaComposer: CIMComposer {
} else {
// dlog(DEBUG_HANJACOMPOSER, "HanjaComposer -updateHanjaCandidates candidates");
var candidates: [String] = []
for table in [HanjaComposer.msSymbolTable, HanjaComposer.wordTable, HanjaComposer.reversedTable, HanjaComposer.characterTable] {
for table in [HanjaComposer.msSymbolTable, HanjaComposer.wordTable, HanjaComposer.reversedTable, HanjaComposer.characterTable, HanjaComposer.emojiTable] {
dlog(DEBUG_HANJACOMPOSER, "HanjaComposer -updateHanjaCandidates getting list for table: %@", table);
let list: HGHanjaList = table.hanjas(byPrefixSearching: keyword) ?? HGHanjaList()
dlog(DEBUG_HANJACOMPOSER, "HanjaComposer -updateHanjaCandidates getting list: %@", list);

0 comments on commit 66cd4ff

Please sign in to comment.