如何在A帧Web VR中添加特殊字符(čšž...) [英] How to include special characters in A-frame web VR (čšž...)
问题描述
我想创建一个不仅可以用英语阅读的网站,而且我也遇到特殊字符的问题。我尝试了ascii html。
有什么想法吗?
I want to create a website readable not only in english but i have problems with special characters. I've tried ascii html. Any idea?
推荐答案
如果您对文本组件有麻烦,可以考虑以下三种方法:
If You have troble with the text component there are three ways I can think of:
1)正确的方法:从包含那些字符的字体集中查找或生成一种字体。这些文档描述了如何使用自定义字体:
1) The proper way: find or generate a font from a fontset containing those characters. The docs describe how to use custom fonts:
<a-entity text="text: Hello World; font: ../fonts/CustomFnt.fnt;
fontImage: ../fonts/CustomFnt.png"></a-entity>
但是您需要一个字体文件+一个带有字体图像的.png网格。
这些文档还提供了指向工具的链接,用于生成字体作为教程。
But you need to have a font file + a .png grid with the font images. The docs provide a link to a tool for generating fonts, as well as a tutorial.
2)签出Don McCurdy的自定义字体生成器!
2) check out Don McCurdy's custom font generator !
3)解决方法:您可以制作一个包含文字的透明图像,然后将其放在< a-plane>
上,在此处。
3) The workaround: You could make a transparent image containing Your text and put it on an <a-plane>
, like I did here.
这篇关于如何在A帧Web VR中添加特殊字符(čšž...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!