简体   繁体   English

在Java中定义新字符(Android)

[英]Defining new Characters in Java (Android)

I am looking to apply an alphabet that does not exist in the UTF-Setup currently applied to all of my view elements and Swing components. 我希望应用当前应用于所有视图元素和Swing组件的UTF-Setup中不存在的字母。 To display these new characters, would I have to simply have each as its own image and then present the images adjacent to one another as in a character-like pattern, or is there any method by which to import letters from pictures to be added to something like a text area upon acting on a button? 要显示这些新字符,我是否必须简单地将每个图像作为自己的图像,然后以类似字符的模式将图像彼此相邻显示,或者是否有任何方法可以从要添加的图片中导入字母?在按下按钮时就像是文本区域一样? Basically, if I have a pictograph system, may I import these images as characters, or would I have to maintain them as pictures? 基本上,如果我有一个象形文字系统,是否可以将这些图像作为字符导入,还是必须将它们作为图片进行维护?

To give some specificity, picture, Klingon writing or Dragon language, something that certainly is not defined in the standard packages of Character sets. 为了提供一些特性,图片,克林贡文字或Dragon语言,这在字符集的标准软件包中肯定没有定义。

Thank you! 谢谢!

Best way I can think of to do this is to create some font file (.ttf, .otf, etc.) representing your special alphabet and then proceed to follow the instructions in this answer here . 我能想到的最好的方法是创建一些表示您的特殊字母的字体文件(.ttf,.otf等),然后继续按照此处答案中的说明进行操作。

Downside is, there really isn't any easy way to create font files. 缺点是,实际上没有任何简单的方法可以创建字体文件。 Usually it involves many hours manually tracing symbols using a vector graphic editor and compiling those to a font file. 通常,它涉及许多时间,使用矢量图形编辑器手动跟踪符号并将其编译为字体文件。

If your characters are already vector images, then most of the work will have already been done. 如果您的角色已经是矢量图像,那么大部分工作将已经完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM