How to Insert NSAttributedString using custom keyboard extension?

﹥>﹥吖頭↗ 提交于 2019-11-30 12:57:05

It is not possible to insert attributed strings (or otherwise rich content) using the text document proxy.

The keyboards you have linked are not using custom fonts. They use (or abuse) Unicode symbols such as Enclosed Alphanumerics and Enclosed Alphanumeric Supplement.

In other instances, different alphabet symbols with visual similarity to latin symbols are used to create "funky" text, like here.

Last, some keyboard extensions, like the image keyboards, use the pasteboard to copy the rich content, and the user is responsible to paste it where he seems fit.

The apps you are referring to don't use NSAttributedString or custom fonts. They simply replace letters with similar-looking Unicode characters. You can see these characters in any OS X app inside Edit -> Special Characters menu.

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