Are new characters possible with a custom keyboard in iOS 8?

跟風遠走 提交于 2019-12-21 16:51:47

问题


In iOS 8, Apple has given developers the ability to create custom keyboards. In the documentation, Apple states that you should create a new keyboard if you want to support a language that iOS does not currently support. Therefore, if you are able to support new languages, are you able to create a keyboard that contains new emoji characters? I would assume that by Apple stating that you can support a new language, they would expect there to be custom characters involved. If including custom characters is possible, how would other devices (even if only other devices running iOS 8) display the new characters?


回答1:


Per the App Extension Programming Guide, a custom keyboard takes touch or gesture input (or whatever else, really) and produces NSString objects for insertion into text fields or other text-based controls.

So, the answer to your question is mostly no -- a keyboard can input only things that the system sees as text.

How, then, does Apple talk of using this feature to add new keyboard languages? There are lots of scripts covered by Unicode. Some of them even have glyphs in the fonts that ship with iOS, but aren't covered by an Apple-provided keyboard. (For example, the Canadian Aboriginal alphabet.) A third-party keyboard could cover such a script to provide support for a language that doesn't have an Apple keyboard.

There are also all sorts of scripts in Unicode not covered by the built in fonts in iOS, including many real languages as well as informal standards not recognized by the Unicode consortium -- there you'll find Klingon, Quenya, and Dr. Suess' On Beyond Zebra. A third-party keyboard could also add support for such scripts, but only if the user has appropriate fonts installed for rendering them.

So if you want to invent your own Emoji, you'll have to provide:

  • a custom keyboard
  • a font with your characters (at code points not otherwise used in Unicode)
  • a community of users / vendors of other software who know the mapping of code points to your invented glyphs
  • and are using your custom font in other apps and other platforms.

(If you just want to add something like the newly announced Unicode 7.0 emoji, you can skip step 3.)



来源:https://stackoverflow.com/questions/24255631/are-new-characters-possible-with-a-custom-keyboard-in-ios-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!