Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit fe192fe

Browse files
author
Yuncong Zhang
committed
Update README for Emoji.
1 parent 7429e06 commit fe192fe

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README-ZH.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ $JSEvents
211211
默认情况下,Unity会将导入图片的宽和高放缩为最近的等于2的幂的整数。
212212
在UIWidgets中使用图片时,记得将这一特性关闭,以免图片被意外放缩,方法如下:在Project面板中选中图片,在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。
213213

214+
#### 十、更新表情(Emoji)
215+
UIWidgets支持渲染文本中包含的表情。表情的图片来自[https://www.joypixels.com](https://www.joypixels.com/)提供的免费资源。
216+
如果您希望使用自己的表情图片,请更新纹理图`Tests/Resources/Emoji.png`,以及`Runtime/ui/txt/emoji.cs`中将Unicode映射到纹理图中具体位置的映射表。
217+
特别地,请记得更新Dictionary变量`emojiLookupTable`,纹理图的行数`rowCount`以及纹理图的列数`colCount`
218+
219+
214220
## 调试UIWidgets应用程序
215221

216222
#### 定义UIWidgets_DEBUG

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ To learn about the original script in detail, please refer to `SystemInfo.js` an
248248
Unity, by default, resizes the width and height of an imported image to the nearest integer that is a power of 2.
249249
In UIWidgets, you should almost always disable this by selecting the image in the "Project" panel, then in the "Inspector" panel set the "Non Power of 2" option (in "Advanced") to "None", to prevent your image from being resized unexpectedly.
250250

251+
#### Update Emoji
252+
UIWidgets supports rendering emoji in (editable) texts. The emoji images comes from the free
253+
resources provided by [https://www.joypixels.com](https://www.joypixels.com/). If you would
254+
like to use your own images for emoji, please update the texture image `Tests/Resources/Emoji.png`,
255+
and the unicode-index table in `Runtime/ui/txt/emoji.cs` which maps unicodes to specific locations
256+
in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows
257+
in the texture `rowCount`, and number of columns `colCount`.
258+
259+
251260
## Debug UIWidgets Application
252261

253262
#### Define UIWidgets_DEBUG

0 commit comments

Comments
 (0)