diff --git a/Documentation~/com.unity.uiwidgets.md b/Documentation~/com.unity.uiwidgets.md index c9181232..f74b8fcb 100644 --- a/Documentation~/com.unity.uiwidgets.md +++ b/Documentation~/com.unity.uiwidgets.md @@ -228,8 +228,10 @@ Status bar is always hidden by default when an Unity project is running on an An #### Automatically Adjust Frame Rate To build an App that is able to adjust the frame rate automatically, please open Project Settings, and in the Quality tab, set the "V Sync Count" option of the target platform to "Don't Sync". -The default logic is to set the frame rate to 25 when the screen is static, and change the frame rate to 60 whenever the screen changes. -If you would like to modify the behavior of speeding up or cooling down the frame rate, please set `Window.onFrameRateSpeedUp` and/or `Window.onFrameRateCoolDown` to your own functions. +The default logic is to reduce the frame rate when the screen is static, and change it back to 60 whenever the screen changes. +If you would like to disable this behavior, please set `Window.onFrameRateSpeedUp` and `Window.onFrameRateCoolDown` to null function, i.e., () => {}. + +Note that in Unity 2019.3 and above, UIWidgets will use OnDemandRenderAPI to implement this feature, which will greatly save the battery. #### WebGL Canvas Device Pixel Ratio Plugin The width and height of the Canvas in browser may differ from the number of pixels the Canvas occupies on the screen. @@ -258,12 +260,34 @@ Unity, by default, resizes the width and height of an imported image to the near 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. #### Update Emoji -UIWidgets supports rendering emoji in (editable) texts. The emoji images comes from the free -resources provided by [Google Emoji](https://emojipedia.org/google). If you would -like to use your own images for emoji, please update the texture image `Tests/Resources/Emoji.png`, -and the unicode-index table in `Runtime/ui/txt/emoji.cs` which maps unicodes to specific locations -in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows -in the texture `rowCount`, and number of columns `colCount`. +UIWidgets supports rendering emoji in (editable) texts. +The default emoji resource version is [iOS 13.2](https://emojipedia.org/apple/ios-13.2). +We also prepared the resources of [Google Emoji](https://emojipedia.org/google). +To switch to Google version of emoji, please follow the following steps: + +1. Copy `Runtime/Resources/backup~/EmojiGoogle.png` to `Runtime/Resources/images` folder. +2. In the **Project** panel, find and select `EmojiGoogle` asset, and in the **Inspector** panel, change **Max Size** to 4096, and disable **Generate Mipmaps**. +3. In the `OnEnable()` function in your class overriding `UIWidgetsPanel`, add the following code + +```csharp +EmojiUtils.configuration = EmojiUtils.googleEmojiConfiguration; +``` + +If you would like to use your own images for emoji, please follow the following steps: + +1. Create the sprite sheet (take `EmojiGoogle.png` as an example), and put in a `Resources` folder in your project, (for example `Resources/myImages/MyEmoji.png`). +2. In the `OnEnable()` function, add the following code (replace example values with actual value). Note that the order of emoji codes should be consistent with the sprite sheet. + +```csharp +EmojiUtils.configuration = new EmojiResourceConfiguration( + spriteSheetAssetName: "myImage/MyEmoji", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, ... + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37, +); +``` #### Interact with GameObject Drag&Drops @@ -273,8 +297,6 @@ in the texture `rowCount`, and number of columns `colCount`. With the provided packaged stateful widget `UnityObjectDetector` and its `onRelease` callback function, you can easily drag some objects (for example GameObject from Hierarchy, files from Project Window, etc) into the area, get the UnityEngine.Object[] references and make further modification. -Please refer to "UIWidgetsTests -> Drag&Drop" for simple examples. - ## Debug UIWidgets Application @@ -288,6 +310,7 @@ The symbol is for debug purpose, please remove it from your release build. #### UIWidgets Inspector The UIWidgets Inspector tool is for visualizing and exploring the widget trees. You can find it via *Window/Analysis/UIWidgets* inspector in Editor menu. + **Note** * **UIWidgets_DEBUG** needs to be define for inspector to work properly. * Inspector currently only works in Editor Play Mode, inspect standalone built application is not supported for now. @@ -295,13 +318,19 @@ via *Window/Analysis/UIWidgets* inspector in Editor menu. ## Learn #### Samples -You can find many UIWidgets App samples in the UIWidgets package in the **Samples** folder. -Feel free to try them out and make modifications to see the results. -To get started, the UIWidgetsTheatre scene provides you -a list of carefully selected samples to start with. - -You can also try UIWidgets-based Editor windows by clicking **UIWidgetsTest** on the main menu +You can find many UIWidgets sample projects on Github, which cover different aspects and provide you +learning materials in various levels: +* UIWidgetsSamples (https://github.com/UIWidgets/UIWidgetsSamples). These samples are developed by the dev team in order to illustrates all the features of +UIWidgets. First clone this Repo to the **Assets** folder of your local UIWidgets project. Then +you can find all the sample scenes under the **Scene** folder. +You can also try UIWidgets-based Editor windows by clicking the new **UIWidgetsTests** tab on the main menu and open one of the dropdown samples. +* awesome-UIWidgets by Liangxie (https://github.com/liangxiegame/awesome-uiwidgets). This Repo contains +lots of UIWidget demo apps and third-party applications. +* ConnectApp (https://github.com/UnityTech/ConnectAppCN). This is an online, open-source UIWidget-based App developed +by the dev team. If you are making your own App with UIWidgets, this project will provides you with +many best practice cases. + #### Wiki The develop team is still working on the UIWidgets Wiki. However, since UIWidgets is mainly derived from Flutter, diff --git a/Documentation~/index-zh.md b/Documentation~/index-zh.md index 1b7f865f..aa31ff20 100644 --- a/Documentation~/index-zh.md +++ b/Documentation~/index-zh.md @@ -194,8 +194,10 @@ UIWidgets也支持Gif! #### 七、自动调节帧率 如果要使得构建出的应用能够自动调节帧率,请打开Project Settings,将构建目标平台对应的Quality选项卡中的V Sync Count设置为Don't Sync。 -默认的逻辑是在界面静止时将帧率降低为25,在界面变动时将帧率提高至60。 -如果您需要修改帧率升高或降低时的行为,请将`Window.onFrameRateSpeedUp`和/或`Window.onFrameRateCoolDown`设置为您自己的函数。 +默认的逻辑是在界面静止时将帧率降低,在界面变动时再将帧率提高至60。 +如果您不想开启该功能,请将`Window.onFrameRateSpeedUp`和/或`Window.onFrameRateCoolDown`设置为空函数,()=> {}即可。 + +在Unity 2019.3版本及以上,UIWidgets将使用OnDemandRenderAPI来实现帧率调节,它将在不影响UI响应速度的情况下大幅降低耗电和发热问题。 #### 八、WebGL Canvas分辨率调整插件 因为浏览器中Canvas的宽高和其在显示器上的像素数可能不一致,所以构建出的WebGL程序中画面可能会模糊。 @@ -223,9 +225,34 @@ $JSEvents 在UIWidgets中使用图片时,记得将这一特性关闭,以免图片被意外放缩,方法如下:在Project面板中选中图片,在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。 #### 十、更新表情(Emoji) -UIWidgets支持渲染文本中包含的表情。表情的图片来自[Google Emoji](https://emojipedia.org/google)提供的免费资源。 -如果您希望使用自己的表情图片,请更新纹理图`Tests/Resources/Emoji.png`,以及`Runtime/ui/txt/emoji.cs`中将Unicode映射到纹理图中具体位置的映射表。 -特别地,请记得更新Dictionary变量`emojiLookupTable`,纹理图的行数`rowCount`以及纹理图的列数`colCount`。 +UIWidgets支持渲染文本中包含的表情。 +默认的表情资源为[iOS 13.2](https://emojipedia.org/apple/ios-13.2)。 +我们也准备了[Google Emoji](https://emojipedia.org/google)的表情资源。 +如果您希望切换到Google版本的表情,请按如下步骤操作: + +1. 拷贝`Runtime/Resources/backup~/EmojiGoogle.png`到`Runtime/Resources/images`目录。 +2. 在**Project**面板中,找到`EmojiGoogle`资源,在**Inspector**面板中,将**Max Size**更改为4096,并取消**Generate Mipmaps**选项前的对勾。 +3. 在您的代码中继承`UIWidgetsPanel`的类的`OnEnable()`函数中,添加如下代码 + +```csharp +EmojiUtils.configuration = EmojiUtils.googleEmojiConfiguration; +``` + +如果您希望使用自己的表情图片,请按如下步骤操作: + +1. 参照`EmojiGoogle.png`,创建您自己的Emoji表单,并放到工程目录下的某个`Resources`目录中,例如`Resources/myImages/MyEmoji.png`)。 +2. 在`OnEnable()`函数中,添加如下代码(记得将示例的值改为真实的值)。注意Emoji的编码的顺序要和Emoji表单一致。 + +```csharp +EmojiUtils.configuration = new EmojiResourceConfiguration( + spriteSheetAssetName: "myImage/MyEmoji", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, ... + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37, +); +``` #### 十一、与GameObject进行拖拽交互 @@ -235,8 +262,6 @@ UIWidgets支持渲染文本中包含的表情。表情的图片来自[Google Emo 我们提供了一个包装好的`UnityObjectDetector`组件以及`onRelease`回调函数,借此您可以实现简单地将物体(例如Hierarchy内的场景物体、Project窗口下的文件等)拖拽至区域内,来获得`UnityEngine.Object[] `类型的引用并进行操作。 -你可以在“UIWidgetsTests -> Drag&Drop”下找到简单的实例样例。 - ## 调试UIWidgets应用程序 @@ -256,15 +281,22 @@ UIWidgets Inspector工具用于可视化和浏览窗口小部件树。 你可以 ## 学习 -#### 示例 - -你可以在**Samples**文件夹的UIWidgets包中找到一些精心挑选的UIWidgets应用示例,并通过这些示例来开始你的学习。请随意尝试并进行修改以查看结果。 +#### 教程 -你也可以在支持**UIWidgets**的编辑器中,点击主菜单上的UIWidgets,并在下拉窗口中选择一个示例。 +包括开发组在内的广大开发者为UIWidgets提供了许多可供学习的样例和教程,你可以根据你的需求进行学习: +- UIWidgets官方示例。目前所有官方使用的示例项目均维护在一个独立的Github仓库( https://github.com/UIWidgets/UIWidgetsSamples )中。你可以 +将它clone到你项目本地的Assets目录下使用。 +具体的,你可以在Sample项目的**Scene**子文件夹中浏览所有示例UI场景。 +此外,你还可以点击主菜单上的新增的UIWidgetsTests选项卡,并在下拉菜单中选择一个EditorWindow UI示例来运行。 +- UIWidgets凉鞋系列教程。你可以在凉鞋老师整理的Github仓库( https://github.com/liangxiegame/awesome-uiwidgets )中学习UIWidgets的基本用法 +以及许多有趣的小Demo。 +- ConnectApp开源项目。这是一个完整的线上、开源、完全基于UIWidgets的第一方App项目。其中包含了大量产品级的UIWidgets工程实践细节, +如果你想深入了解UIWidgets并且使用它构建线上项目,请访问项目Github仓库了解更多( https://github.com/UnityTech/ConnectAppCN )。 #### Wiki -目前开发团队仍在改进UIWidgets Wiki。 由于UIWidgets主要来源于Flutter,你也可以参考Flutter Wiki中与UIWidgets API对应部分的详细描述。同时,你可以加入我们的讨论组( https://connect.unity.com/g/uiwidgets )。 +目前开发团队仍在改进UIWidgets Wiki。 由于UIWidgets主要来源于Flutter,你也可以参考Flutter Wiki中与UIWidgets API对应部分的详细描述。 +同时,你可以加入我们的讨论组( https://connect.unity.com/g/uiwidgets )。 #### 常问问题解答 @@ -280,4 +312,4 @@ UIWidgets Inspector工具用于可视化和浏览窗口小部件树。 你可以 | 有推荐的适用于UIWidgets的IDE吗? | Rider, VSCode(Open .sln) | ## 如何贡献 -请查看[CONTRIBUTING](CONTRIBUTING) +请查看[CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/Documentation~/index.md b/Documentation~/index.md index c9181232..f74b8fcb 100644 --- a/Documentation~/index.md +++ b/Documentation~/index.md @@ -228,8 +228,10 @@ Status bar is always hidden by default when an Unity project is running on an An #### Automatically Adjust Frame Rate To build an App that is able to adjust the frame rate automatically, please open Project Settings, and in the Quality tab, set the "V Sync Count" option of the target platform to "Don't Sync". -The default logic is to set the frame rate to 25 when the screen is static, and change the frame rate to 60 whenever the screen changes. -If you would like to modify the behavior of speeding up or cooling down the frame rate, please set `Window.onFrameRateSpeedUp` and/or `Window.onFrameRateCoolDown` to your own functions. +The default logic is to reduce the frame rate when the screen is static, and change it back to 60 whenever the screen changes. +If you would like to disable this behavior, please set `Window.onFrameRateSpeedUp` and `Window.onFrameRateCoolDown` to null function, i.e., () => {}. + +Note that in Unity 2019.3 and above, UIWidgets will use OnDemandRenderAPI to implement this feature, which will greatly save the battery. #### WebGL Canvas Device Pixel Ratio Plugin The width and height of the Canvas in browser may differ from the number of pixels the Canvas occupies on the screen. @@ -258,12 +260,34 @@ Unity, by default, resizes the width and height of an imported image to the near 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. #### Update Emoji -UIWidgets supports rendering emoji in (editable) texts. The emoji images comes from the free -resources provided by [Google Emoji](https://emojipedia.org/google). If you would -like to use your own images for emoji, please update the texture image `Tests/Resources/Emoji.png`, -and the unicode-index table in `Runtime/ui/txt/emoji.cs` which maps unicodes to specific locations -in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows -in the texture `rowCount`, and number of columns `colCount`. +UIWidgets supports rendering emoji in (editable) texts. +The default emoji resource version is [iOS 13.2](https://emojipedia.org/apple/ios-13.2). +We also prepared the resources of [Google Emoji](https://emojipedia.org/google). +To switch to Google version of emoji, please follow the following steps: + +1. Copy `Runtime/Resources/backup~/EmojiGoogle.png` to `Runtime/Resources/images` folder. +2. In the **Project** panel, find and select `EmojiGoogle` asset, and in the **Inspector** panel, change **Max Size** to 4096, and disable **Generate Mipmaps**. +3. In the `OnEnable()` function in your class overriding `UIWidgetsPanel`, add the following code + +```csharp +EmojiUtils.configuration = EmojiUtils.googleEmojiConfiguration; +``` + +If you would like to use your own images for emoji, please follow the following steps: + +1. Create the sprite sheet (take `EmojiGoogle.png` as an example), and put in a `Resources` folder in your project, (for example `Resources/myImages/MyEmoji.png`). +2. In the `OnEnable()` function, add the following code (replace example values with actual value). Note that the order of emoji codes should be consistent with the sprite sheet. + +```csharp +EmojiUtils.configuration = new EmojiResourceConfiguration( + spriteSheetAssetName: "myImage/MyEmoji", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, ... + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37, +); +``` #### Interact with GameObject Drag&Drops @@ -273,8 +297,6 @@ in the texture `rowCount`, and number of columns `colCount`. With the provided packaged stateful widget `UnityObjectDetector` and its `onRelease` callback function, you can easily drag some objects (for example GameObject from Hierarchy, files from Project Window, etc) into the area, get the UnityEngine.Object[] references and make further modification. -Please refer to "UIWidgetsTests -> Drag&Drop" for simple examples. - ## Debug UIWidgets Application @@ -288,6 +310,7 @@ The symbol is for debug purpose, please remove it from your release build. #### UIWidgets Inspector The UIWidgets Inspector tool is for visualizing and exploring the widget trees. You can find it via *Window/Analysis/UIWidgets* inspector in Editor menu. + **Note** * **UIWidgets_DEBUG** needs to be define for inspector to work properly. * Inspector currently only works in Editor Play Mode, inspect standalone built application is not supported for now. @@ -295,13 +318,19 @@ via *Window/Analysis/UIWidgets* inspector in Editor menu. ## Learn #### Samples -You can find many UIWidgets App samples in the UIWidgets package in the **Samples** folder. -Feel free to try them out and make modifications to see the results. -To get started, the UIWidgetsTheatre scene provides you -a list of carefully selected samples to start with. - -You can also try UIWidgets-based Editor windows by clicking **UIWidgetsTest** on the main menu +You can find many UIWidgets sample projects on Github, which cover different aspects and provide you +learning materials in various levels: +* UIWidgetsSamples (https://github.com/UIWidgets/UIWidgetsSamples). These samples are developed by the dev team in order to illustrates all the features of +UIWidgets. First clone this Repo to the **Assets** folder of your local UIWidgets project. Then +you can find all the sample scenes under the **Scene** folder. +You can also try UIWidgets-based Editor windows by clicking the new **UIWidgetsTests** tab on the main menu and open one of the dropdown samples. +* awesome-UIWidgets by Liangxie (https://github.com/liangxiegame/awesome-uiwidgets). This Repo contains +lots of UIWidget demo apps and third-party applications. +* ConnectApp (https://github.com/UnityTech/ConnectAppCN). This is an online, open-source UIWidget-based App developed +by the dev team. If you are making your own App with UIWidgets, this project will provides you with +many best practice cases. + #### Wiki The develop team is still working on the UIWidgets Wiki. However, since UIWidgets is mainly derived from Flutter, diff --git a/README-ZH.md b/README-ZH.md index 4aa0f56e..aa31ff20 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -225,9 +225,34 @@ $JSEvents 在UIWidgets中使用图片时,记得将这一特性关闭,以免图片被意外放缩,方法如下:在Project面板中选中图片,在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。 #### 十、更新表情(Emoji) -UIWidgets支持渲染文本中包含的表情。表情的图片来自[Google Emoji](https://emojipedia.org/google)提供的免费资源。 -如果您希望使用自己的表情图片,请更新纹理图`Runtime/Resources/images/Emoji.png`,以及`Runtime/ui/txt/emoji.cs`中将Unicode映射到纹理图中具体位置的映射表。 -特别地,请记得更新Dictionary变量`emojiLookupTable`,纹理图的行数`rowCount`以及纹理图的列数`colCount`。 +UIWidgets支持渲染文本中包含的表情。 +默认的表情资源为[iOS 13.2](https://emojipedia.org/apple/ios-13.2)。 +我们也准备了[Google Emoji](https://emojipedia.org/google)的表情资源。 +如果您希望切换到Google版本的表情,请按如下步骤操作: + +1. 拷贝`Runtime/Resources/backup~/EmojiGoogle.png`到`Runtime/Resources/images`目录。 +2. 在**Project**面板中,找到`EmojiGoogle`资源,在**Inspector**面板中,将**Max Size**更改为4096,并取消**Generate Mipmaps**选项前的对勾。 +3. 在您的代码中继承`UIWidgetsPanel`的类的`OnEnable()`函数中,添加如下代码 + +```csharp +EmojiUtils.configuration = EmojiUtils.googleEmojiConfiguration; +``` + +如果您希望使用自己的表情图片,请按如下步骤操作: + +1. 参照`EmojiGoogle.png`,创建您自己的Emoji表单,并放到工程目录下的某个`Resources`目录中,例如`Resources/myImages/MyEmoji.png`)。 +2. 在`OnEnable()`函数中,添加如下代码(记得将示例的值改为真实的值)。注意Emoji的编码的顺序要和Emoji表单一致。 + +```csharp +EmojiUtils.configuration = new EmojiResourceConfiguration( + spriteSheetAssetName: "myImage/MyEmoji", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, ... + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37, +); +``` #### 十一、与GameObject进行拖拽交互 diff --git a/README.md b/README.md index 4efde11e..9d592e1b 100644 --- a/README.md +++ b/README.md @@ -261,12 +261,34 @@ Unity, by default, resizes the width and height of an imported image to the near 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. #### Update Emoji -UIWidgets supports rendering emoji in (editable) texts. The emoji images comes from the free -resources provided by [Google Emoji](https://emojipedia.org/google). If you would -like to use your own images for emoji, please update the texture image `Runtime/Resources/images/Emoji.png`, -and the unicode-index table in `Runtime/ui/txt/emoji.cs` which maps unicodes to specific locations -in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows -in the texture `rowCount`, and number of columns `colCount`. +UIWidgets supports rendering emoji in (editable) texts. +The default emoji resource version is [iOS 13.2](https://emojipedia.org/apple/ios-13.2). +We also prepared the resources of [Google Emoji](https://emojipedia.org/google). +To switch to Google version of emoji, please follow the following steps: + +1. Copy `Runtime/Resources/backup~/EmojiGoogle.png` to `Runtime/Resources/images` folder. +2. In the **Project** panel, find and select `EmojiGoogle` asset, and in the **Inspector** panel, change **Max Size** to 4096, and disable **Generate Mipmaps**. +3. In the `OnEnable()` function in your class overriding `UIWidgetsPanel`, add the following code + +```csharp +EmojiUtils.configuration = EmojiUtils.googleEmojiConfiguration; +``` + +If you would like to use your own images for emoji, please follow the following steps: + +1. Create the sprite sheet (take `EmojiGoogle.png` as an example), and put in a `Resources` folder in your project, (for example `Resources/myImages/MyEmoji.png`). +2. In the `OnEnable()` function, add the following code (replace example values with actual value). Note that the order of emoji codes should be consistent with the sprite sheet. + +```csharp +EmojiUtils.configuration = new EmojiResourceConfiguration( + spriteSheetAssetName: "myImage/MyEmoji", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, ... + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37, +); +``` #### Interact with GameObject Drag&Drops diff --git a/Runtime/Resources/images/Emoji.png b/Runtime/Resources/backup~/EmojiGoogle.png similarity index 100% rename from Runtime/Resources/images/Emoji.png rename to Runtime/Resources/backup~/EmojiGoogle.png diff --git a/Runtime/Resources/images/EmojiIOS12.3.png b/Runtime/Resources/images/EmojiIOS12.3.png new file mode 100644 index 00000000..7a618606 Binary files /dev/null and b/Runtime/Resources/images/EmojiIOS12.3.png differ diff --git a/Runtime/Resources/images/Emoji.png.meta b/Runtime/Resources/images/EmojiIOS12.3.png.meta similarity index 98% rename from Runtime/Resources/images/Emoji.png.meta rename to Runtime/Resources/images/EmojiIOS12.3.png.meta index 674ef39d..ded3005d 100644 --- a/Runtime/Resources/images/Emoji.png.meta +++ b/Runtime/Resources/images/EmojiIOS12.3.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ef5d212b4f758440ba873934e82a0423 +guid: fe6ee86be009e43328c4814e85bff08c TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Runtime/ui/txt/emoji.cs b/Runtime/ui/txt/emoji.cs index 29dc66e2..c0250081 100644 --- a/Runtime/ui/txt/emoji.cs +++ b/Runtime/ui/txt/emoji.cs @@ -4,16 +4,451 @@ using UnityEngine; namespace Unity.UIWidgets.ui { + + public class EmojiResourceConfiguration { + public readonly string spriteSheetAssetName; + public readonly Dictionary emojiLookupTable; + public readonly int spriteSheetNumberOfRows; + public readonly int spriteSheetNumberOfColumns; + + public EmojiResourceConfiguration( + string spriteSheetAssetName, + List emojiCodes, + int spriteSheetNumberOfRows, + int spriteSheetNumberOfColumns + ) { + D.assert(spriteSheetAssetName != null); + D.assert(emojiCodes != null && emojiCodes.isNotEmpty()); + D.assert(spriteSheetNumberOfColumns > 0); + D.assert(spriteSheetNumberOfRows > 0); + D.assert(emojiCodes.Count >= spriteSheetNumberOfColumns * spriteSheetNumberOfRows); + this.spriteSheetAssetName = spriteSheetAssetName; + this.emojiLookupTable = new Dictionary(); + for (int i = 0; i < emojiCodes.Count; i++) { + this.emojiLookupTable[emojiCodes[i]] = i; + } + this.spriteSheetNumberOfRows = spriteSheetNumberOfRows; + this.spriteSheetNumberOfColumns = spriteSheetNumberOfColumns; + } + } + public class EmojiUtils { - static Image _image; + public static readonly EmojiResourceConfiguration googleEmojiConfiguration = new EmojiResourceConfiguration ( + "images/EmojiGoogle", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, 0x1f171, 0x1f17e, 0x1f17f, 0x1f18e, + 0x1f191, 0x1f192, 0x1f193, 0x1f194, 0x1f195, 0x1f196, 0x1f197, + 0x1f198, 0x1f199, 0x1f19a, 0x1f1e6, 0x1f1e7, 0x1f1e8, 0x1f1e9, + 0x1f1ea, 0x1f1eb, 0x1f1ec, 0x1f1ed, 0x1f1ee, 0x1f1ef, 0x1f1f0, + 0x1f1f1, 0x1f1f2, 0x1f1f3, 0x1f1f4, 0x1f1f5, 0x1f1f6, 0x1f1f7, + 0x1f1f8, 0x1f1f9, 0x1f1fa, 0x1f1fb, 0x1f1fc, 0x1f1fd, 0x1f1fe, + 0x1f1ff, 0x1f201, 0x1f202, 0x1f21a, 0x1f22f, 0x1f232, 0x1f233, + 0x1f234, 0x1f235, 0x1f236, 0x1f237, 0x1f238, 0x1f239, 0x1f23a, + 0x1f250, 0x1f251, 0x1f300, 0x1f301, 0x1f302, 0x1f303, 0x1f304, + 0x1f305, 0x1f306, 0x1f307, 0x1f308, 0x1f309, 0x1f30a, 0x1f30b, + 0x1f30c, 0x1f30d, 0x1f30e, 0x1f30f, 0x1f310, 0x1f311, 0x1f312, + 0x1f313, 0x1f314, 0x1f315, 0x1f316, 0x1f317, 0x1f318, 0x1f319, + 0x1f31a, 0x1f31b, 0x1f31c, 0x1f31d, 0x1f31e, 0x1f31f, 0x1f320, + 0x1f321, 0x1f324, 0x1f325, 0x1f326, 0x1f327, 0x1f328, 0x1f329, + 0x1f32a, 0x1f32b, 0x1f32c, 0x1f32d, 0x1f32e, 0x1f32f, 0x1f330, + 0x1f331, 0x1f332, 0x1f333, 0x1f334, 0x1f335, 0x1f336, 0x1f337, + 0x1f338, 0x1f339, 0x1f33a, 0x1f33b, 0x1f33c, 0x1f33d, 0x1f33e, + 0x1f33f, 0x1f340, 0x1f341, 0x1f342, 0x1f343, 0x1f344, 0x1f345, + 0x1f346, 0x1f347, 0x1f348, 0x1f349, 0x1f34a, 0x1f34b, 0x1f34c, + 0x1f34d, 0x1f34e, 0x1f34f, 0x1f350, 0x1f351, 0x1f352, 0x1f353, + 0x1f354, 0x1f355, 0x1f356, 0x1f357, 0x1f358, 0x1f359, 0x1f35a, + 0x1f35b, 0x1f35c, 0x1f35d, 0x1f35e, 0x1f35f, 0x1f360, 0x1f361, + 0x1f362, 0x1f363, 0x1f364, 0x1f365, 0x1f366, 0x1f367, 0x1f368, + 0x1f369, 0x1f36a, 0x1f36b, 0x1f36c, 0x1f36d, 0x1f36e, 0x1f36f, + 0x1f370, 0x1f371, 0x1f372, 0x1f373, 0x1f374, 0x1f375, 0x1f376, + 0x1f377, 0x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, 0x1f3f7, 0x1f3f8, 0x1f3f9, 0x1f3fa, 0x1f3fb, 0x1f3fc, + 0x1f3fd, 0x1f3fe, 0x1f3ff, 0x1f400, 0x1f401, 0x1f402, 0x1f403, + 0x1f404, 0x1f405, 0x1f406, 0x1f407, 0x1f408, 0x1f409, 0x1f40a, + 0x1f40b, 0x1f40c, 0x1f40d, 0x1f40e, 0x1f40f, 0x1f410, 0x1f411, + 0x1f412, 0x1f413, 0x1f414, 0x1f415, 0x1f416, 0x1f417, 0x1f418, + 0x1f419, 0x1f41a, 0x1f41b, 0x1f41c, 0x1f41d, 0x1f41e, 0x1f41f, + 0x1f420, 0x1f421, 0x1f422, 0x1f423, 0x1f424, 0x1f425, 0x1f426, + 0x1f427, 0x1f428, 0x1f429, 0x1f42a, 0x1f42b, 0x1f42c, 0x1f42d, + 0x1f42e, 0x1f42f, 0x1f430, 0x1f431, 0x1f432, 0x1f433, 0x1f434, + 0x1f435, 0x1f436, 0x1f437, 0x1f438, 0x1f439, 0x1f43a, 0x1f43b, + 0x1f43c, 0x1f43d, 0x1f43e, 0x1f43f, 0x1f440, 0x1f441, 0x1f442, + 0x1f443, 0x1f444, 0x1f445, 0x1f446, 0x1f447, 0x1f448, 0x1f449, + 0x1f44a, 0x1f44b, 0x1f44c, 0x1f44d, 0x1f44e, 0x1f44f, 0x1f450, + 0x1f451, 0x1f452, 0x1f453, 0x1f454, 0x1f455, 0x1f456, 0x1f457, + 0x1f458, 0x1f459, 0x1f45a, 0x1f45b, 0x1f45c, 0x1f45d, 0x1f45e, + 0x1f45f, 0x1f460, 0x1f461, 0x1f462, 0x1f463, 0x1f464, 0x1f465, + 0x1f466, 0x1f467, 0x1f468, 0x1f469, 0x1f46a, 0x1f46b, 0x1f46c, + 0x1f46d, 0x1f46e, 0x1f46f, 0x1f470, 0x1f471, 0x1f472, 0x1f473, + 0x1f474, 0x1f475, 0x1f476, 0x1f477, 0x1f478, 0x1f479, 0x1f47a, + 0x1f47b, 0x1f47c, 0x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 0x1f4f4, 0x1f4f5, 0x1f4f6, 0x1f4f7, 0x1f4f8, + 0x1f4f9, 0x1f4fa, 0x1f4fb, 0x1f4fc, 0x1f4fd, 0x1f4ff, 0x1f500, + 0x1f501, 0x1f502, 0x1f503, 0x1f504, 0x1f505, 0x1f506, 0x1f507, + 0x1f508, 0x1f509, 0x1f50a, 0x1f50b, 0x1f50c, 0x1f50d, 0x1f50e, + 0x1f50f, 0x1f510, 0x1f511, 0x1f512, 0x1f513, 0x1f514, 0x1f515, + 0x1f516, 0x1f517, 0x1f518, 0x1f519, 0x1f51a, 0x1f51b, 0x1f51c, + 0x1f51d, 0x1f51e, 0x1f51f, 0x1f520, 0x1f521, 0x1f522, 0x1f523, + 0x1f524, 0x1f525, 0x1f526, 0x1f527, 0x1f528, 0x1f529, 0x1f52a, + 0x1f52b, 0x1f52c, 0x1f52d, 0x1f52e, 0x1f52f, 0x1f530, 0x1f531, + 0x1f532, 0x1f533, 0x1f534, 0x1f535, 0x1f536, 0x1f537, 0x1f538, + 0x1f539, 0x1f53a, 0x1f53b, 0x1f53c, 0x1f53d, 0x1f549, 0x1f54a, + 0x1f54b, 0x1f54c, 0x1f54d, 0x1f54e, 0x1f550, 0x1f551, 0x1f552, + 0x1f553, 0x1f554, 0x1f555, 0x1f556, 0x1f557, 0x1f558, 0x1f559, + 0x1f55a, 0x1f55b, 0x1f55c, 0x1f55d, 0x1f55e, 0x1f55f, 0x1f560, + 0x1f561, 0x1f562, 0x1f563, 0x1f564, 0x1f565, 0x1f566, 0x1f567, + 0x1f56f, 0x1f570, 0x1f573, 0x1f574, 0x1f575, 0x1f576, 0x1f577, + 0x1f578, 0x1f579, 0x1f57a, 0x1f587, 0x1f58a, 0x1f58b, 0x1f58c, + 0x1f58d, 0x1f590, 0x1f595, 0x1f596, 0x1f5a4, 0x1f5a5, 0x1f5a8, + 0x1f5b1, 0x1f5b2, 0x1f5bc, 0x1f5c2, 0x1f5c3, 0x1f5c4, 0x1f5d1, + 0x1f5d2, 0x1f5d3, 0x1f5dc, 0x1f5dd, 0x1f5de, 0x1f5e1, 0x1f5e3, + 0x1f5e8, 0x1f5ef, 0x1f5f3, 0x1f5fa, 0x1f5fb, 0x1f5fc, 0x1f5fd, + 0x1f5fe, 0x1f5ff, 0x1f600, 0x1f601, 0x1f602, 0x1f603, 0x1f604, + 0x1f605, 0x1f606, 0x1f607, 0x1f608, 0x1f609, 0x1f60a, 0x1f60b, + 0x1f60c, 0x1f60d, 0x1f60e, 0x1f60f, 0x1f610, 0x1f611, 0x1f612, + 0x1f613, 0x1f614, 0x1f615, 0x1f616, 0x1f617, 0x1f618, 0x1f619, + 0x1f61a, 0x1f61b, 0x1f61c, 0x1f61d, 0x1f61e, 0x1f61f, 0x1f620, + 0x1f621, 0x1f622, 0x1f623, 0x1f624, 0x1f625, 0x1f626, 0x1f627, + 0x1f628, 0x1f629, 0x1f62a, 0x1f62b, 0x1f62c, 0x1f62d, 0x1f62e, + 0x1f62f, 0x1f630, 0x1f631, 0x1f632, 0x1f633, 0x1f634, 0x1f635, + 0x1f636, 0x1f637, 0x1f638, 0x1f639, 0x1f63a, 0x1f63b, 0x1f63c, + 0x1f63d, 0x1f63e, 0x1f63f, 0x1f640, 0x1f641, 0x1f642, 0x1f643, + 0x1f644, 0x1f645, 0x1f646, 0x1f647, 0x1f648, 0x1f649, 0x1f64a, + 0x1f64b, 0x1f64c, 0x1f64d, 0x1f64e, 0x1f64f, 0x1f680, 0x1f681, + 0x1f682, 0x1f683, 0x1f684, 0x1f685, 0x1f686, 0x1f687, 0x1f688, + 0x1f689, 0x1f68a, 0x1f68b, 0x1f68c, 0x1f68d, 0x1f68e, 0x1f68f, + 0x1f690, 0x1f691, 0x1f692, 0x1f693, 0x1f694, 0x1f695, 0x1f696, + 0x1f697, 0x1f698, 0x1f699, 0x1f69a, 0x1f69b, 0x1f69c, 0x1f69d, + 0x1f69e, 0x1f69f, 0x1f6a0, 0x1f6a1, 0x1f6a2, 0x1f6a3, 0x1f6a4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93e, 0x1f93f, 0x1f940, 0x1f941, 0x1f942, 0x1f943, + 0x1f944, 0x1f945, 0x1f947, 0x1f948, 0x1f949, 0x1f94a, 0x1f94b, + 0x1f94c, 0x1f94d, 0x1f94e, 0x1f94f, 0x1f950, 0x1f951, 0x1f952, + 0x1f953, 0x1f954, 0x1f955, 0x1f956, 0x1f957, 0x1f958, 0x1f959, + 0x1f95a, 0x1f95b, 0x1f95c, 0x1f95d, 0x1f95e, 0x1f95f, 0x1f960, + 0x1f961, 0x1f962, 0x1f963, 0x1f964, 0x1f965, 0x1f966, 0x1f967, + 0x1f968, 0x1f969, 0x1f96a, 0x1f96b, 0x1f96c, 0x1f96d, 0x1f96e, + 0x1f96f, 0x1f970, 0x1f971, 0x1f973, 0x1f974, 0x1f975, 0x1f976, + 0x1f97a, 0x1f97b, 0x1f97c, 0x1f97d, 0x1f97e, 0x1f97f, 0x1f980, + 0x1f981, 0x1f982, 0x1f983, 0x1f984, 0x1f985, 0x1f986, 0x1f987, + 0x1f988, 0x1f989, 0x1f98a, 0x1f98b, 0x1f98c, 0x1f98d, 0x1f98e, + 0x1f98f, 0x1f990, 0x1f991, 0x1f992, 0x1f993, 0x1f994, 0x1f995, + 0x1f996, 0x1f997, 0x1f998, 0x1f999, 0x1f99a, 0x1f99b, 0x1f99c, + 0x1f99d, 0x1f99e, 0x1f99f, 0x1f9a0, 0x1f9a1, 0x1f9a2, 0x1f9a5, + 0x1f9a6, 0x1f9a7, 0x1f9a8, 0x1f9a9, 0x1f9aa, 0x1f9ae, 0x1f9af, + 0x1f9b0, 0x1f9b1, 0x1f9b2, 0x1f9b3, 0x1f9b4, 0x1f9b5, 0x1f9b6, + 0x1f9b7, 0x1f9b8, 0x1f9b9, 0x1f9ba, 0x1f9bb, 0x1f9bc, 0x1f9bd, + 0x1f9be, 0x1f9bf, 0x1f9c0, 0x1f9c1, 0x1f9c2, 0x1f9c3, 0x1f9c4, + 0x1f9c5, 0x1f9c6, 0x1f9c7, 0x1f9c8, 0x1f9c9, 0x1f9ca, 0x1f9cd, + 0x1f9ce, 0x1f9cf, 0x1f9d0, 0x1f9d1, 0x1f9d2, 0x1f9d3, 0x1f9d4, + 0x1f9d5, 0x1f9d6, 0x1f9d7, 0x1f9d8, 0x1f9d9, 0x1f9da, 0x1f9db, + 0x1f9dc, 0x1f9dd, 0x1f9de, 0x1f9df, 0x1f9e0, 0x1f9e1, 0x1f9e2, + 0x1f9e3, 0x1f9e4, 0x1f9e5, 0x1f9e6, 0x1f9e7, 0x1f9e8, 0x1f9e9, + 0x1f9ea, 0x1f9eb, 0x1f9ec, 0x1f9ed, 0x1f9ee, 0x1f9ef, 0x1f9f0, + 0x1f9f1, 0x1f9f2, 0x1f9f3, 0x1f9f4, 0x1f9f5, 0x1f9f6, 0x1f9f7, + 0x1f9f8, 0x1f9f9, 0x1f9fa, 0x1f9fb, 0x1f9fc, 0x1f9fd, 0x1f9fe, + 0x1f9ff, 0x1fa70, 0x1fa71, 0x1fa72, 0x1fa73, 0x1fa78, 0x1fa79, + 0x1fa7a, 0x1fa80, 0x1fa81, 0x1fa82, 0x1fa90, 0x1fa91, 0x1fa92, + 0x1fa93, 0x1fa94, 0x1fa95, 0x203c, 0x2049, 0x20e3, 0x2122, + 0x2139, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, 0x2199, + 0x21a9, 0x21aa, 0x231a, 0x231b, 0x2328, 0x23cf, 0x23e9, + 0x23ea, 0x23eb, 0x23ec, 0x23ed, 0x23ee, 0x23ef, 0x23f0, + 0x23f1, 0x23f2, 0x23f3, 0x23f8, 0x23f9, 0x23fa, 0x24c2, + 0x25aa, 0x25ab, 0x25b6, 0x25c0, 0x25fb, 0x25fc, 0x25fd, + 0x25fe, 0x2600, 0x2601, 0x2602, 0x2603, 0x2604, 0x260e, + 0x2611, 0x2614, 0x2615, 0x2618, 0x261d, 0x2620, 0x2622, + 0x2623, 0x2626, 0x262a, 0x262e, 0x262f, 0x2638, 0x2639, + 0x263a, 0x2640, 0x2642, 0x2648, 0x2649, 0x264a, 0x264b, + 0x264c, 0x264d, 0x264e, 0x264f, 0x2650, 0x2651, 0x2652, + 0x2653, 0x265f, 0x2660, 0x2663, 0x2665, 0x2666, 0x2668, + 0x267b, 0x267e, 0x267f, 0x2692, 0x2693, 0x2694, 0x2695, + 0x2696, 0x2697, 0x2699, 0x269b, 0x269c, 0x26a0, 0x26a1, + 0x26aa, 0x26ab, 0x26b0, 0x26b1, 0x26bd, 0x26be, 0x26c4, + 0x26c5, 0x26c8, 0x26ce, 0x26cf, 0x26d1, 0x26d3, 0x26d4, + 0x26e9, 0x26ea, 0x26f0, 0x26f1, 0x26f2, 0x26f3, 0x26f4, + 0x26f5, 0x26f7, 0x26f8, 0x26f9, 0x26fa, 0x26fd, 0x2702, + 0x2705, 0x2708, 0x2709, 0x270a, 0x270b, 0x270c, 0x270d, + 0x270f, 0x2712, 0x2714, 0x2716, 0x271d, 0x2721, 0x2728, + 0x2733, 0x2734, 0x2744, 0x2747, 0x274c, 0x274e, 0x2753, + 0x2754, 0x2755, 0x2757, 0x2763, 0x2764, 0x2795, 0x2796, + 0x2797, 0x27a1, 0x27b0, 0x27bf, 0x2934, 0x2935, 0x2b05, + 0x2b06, 0x2b07, 0x2b1b, 0x2b1c, 0x2b50, 0x2b55, 0x3030, + 0x303d, 0x3297, 0x3299, + }, + spriteSheetNumberOfRows: 36, + spriteSheetNumberOfColumns: 37 + ); + + public static readonly EmojiResourceConfiguration appleEmojiConfiguration = new EmojiResourceConfiguration( + "images/EmojiIOS12.3", + emojiCodes: new List { + 0x1f004, 0x1f0cf, 0x1f170, 0x1f171, 0x1f17e, 0x1f17f, 0x1f18e, + 0x1f191, 0x1f192, 0x1f193, 0x1f194, 0x1f195, 0x1f196, 0x1f197, + 0x1f198, 0x1f199, 0x1f19a, 0x1f201, 0x1f202, 0x1f21a, 0x1f22f, + 0x1f232, 0x1f233, 0x1f234, 0x1f235, 0x1f236, 0x1f237, 0x1f238, + 0x1f239, 0x1f23a, 0x1f250, 0x1f251, 0x1f300, 0x1f301, 0x1f302, + 0x1f303, 0x1f304, 0x1f305, 0x1f306, 0x1f307, 0x1f308, 0x1f309, + 0x1f30a, 0x1f30b, 0x1f30c, 0x1f30d, 0x1f30e, 0x1f30f, 0x1f310, + 0x1f311, 0x1f312, 0x1f313, 0x1f314, 0x1f315, 0x1f316, 0x1f317, + 0x1f318, 0x1f319, 0x1f31a, 0x1f31b, 0x1f31c, 0x1f31d, 0x1f31e, + 0x1f31f, 0x1f320, 0x1f321, 0x1f324, 0x1f325, 0x1f326, 0x1f327, + 0x1f328, 0x1f329, 0x1f32a, 0x1f32b, 0x1f32c, 0x1f32d, 0x1f32e, + 0x1f32f, 0x1f330, 0x1f331, 0x1f332, 0x1f333, 0x1f334, 0x1f335, + 0x1f336, 0x1f337, 0x1f338, 0x1f339, 0x1f33a, 0x1f33b, 0x1f33c, + 0x1f33d, 0x1f33e, 0x1f33f, 0x1f340, 0x1f341, 0x1f342, 0x1f343, + 0x1f344, 0x1f345, 0x1f346, 0x1f347, 0x1f348, 0x1f349, 0x1f34a, + 0x1f34b, 0x1f34c, 0x1f34d, 0x1f34e, 0x1f34f, 0x1f350, 0x1f351, + 0x1f352, 0x1f353, 0x1f354, 0x1f355, 0x1f356, 0x1f357, 0x1f358, + 0x1f359, 0x1f35a, 0x1f35b, 0x1f35c, 0x1f35d, 0x1f35e, 0x1f35f, + 0x1f360, 0x1f361, 0x1f362, 0x1f363, 0x1f364, 0x1f365, 0x1f366, + 0x1f367, 0x1f368, 0x1f369, 0x1f36a, 0x1f36b, 0x1f36c, 0x1f36d, + 0x1f36e, 0x1f36f, 0x1f370, 0x1f371, 0x1f372, 0x1f373, 0x1f374, + 0x1f375, 0x1f376, 0x1f377, 0x1f378, 0x1f379, 0x1f37a, 0x1f37b, + 0x1f37c, 0x1f37d, 0x1f37e, 0x1f37f, 0x1f380, 0x1f381, 0x1f382, + 0x1f383, 0x1f384, 0x1f385, 0x1f386, 0x1f387, 0x1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x1f405, 0x1f406, 0x1f407, 0x1f408, + 0x1f409, 0x1f40a, 0x1f40b, 0x1f40c, 0x1f40d, 0x1f40e, 0x1f40f, + 0x1f410, 0x1f411, 0x1f412, 0x1f413, 0x1f414, 0x1f415, 0x1f416, + 0x1f417, 0x1f418, 0x1f419, 0x1f41a, 0x1f41b, 0x1f41c, 0x1f41d, + 0x1f41e, 0x1f41f, 0x1f420, 0x1f421, 0x1f422, 0x1f423, 0x1f424, + 0x1f425, 0x1f426, 0x1f427, 0x1f428, 0x1f429, 0x1f42a, 0x1f42b, + 0x1f42c, 0x1f42d, 0x1f42e, 0x1f42f, 0x1f430, 0x1f431, 0x1f432, + 0x1f433, 0x1f434, 0x1f435, 0x1f436, 0x1f437, 0x1f438, 0x1f439, + 0x1f43a, 0x1f43b, 0x1f43c, 0x1f43d, 0x1f43e, 0x1f43f, 0x1f440, + 0x1f441, 0x1f442, 0x1f443, 0x1f444, 0x1f445, 0x1f446, 0x1f447, + 0x1f448, 0x1f449, 0x1f44a, 0x1f44b, 0x1f44c, 0x1f44d, 0x1f44e, + 0x1f44f, 0x1f450, 0x1f451, 0x1f452, 0x1f453, 0x1f454, 0x1f455, + 0x1f456, 0x1f457, 0x1f458, 0x1f459, 0x1f45a, 0x1f45b, 0x1f45c, + 0x1f45d, 0x1f45e, 0x1f45f, 0x1f460, 0x1f461, 0x1f462, 0x1f463, + 0x1f464, 0x1f465, 0x1f466, 0x1f467, 0x1f468, 0x1f469, 0x1f46a, + 0x1f46b, 0x1f46c, 0x1f46d, 0x1f46e, 0x1f46f, 0x1f470, 0x1f471, + 0x1f472, 0x1f473, 0x1f474, 0x1f475, 0x1f476, 0x1f477, 0x1f478, + 0x1f479, 0x1f47a, 0x1f47b, 0x1f47c, 0x1f47d, 0x1f47e, 0x1f47f, + 0x1f480, 0x1f481, 0x1f482, 0x1f483, 0x1f484, 0x1f485, 0x1f486, + 0x1f487, 0x1f488, 0x1f489, 0x1f48a, 0x1f48b, 0x1f48c, 0x1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, 0x1f503, 0x1f504, 0x1f505, + 0x1f506, 0x1f507, 0x1f508, 0x1f509, 0x1f50a, 0x1f50b, 0x1f50c, + 0x1f50d, 0x1f50e, 0x1f50f, 0x1f510, 0x1f511, 0x1f512, 0x1f513, + 0x1f514, 0x1f515, 0x1f516, 0x1f517, 0x1f518, 0x1f519, 0x1f51a, + 0x1f51b, 0x1f51c, 0x1f51d, 0x1f51e, 0x1f51f, 0x1f520, 0x1f521, + 0x1f522, 0x1f523, 0x1f524, 0x1f525, 0x1f526, 0x1f527, 0x1f528, + 0x1f529, 0x1f52a, 0x1f52b, 0x1f52c, 0x1f52d, 0x1f52e, 0x1f52f, + 0x1f530, 0x1f531, 0x1f532, 0x1f533, 0x1f534, 0x1f535, 0x1f536, + 0x1f537, 0x1f538, 0x1f539, 0x1f53a, 0x1f53b, 0x1f53c, 0x1f53d, + 0x1f549, 0x1f54a, 0x1f54b, 0x1f54c, 0x1f54d, 0x1f54e, 0x1f550, + 0x1f551, 0x1f552, 0x1f553, 0x1f554, 0x1f555, 0x1f556, 0x1f557, + 0x1f558, 0x1f559, 0x1f55a, 0x1f55b, 0x1f55c, 0x1f55d, 0x1f55e, + 0x1f55f, 0x1f560, 0x1f561, 0x1f562, 0x1f563, 0x1f564, 0x1f565, + 0x1f566, 0x1f567, 0x1f56f, 0x1f570, 0x1f573, 0x1f574, 0x1f575, + 0x1f576, 0x1f577, 0x1f578, 0x1f579, 0x1f57a, 0x1f587, 0x1f58a, + 0x1f58b, 0x1f58c, 0x1f58d, 0x1f590, 0x1f595, 0x1f596, 0x1f5a4, + 0x1f5a5, 0x1f5a8, 0x1f5b1, 0x1f5b2, 0x1f5bc, 0x1f5c2, 0x1f5c3, + 0x1f5c4, 0x1f5d1, 0x1f5d2, 0x1f5d3, 0x1f5dc, 0x1f5dd, 0x1f5de, + 0x1f5e1, 0x1f5e3, 0x1f5e8, 0x1f5ef, 0x1f5f3, 0x1f5fa, 0x1f5fb, + 0x1f5fc, 0x1f5fd, 0x1f5fe, 0x1f5ff, 0x1f601, 0x1f602, 0x1f603, + 0x1f604, 0x1f605, 0x1f606, 0x1f607, 0x1f608, 0x1f609, 0x1f60a, + 0x1f60b, 0x1f60c, 0x1f60d, 0x1f60e, 0x1f60f, 0x1f610, 0x1f611, + 0x1f612, 0x1f613, 0x1f614, 0x1f615, 0x1f616, 0x1f617, 0x1f618, + 0x1f619, 0x1f61a, 0x1f61b, 0x1f61c, 0x1f61d, 0x1f61e, 0x1f61f, + 0x1f620, 0x1f621, 0x1f622, 0x1f623, 0x1f624, 0x1f625, 0x1f626, + 0x1f627, 0x1f628, 0x1f629, 0x1f62a, 0x1f62b, 0x1f62c, 0x1f62d, + 0x1f62e, 0x1f62f, 0x1f630, 0x1f631, 0x1f632, 0x1f633, 0x1f634, + 0x1f635, 0x1f636, 0x1f637, 0x1f638, 0x1f639, 0x1f63a, 0x1f63b, + 0x1f63c, 0x1f63d, 0x1f63e, 0x1f63f, 0x1f640, 0x1f641, 0x1f642, + 0x1f643, 0x1f644, 0x1f645, 0x1f646, 0x1f647, 0x1f648, 0x1f649, + 0x1f64a, 0x1f64b, 0x1f64c, 0x1f64d, 0x1f64e, 0x1f64f, 0x1f680, + 0x1f681, 0x1f682, 0x1f683, 0x1f684, 0x1f685, 0x1f686, 0x1f687, + 0x1f688, 0x1f689, 0x1f68a, 0x1f68b, 0x1f68c, 0x1f68d, 0x1f68e, + 0x1f68f, 0x1f690, 0x1f691, 0x1f692, 0x1f693, 0x1f694, 0x1f695, + 0x1f696, 0x1f697, 0x1f698, 0x1f699, 0x1f69a, 0x1f69b, 0x1f69c, + 0x1f69d, 0x1f69e, 0x1f69f, 0x1f6a0, 0x1f6a1, 0x1f6a2, 0x1f6a3, + 0x1f6a4, 0x1f6a5, 0x1f6a6, 0x1f6a7, 0x1f6a8, 0x1f6a9, 0x1f6aa, + 0x1f6ab, 0x1f6ac, 0x1f6ad, 0x1f6ae, 0x1f6af, 0x1f6b0, 0x1f6b1, + 0x1f6b2, 0x1f6b3, 0x1f6b4, 0x1f6b5, 0x1f6b6, 0x1f6b7, 0x1f6b8, + 0x1f6b9, 0x1f6ba, 0x1f6bb, 0x1f6bc, 0x1f6bd, 0x1f6be, 0x1f6bf, + 0x1f6c0, 0x1f6c1, 0x1f6c2, 0x1f6c3, 0x1f6c4, 0x1f6c5, 0x1f6cb, + 0x1f6cc, 0x1f6cd, 0x1f6ce, 0x1f6cf, 0x1f6d0, 0x1f6d1, 0x1f6d2, + 0x1f6d5, 0x1f6e0, 0x1f6e1, 0x1f6e2, 0x1f6e3, 0x1f6e4, 0x1f6e5, + 0x1f6e9, 0x1f6eb, 0x1f6ec, 0x1f6f0, 0x1f6f3, 0x1f6f4, 0x1f6f5, + 0x1f6f6, 0x1f6f7, 0x1f6f8, 0x1f6f9, 0x1f6fa, 0x1f7e0, 0x1f7e1, + 0x1f7e2, 0x1f7e3, 0x1f7e4, 0x1f7e5, 0x1f7e6, 0x1f7e7, 0x1f7e8, + 0x1f7e9, 0x1f7ea, 0x1f7eb, 0x1f90d, 0x1f90e, 0x1f90f, 0x1f910, + 0x1f911, 0x1f912, 0x1f913, 0x1f914, 0x1f915, 0x1f916, 0x1f917, + 0x1f918, 0x1f919, 0x1f91a, 0x1f91b, 0x1f91c, 0x1f91d, 0x1f91e, + 0x1f91f, 0x1f920, 0x1f921, 0x1f922, 0x1f923, 0x1f924, 0x1f925, + 0x1f926, 0x1f927, 0x1f928, 0x1f929, 0x1f92a, 0x1f92b, 0x1f92c, + 0x1f92d, 0x1f92e, 0x1f92f, 0x1f930, 0x1f931, 0x1f932, 0x1f933, + 0x1f934, 0x1f935, 0x1f936, 0x1f937, 0x1f938, 0x1f939, 0x1f93a, + 0x1f93c, 0x1f93d, 0x1f93e, 0x1f93f, 0x1f940, 0x1f941, 0x1f942, + 0x1f943, 0x1f944, 0x1f945, 0x1f947, 0x1f948, 0x1f949, 0x1f94a, + 0x1f94b, 0x1f94c, 0x1f94d, 0x1f94e, 0x1f94f, 0x1f950, 0x1f951, + 0x1f952, 0x1f953, 0x1f954, 0x1f955, 0x1f956, 0x1f957, 0x1f958, + 0x1f959, 0x1f95a, 0x1f95b, 0x1f95c, 0x1f95d, 0x1f95e, 0x1f95f, + 0x1f960, 0x1f961, 0x1f962, 0x1f963, 0x1f964, 0x1f965, 0x1f966, + 0x1f967, 0x1f968, 0x1f969, 0x1f96a, 0x1f96b, 0x1f96c, 0x1f96d, + 0x1f96e, 0x1f96f, 0x1f970, 0x1f971, 0x1f973, 0x1f974, 0x1f975, + 0x1f976, 0x1f97a, 0x1f97b, 0x1f97c, 0x1f97d, 0x1f97e, 0x1f97f, + 0x1f980, 0x1f981, 0x1f982, 0x1f983, 0x1f984, 0x1f985, 0x1f986, + 0x1f987, 0x1f988, 0x1f989, 0x1f98a, 0x1f98b, 0x1f98c, 0x1f98d, + 0x1f98e, 0x1f98f, 0x1f990, 0x1f991, 0x1f992, 0x1f993, 0x1f994, + 0x1f995, 0x1f996, 0x1f997, 0x1f998, 0x1f999, 0x1f99a, 0x1f99b, + 0x1f99c, 0x1f99d, 0x1f99e, 0x1f99f, 0x1f9a0, 0x1f9a1, 0x1f9a2, + 0x1f9a5, 0x1f9a6, 0x1f9a7, 0x1f9a8, 0x1f9a9, 0x1f9aa, 0x1f9ae, + 0x1f9af, 0x1f9b0, 0x1f9b1, 0x1f9b2, 0x1f9b3, 0x1f9b4, 0x1f9b5, + 0x1f9b6, 0x1f9b7, 0x1f9b8, 0x1f9b9, 0x1f9ba, 0x1f9bb, 0x1f9bc, + 0x1f9bd, 0x1f9be, 0x1f9bf, 0x1f9c0, 0x1f9c1, 0x1f9c2, 0x1f9c3, + 0x1f9c4, 0x1f9c5, 0x1f9c6, 0x1f9c7, 0x1f9c8, 0x1f9c9, 0x1f9ca, + 0x1f9cd, 0x1f9ce, 0x1f9cf, 0x1f9d0, 0x1f9d1, 0x1f9d2, 0x1f9d3, + 0x1f9d4, 0x1f9d5, 0x1f9d6, 0x1f9d7, 0x1f9d8, 0x1f9d9, 0x1f9da, + 0x1f9db, 0x1f9dc, 0x1f9dd, 0x1f9de, 0x1f9df, 0x1f9e0, 0x1f9e1, + 0x1f9e2, 0x1f9e3, 0x1f9e4, 0x1f9e5, 0x1f9e6, 0x1f9e7, 0x1f9e8, + 0x1f9e9, 0x1f9ea, 0x1f9eb, 0x1f9ec, 0x1f9ed, 0x1f9ee, 0x1f9ef, + 0x1f9f0, 0x1f9f1, 0x1f9f2, 0x1f9f3, 0x1f9f4, 0x1f9f5, 0x1f9f6, + 0x1f9f7, 0x1f9f8, 0x1f9f9, 0x1f9fa, 0x1f9fb, 0x1f9fc, 0x1f9fd, + 0x1f9fe, 0x1f9ff, 0x1fa70, 0x1fa71, 0x1fa72, 0x1fa73, 0x1fa78, + 0x1fa79, 0x1fa7a, 0x1fa80, 0x1fa81, 0x1fa82, 0x1fa90, 0x1fa91, + 0x1fa92, 0x1fa93, 0x1fa94, 0x1fa95, 0x203c, 0x2049, 0x2122, + 0x2139, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, 0x2199, + 0x21a9, 0x21aa, 0x231a, 0x231b, 0x2328, 0x23cf, 0x23e9, + 0x23ea, 0x23eb, 0x23ec, 0x23ed, 0x23ee, 0x23ef, 0x23f0, + 0x23f1, 0x23f2, 0x23f3, 0x23f8, 0x23f9, 0x23fa, 0x24c2, + 0x25aa, 0x25ab, 0x25b6, 0x25c0, 0x25fb, 0x25fc, 0x25fd, + 0x25fe, 0x2600, 0x2601, 0x2602, 0x2603, 0x2604, 0x260e, + 0x2611, 0x2614, 0x2615, 0x2618, 0x261d, 0x2620, 0x2622, + 0x2623, 0x2626, 0x262a, 0x262e, 0x262f, 0x2638, 0x2639, + 0x263a, 0x2648, 0x2649, 0x264a, 0x264b, 0x264c, 0x264d, + 0x264e, 0x264f, 0x2650, 0x2651, 0x2652, 0x2653, 0x265f, + 0x2660, 0x2663, 0x2665, 0x2666, 0x2668, 0x267b, 0x267e, + 0x267f, 0x2692, 0x2693, 0x2694, 0x2696, 0x2697, 0x2699, + 0x269b, 0x269c, 0x26a0, 0x26a1, 0x26aa, 0x26ab, 0x26b0, + 0x26b1, 0x26bd, 0x26be, 0x26c4, 0x26c5, 0x26c8, 0x26ce, + 0x26cf, 0x26d1, 0x26d3, 0x26d4, 0x26e9, 0x26ea, 0x26f0, + 0x26f1, 0x26f2, 0x26f3, 0x26f4, 0x26f5, 0x26f7, 0x26f8, + 0x26f9, 0x26fa, 0x26fd, 0x2702, 0x2705, 0x2708, 0x2709, + 0x270a, 0x270b, 0x270c, 0x270d, 0x270f, 0x2712, 0x2714, + 0x2716, 0x271d, 0x2721, 0x2728, 0x2733, 0x2734, 0x2744, + 0x2747, 0x274c, 0x274e, 0x2753, 0x2754, 0x2755, 0x2757, + 0x2763, 0x2764, 0x2795, 0x2796, 0x2797, 0x27a1, 0x27b0, + 0x27bf, 0x2934, 0x2935, 0x2b05, 0x2b06, 0x2b07, 0x2b1b, + 0x2b1c, 0x2b50, 0x2b55, 0x3030, 0x303d, 0x3297, 0x3299, + 0xa9, 0xae, 0xfe0f, 1269 + }, + spriteSheetNumberOfRows: 35, + spriteSheetNumberOfColumns: 37 + ); + + static readonly EmojiResourceConfiguration _defaultConfiguration = appleEmojiConfiguration; + + static EmojiResourceConfiguration _configuration = null; + + public static EmojiResourceConfiguration configuration { + get { return _configuration ?? _defaultConfiguration; } + set { + if (value == _configuration) { + return; + } + + if (value != null && _configuration != null && + value.spriteSheetAssetName != _configuration.spriteSheetAssetName) { + try { + _image = new Image(Resources.Load(value.spriteSheetAssetName)); + } + catch (Exception e) { + _image = null; + Debug.LogError(e.StackTrace); + } + } + + _configuration = value; + } + } + static Image _image; public static Image image { get { if (_image == null || _image.texture == null) { try { - _image = new Image( - Resources.Load("images/Emoji") - ); + _image = new Image(Resources.Load(configuration.spriteSheetAssetName)); } catch (Exception e) { _image = null; @@ -25,214 +460,20 @@ public static Image image { } } - public static readonly Dictionary emojiLookupTable = new Dictionary { - {0x1f004, 0}, {0x1f0cf, 1}, {0x1f170, 2}, {0x1f171, 3}, {0x1f17e, 4}, {0x1f17f, 5}, {0x1f18e, 6}, - {0x1f191, 7}, {0x1f192, 8}, {0x1f193, 9}, {0x1f194, 10}, {0x1f195, 11}, {0x1f196, 12}, {0x1f197, 13}, - {0x1f198, 14}, {0x1f199, 15}, {0x1f19a, 16}, {0x1f1e6, 17}, {0x1f1e7, 18}, {0x1f1e8, 19}, {0x1f1e9, 20}, - {0x1f1ea, 21}, {0x1f1eb, 22}, {0x1f1ec, 23}, {0x1f1ed, 24}, {0x1f1ee, 25}, {0x1f1ef, 26}, {0x1f1f0, 27}, - {0x1f1f1, 28}, {0x1f1f2, 29}, {0x1f1f3, 30}, {0x1f1f4, 31}, {0x1f1f5, 32}, {0x1f1f6, 33}, {0x1f1f7, 34}, - {0x1f1f8, 35}, {0x1f1f9, 36}, {0x1f1fa, 37}, {0x1f1fb, 38}, {0x1f1fc, 39}, {0x1f1fd, 40}, {0x1f1fe, 41}, - {0x1f1ff, 42}, {0x1f201, 43}, {0x1f202, 44}, {0x1f21a, 45}, {0x1f22f, 46}, {0x1f232, 47}, {0x1f233, 48}, - {0x1f234, 49}, {0x1f235, 50}, {0x1f236, 51}, {0x1f237, 52}, {0x1f238, 53}, {0x1f239, 54}, {0x1f23a, 55}, - {0x1f250, 56}, {0x1f251, 57}, {0x1f300, 58}, {0x1f301, 59}, {0x1f302, 60}, {0x1f303, 61}, {0x1f304, 62}, - {0x1f305, 63}, {0x1f306, 64}, {0x1f307, 65}, {0x1f308, 66}, {0x1f309, 67}, {0x1f30a, 68}, {0x1f30b, 69}, - {0x1f30c, 70}, {0x1f30d, 71}, {0x1f30e, 72}, {0x1f30f, 73}, {0x1f310, 74}, {0x1f311, 75}, {0x1f312, 76}, - {0x1f313, 77}, {0x1f314, 78}, {0x1f315, 79}, {0x1f316, 80}, {0x1f317, 81}, {0x1f318, 82}, {0x1f319, 83}, - {0x1f31a, 84}, {0x1f31b, 85}, {0x1f31c, 86}, {0x1f31d, 87}, {0x1f31e, 88}, {0x1f31f, 89}, {0x1f320, 90}, - {0x1f321, 91}, {0x1f324, 92}, {0x1f325, 93}, {0x1f326, 94}, {0x1f327, 95}, {0x1f328, 96}, {0x1f329, 97}, - {0x1f32a, 98}, {0x1f32b, 99}, {0x1f32c, 100}, {0x1f32d, 101}, {0x1f32e, 102}, {0x1f32f, 103}, {0x1f330, 104}, - {0x1f331, 105}, {0x1f332, 106}, {0x1f333, 107}, {0x1f334, 108}, {0x1f335, 109}, {0x1f336, 110}, {0x1f337, 111}, - {0x1f338, 112}, {0x1f339, 113}, {0x1f33a, 114}, {0x1f33b, 115}, {0x1f33c, 116}, {0x1f33d, 117}, {0x1f33e, 118}, - {0x1f33f, 119}, {0x1f340, 120}, {0x1f341, 121}, {0x1f342, 122}, {0x1f343, 123}, {0x1f344, 124}, {0x1f345, 125}, - {0x1f346, 126}, {0x1f347, 127}, {0x1f348, 128}, {0x1f349, 129}, {0x1f34a, 130}, {0x1f34b, 131}, {0x1f34c, 132}, - {0x1f34d, 133}, {0x1f34e, 134}, {0x1f34f, 135}, {0x1f350, 136}, {0x1f351, 137}, {0x1f352, 138}, {0x1f353, 139}, - {0x1f354, 140}, {0x1f355, 141}, {0x1f356, 142}, {0x1f357, 143}, {0x1f358, 144}, {0x1f359, 145}, {0x1f35a, 146}, - {0x1f35b, 147}, {0x1f35c, 148}, {0x1f35d, 149}, {0x1f35e, 150}, {0x1f35f, 151}, {0x1f360, 152}, {0x1f361, 153}, - {0x1f362, 154}, {0x1f363, 155}, {0x1f364, 156}, {0x1f365, 157}, {0x1f366, 158}, {0x1f367, 159}, {0x1f368, 160}, - {0x1f369, 161}, {0x1f36a, 162}, {0x1f36b, 163}, {0x1f36c, 164}, {0x1f36d, 165}, {0x1f36e, 166}, {0x1f36f, 167}, - {0x1f370, 168}, {0x1f371, 169}, {0x1f372, 170}, {0x1f373, 171}, {0x1f374, 172}, {0x1f375, 173}, {0x1f376, 174}, - {0x1f377, 175}, {0x1f378, 176}, {0x1f379, 177}, {0x1f37a, 178}, {0x1f37b, 179}, {0x1f37c, 180}, {0x1f37d, 181}, - {0x1f37e, 182}, {0x1f37f, 183}, {0x1f380, 184}, {0x1f381, 185}, {0x1f382, 186}, {0x1f383, 187}, {0x1f384, 188}, - {0x1f385, 189}, {0x1f386, 190}, {0x1f387, 191}, {0x1f388, 192}, {0x1f389, 193}, {0x1f38a, 194}, {0x1f38b, 195}, - {0x1f38c, 196}, {0x1f38d, 197}, {0x1f38e, 198}, {0x1f38f, 199}, {0x1f390, 200}, {0x1f391, 201}, {0x1f392, 202}, - {0x1f393, 203}, {0x1f396, 204}, {0x1f397, 205}, {0x1f399, 206}, {0x1f39a, 207}, {0x1f39b, 208}, {0x1f39e, 209}, - {0x1f39f, 210}, {0x1f3a0, 211}, {0x1f3a1, 212}, {0x1f3a2, 213}, {0x1f3a3, 214}, {0x1f3a4, 215}, {0x1f3a5, 216}, - {0x1f3a6, 217}, {0x1f3a7, 218}, {0x1f3a8, 219}, {0x1f3a9, 220}, {0x1f3aa, 221}, {0x1f3ab, 222}, {0x1f3ac, 223}, - {0x1f3ad, 224}, {0x1f3ae, 225}, {0x1f3af, 226}, {0x1f3b0, 227}, {0x1f3b1, 228}, {0x1f3b2, 229}, {0x1f3b3, 230}, - {0x1f3b4, 231}, {0x1f3b5, 232}, {0x1f3b6, 233}, {0x1f3b7, 234}, {0x1f3b8, 235}, {0x1f3b9, 236}, {0x1f3ba, 237}, - {0x1f3bb, 238}, {0x1f3bc, 239}, {0x1f3bd, 240}, {0x1f3be, 241}, {0x1f3bf, 242}, {0x1f3c0, 243}, {0x1f3c1, 244}, - {0x1f3c2, 245}, {0x1f3c3, 246}, {0x1f3c4, 247}, {0x1f3c5, 248}, {0x1f3c6, 249}, {0x1f3c7, 250}, {0x1f3c8, 251}, - {0x1f3c9, 252}, {0x1f3ca, 253}, {0x1f3cb, 254}, {0x1f3cc, 255}, {0x1f3cd, 256}, {0x1f3ce, 257}, {0x1f3cf, 258}, - {0x1f3d0, 259}, {0x1f3d1, 260}, {0x1f3d2, 261}, {0x1f3d3, 262}, {0x1f3d4, 263}, {0x1f3d5, 264}, {0x1f3d6, 265}, - {0x1f3d7, 266}, {0x1f3d8, 267}, {0x1f3d9, 268}, {0x1f3da, 269}, {0x1f3db, 270}, {0x1f3dc, 271}, {0x1f3dd, 272}, - {0x1f3de, 273}, {0x1f3df, 274}, {0x1f3e0, 275}, {0x1f3e1, 276}, {0x1f3e2, 277}, {0x1f3e3, 278}, {0x1f3e4, 279}, - {0x1f3e5, 280}, {0x1f3e6, 281}, {0x1f3e7, 282}, {0x1f3e8, 283}, {0x1f3e9, 284}, {0x1f3ea, 285}, {0x1f3eb, 286}, - {0x1f3ec, 287}, {0x1f3ed, 288}, {0x1f3ee, 289}, {0x1f3ef, 290}, {0x1f3f0, 291}, {0x1f3f3, 292}, {0x1f3f4, 293}, - {0x1f3f5, 294}, {0x1f3f7, 295}, {0x1f3f8, 296}, {0x1f3f9, 297}, {0x1f3fa, 298}, {0x1f3fb, 299}, {0x1f3fc, 300}, - {0x1f3fd, 301}, {0x1f3fe, 302}, {0x1f3ff, 303}, {0x1f400, 304}, {0x1f401, 305}, {0x1f402, 306}, {0x1f403, 307}, - {0x1f404, 308}, {0x1f405, 309}, {0x1f406, 310}, {0x1f407, 311}, {0x1f408, 312}, {0x1f409, 313}, {0x1f40a, 314}, - {0x1f40b, 315}, {0x1f40c, 316}, {0x1f40d, 317}, {0x1f40e, 318}, {0x1f40f, 319}, {0x1f410, 320}, {0x1f411, 321}, - {0x1f412, 322}, {0x1f413, 323}, {0x1f414, 324}, {0x1f415, 325}, {0x1f416, 326}, {0x1f417, 327}, {0x1f418, 328}, - {0x1f419, 329}, {0x1f41a, 330}, {0x1f41b, 331}, {0x1f41c, 332}, {0x1f41d, 333}, {0x1f41e, 334}, {0x1f41f, 335}, - {0x1f420, 336}, {0x1f421, 337}, {0x1f422, 338}, {0x1f423, 339}, {0x1f424, 340}, {0x1f425, 341}, {0x1f426, 342}, - {0x1f427, 343}, {0x1f428, 344}, {0x1f429, 345}, {0x1f42a, 346}, {0x1f42b, 347}, {0x1f42c, 348}, {0x1f42d, 349}, - {0x1f42e, 350}, {0x1f42f, 351}, {0x1f430, 352}, {0x1f431, 353}, {0x1f432, 354}, {0x1f433, 355}, {0x1f434, 356}, - {0x1f435, 357}, {0x1f436, 358}, {0x1f437, 359}, {0x1f438, 360}, {0x1f439, 361}, {0x1f43a, 362}, {0x1f43b, 363}, - {0x1f43c, 364}, {0x1f43d, 365}, {0x1f43e, 366}, {0x1f43f, 367}, {0x1f440, 368}, {0x1f441, 369}, {0x1f442, 370}, - {0x1f443, 371}, {0x1f444, 372}, {0x1f445, 373}, {0x1f446, 374}, {0x1f447, 375}, {0x1f448, 376}, {0x1f449, 377}, - {0x1f44a, 378}, {0x1f44b, 379}, {0x1f44c, 380}, {0x1f44d, 381}, {0x1f44e, 382}, {0x1f44f, 383}, {0x1f450, 384}, - {0x1f451, 385}, {0x1f452, 386}, {0x1f453, 387}, {0x1f454, 388}, {0x1f455, 389}, {0x1f456, 390}, {0x1f457, 391}, - {0x1f458, 392}, {0x1f459, 393}, {0x1f45a, 394}, {0x1f45b, 395}, {0x1f45c, 396}, {0x1f45d, 397}, {0x1f45e, 398}, - {0x1f45f, 399}, {0x1f460, 400}, {0x1f461, 401}, {0x1f462, 402}, {0x1f463, 403}, {0x1f464, 404}, {0x1f465, 405}, - {0x1f466, 406}, {0x1f467, 407}, {0x1f468, 408}, {0x1f469, 409}, {0x1f46a, 410}, {0x1f46b, 411}, {0x1f46c, 412}, - {0x1f46d, 413}, {0x1f46e, 414}, {0x1f46f, 415}, {0x1f470, 416}, {0x1f471, 417}, {0x1f472, 418}, {0x1f473, 419}, - {0x1f474, 420}, {0x1f475, 421}, {0x1f476, 422}, {0x1f477, 423}, {0x1f478, 424}, {0x1f479, 425}, {0x1f47a, 426}, - {0x1f47b, 427}, {0x1f47c, 428}, {0x1f47d, 429}, {0x1f47e, 430}, {0x1f47f, 431}, {0x1f480, 432}, {0x1f481, 433}, - {0x1f482, 434}, {0x1f483, 435}, {0x1f484, 436}, {0x1f485, 437}, {0x1f486, 438}, {0x1f487, 439}, {0x1f488, 440}, - {0x1f489, 441}, {0x1f48a, 442}, {0x1f48b, 443}, {0x1f48c, 444}, {0x1f48d, 445}, {0x1f48e, 446}, {0x1f48f, 447}, - {0x1f490, 448}, {0x1f491, 449}, {0x1f492, 450}, {0x1f493, 451}, {0x1f494, 452}, {0x1f495, 453}, {0x1f496, 454}, - {0x1f497, 455}, {0x1f498, 456}, {0x1f499, 457}, {0x1f49a, 458}, {0x1f49b, 459}, {0x1f49c, 460}, {0x1f49d, 461}, - {0x1f49e, 462}, {0x1f49f, 463}, {0x1f4a0, 464}, {0x1f4a1, 465}, {0x1f4a2, 466}, {0x1f4a3, 467}, {0x1f4a4, 468}, - {0x1f4a5, 469}, {0x1f4a6, 470}, {0x1f4a7, 471}, {0x1f4a8, 472}, {0x1f4a9, 473}, {0x1f4aa, 474}, {0x1f4ab, 475}, - {0x1f4ac, 476}, {0x1f4ad, 477}, {0x1f4ae, 478}, {0x1f4af, 479}, {0x1f4b0, 480}, {0x1f4b1, 481}, {0x1f4b2, 482}, - {0x1f4b3, 483}, {0x1f4b4, 484}, {0x1f4b5, 485}, {0x1f4b6, 486}, {0x1f4b7, 487}, {0x1f4b8, 488}, {0x1f4b9, 489}, - {0x1f4ba, 490}, {0x1f4bb, 491}, {0x1f4bc, 492}, {0x1f4bd, 493}, {0x1f4be, 494}, {0x1f4bf, 495}, {0x1f4c0, 496}, - {0x1f4c1, 497}, {0x1f4c2, 498}, {0x1f4c3, 499}, {0x1f4c4, 500}, {0x1f4c5, 501}, {0x1f4c6, 502}, {0x1f4c7, 503}, - {0x1f4c8, 504}, {0x1f4c9, 505}, {0x1f4ca, 506}, {0x1f4cb, 507}, {0x1f4cc, 508}, {0x1f4cd, 509}, {0x1f4ce, 510}, - {0x1f4cf, 511}, {0x1f4d0, 512}, {0x1f4d1, 513}, {0x1f4d2, 514}, {0x1f4d3, 515}, {0x1f4d4, 516}, {0x1f4d5, 517}, - {0x1f4d6, 518}, {0x1f4d7, 519}, {0x1f4d8, 520}, {0x1f4d9, 521}, {0x1f4da, 522}, {0x1f4db, 523}, {0x1f4dc, 524}, - {0x1f4dd, 525}, {0x1f4de, 526}, {0x1f4df, 527}, {0x1f4e0, 528}, {0x1f4e1, 529}, {0x1f4e2, 530}, {0x1f4e3, 531}, - {0x1f4e4, 532}, {0x1f4e5, 533}, {0x1f4e6, 534}, {0x1f4e7, 535}, {0x1f4e8, 536}, {0x1f4e9, 537}, {0x1f4ea, 538}, - {0x1f4eb, 539}, {0x1f4ec, 540}, {0x1f4ed, 541}, {0x1f4ee, 542}, {0x1f4ef, 543}, {0x1f4f0, 544}, {0x1f4f1, 545}, - {0x1f4f2, 546}, {0x1f4f3, 547}, {0x1f4f4, 548}, {0x1f4f5, 549}, {0x1f4f6, 550}, {0x1f4f7, 551}, {0x1f4f8, 552}, - {0x1f4f9, 553}, {0x1f4fa, 554}, {0x1f4fb, 555}, {0x1f4fc, 556}, {0x1f4fd, 557}, {0x1f4ff, 558}, {0x1f500, 559}, - {0x1f501, 560}, {0x1f502, 561}, {0x1f503, 562}, {0x1f504, 563}, {0x1f505, 564}, {0x1f506, 565}, {0x1f507, 566}, - {0x1f508, 567}, {0x1f509, 568}, {0x1f50a, 569}, {0x1f50b, 570}, {0x1f50c, 571}, {0x1f50d, 572}, {0x1f50e, 573}, - {0x1f50f, 574}, {0x1f510, 575}, {0x1f511, 576}, {0x1f512, 577}, {0x1f513, 578}, {0x1f514, 579}, {0x1f515, 580}, - {0x1f516, 581}, {0x1f517, 582}, {0x1f518, 583}, {0x1f519, 584}, {0x1f51a, 585}, {0x1f51b, 586}, {0x1f51c, 587}, - {0x1f51d, 588}, {0x1f51e, 589}, {0x1f51f, 590}, {0x1f520, 591}, {0x1f521, 592}, {0x1f522, 593}, {0x1f523, 594}, - {0x1f524, 595}, {0x1f525, 596}, {0x1f526, 597}, {0x1f527, 598}, {0x1f528, 599}, {0x1f529, 600}, {0x1f52a, 601}, - {0x1f52b, 602}, {0x1f52c, 603}, {0x1f52d, 604}, {0x1f52e, 605}, {0x1f52f, 606}, {0x1f530, 607}, {0x1f531, 608}, - {0x1f532, 609}, {0x1f533, 610}, {0x1f534, 611}, {0x1f535, 612}, {0x1f536, 613}, {0x1f537, 614}, {0x1f538, 615}, - {0x1f539, 616}, {0x1f53a, 617}, {0x1f53b, 618}, {0x1f53c, 619}, {0x1f53d, 620}, {0x1f549, 621}, {0x1f54a, 622}, - {0x1f54b, 623}, {0x1f54c, 624}, {0x1f54d, 625}, {0x1f54e, 626}, {0x1f550, 627}, {0x1f551, 628}, {0x1f552, 629}, - {0x1f553, 630}, {0x1f554, 631}, {0x1f555, 632}, {0x1f556, 633}, {0x1f557, 634}, {0x1f558, 635}, {0x1f559, 636}, - {0x1f55a, 637}, {0x1f55b, 638}, {0x1f55c, 639}, {0x1f55d, 640}, {0x1f55e, 641}, {0x1f55f, 642}, {0x1f560, 643}, - {0x1f561, 644}, {0x1f562, 645}, {0x1f563, 646}, {0x1f564, 647}, {0x1f565, 648}, {0x1f566, 649}, {0x1f567, 650}, - {0x1f56f, 651}, {0x1f570, 652}, {0x1f573, 653}, {0x1f574, 654}, {0x1f575, 655}, {0x1f576, 656}, {0x1f577, 657}, - {0x1f578, 658}, {0x1f579, 659}, {0x1f57a, 660}, {0x1f587, 661}, {0x1f58a, 662}, {0x1f58b, 663}, {0x1f58c, 664}, - {0x1f58d, 665}, {0x1f590, 666}, {0x1f595, 667}, {0x1f596, 668}, {0x1f5a4, 669}, {0x1f5a5, 670}, {0x1f5a8, 671}, - {0x1f5b1, 672}, {0x1f5b2, 673}, {0x1f5bc, 674}, {0x1f5c2, 675}, {0x1f5c3, 676}, {0x1f5c4, 677}, {0x1f5d1, 678}, - {0x1f5d2, 679}, {0x1f5d3, 680}, {0x1f5dc, 681}, {0x1f5dd, 682}, {0x1f5de, 683}, {0x1f5e1, 684}, {0x1f5e3, 685}, - {0x1f5e8, 686}, {0x1f5ef, 687}, {0x1f5f3, 688}, {0x1f5fa, 689}, {0x1f5fb, 690}, {0x1f5fc, 691}, {0x1f5fd, 692}, - {0x1f5fe, 693}, {0x1f5ff, 694}, {0x1f600, 695}, {0x1f601, 696}, {0x1f602, 697}, {0x1f603, 698}, {0x1f604, 699}, - {0x1f605, 700}, {0x1f606, 701}, {0x1f607, 702}, {0x1f608, 703}, {0x1f609, 704}, {0x1f60a, 705}, {0x1f60b, 706}, - {0x1f60c, 707}, {0x1f60d, 708}, {0x1f60e, 709}, {0x1f60f, 710}, {0x1f610, 711}, {0x1f611, 712}, {0x1f612, 713}, - {0x1f613, 714}, {0x1f614, 715}, {0x1f615, 716}, {0x1f616, 717}, {0x1f617, 718}, {0x1f618, 719}, {0x1f619, 720}, - {0x1f61a, 721}, {0x1f61b, 722}, {0x1f61c, 723}, {0x1f61d, 724}, {0x1f61e, 725}, {0x1f61f, 726}, {0x1f620, 727}, - {0x1f621, 728}, {0x1f622, 729}, {0x1f623, 730}, {0x1f624, 731}, {0x1f625, 732}, {0x1f626, 733}, {0x1f627, 734}, - {0x1f628, 735}, {0x1f629, 736}, {0x1f62a, 737}, {0x1f62b, 738}, {0x1f62c, 739}, {0x1f62d, 740}, {0x1f62e, 741}, - {0x1f62f, 742}, {0x1f630, 743}, {0x1f631, 744}, {0x1f632, 745}, {0x1f633, 746}, {0x1f634, 747}, {0x1f635, 748}, - {0x1f636, 749}, {0x1f637, 750}, {0x1f638, 751}, {0x1f639, 752}, {0x1f63a, 753}, {0x1f63b, 754}, {0x1f63c, 755}, - {0x1f63d, 756}, {0x1f63e, 757}, {0x1f63f, 758}, {0x1f640, 759}, {0x1f641, 760}, {0x1f642, 761}, {0x1f643, 762}, - {0x1f644, 763}, {0x1f645, 764}, {0x1f646, 765}, {0x1f647, 766}, {0x1f648, 767}, {0x1f649, 768}, {0x1f64a, 769}, - {0x1f64b, 770}, {0x1f64c, 771}, {0x1f64d, 772}, {0x1f64e, 773}, {0x1f64f, 774}, {0x1f680, 775}, {0x1f681, 776}, - {0x1f682, 777}, {0x1f683, 778}, {0x1f684, 779}, {0x1f685, 780}, {0x1f686, 781}, {0x1f687, 782}, {0x1f688, 783}, - {0x1f689, 784}, {0x1f68a, 785}, {0x1f68b, 786}, {0x1f68c, 787}, {0x1f68d, 788}, {0x1f68e, 789}, {0x1f68f, 790}, - {0x1f690, 791}, {0x1f691, 792}, {0x1f692, 793}, {0x1f693, 794}, {0x1f694, 795}, {0x1f695, 796}, {0x1f696, 797}, - {0x1f697, 798}, {0x1f698, 799}, {0x1f699, 800}, {0x1f69a, 801}, {0x1f69b, 802}, {0x1f69c, 803}, {0x1f69d, 804}, - {0x1f69e, 805}, {0x1f69f, 806}, {0x1f6a0, 807}, {0x1f6a1, 808}, {0x1f6a2, 809}, {0x1f6a3, 810}, {0x1f6a4, 811}, - {0x1f6a5, 812}, {0x1f6a6, 813}, {0x1f6a7, 814}, {0x1f6a8, 815}, {0x1f6a9, 816}, {0x1f6aa, 817}, {0x1f6ab, 818}, - {0x1f6ac, 819}, {0x1f6ad, 820}, {0x1f6ae, 821}, {0x1f6af, 822}, {0x1f6b0, 823}, {0x1f6b1, 824}, {0x1f6b2, 825}, - {0x1f6b3, 826}, {0x1f6b4, 827}, {0x1f6b5, 828}, {0x1f6b6, 829}, {0x1f6b7, 830}, {0x1f6b8, 831}, {0x1f6b9, 832}, - {0x1f6ba, 833}, {0x1f6bb, 834}, {0x1f6bc, 835}, {0x1f6bd, 836}, {0x1f6be, 837}, {0x1f6bf, 838}, {0x1f6c0, 839}, - {0x1f6c1, 840}, {0x1f6c2, 841}, {0x1f6c3, 842}, {0x1f6c4, 843}, {0x1f6c5, 844}, {0x1f6cb, 845}, {0x1f6cc, 846}, - {0x1f6cd, 847}, {0x1f6ce, 848}, {0x1f6cf, 849}, {0x1f6d0, 850}, {0x1f6d1, 851}, {0x1f6d2, 852}, {0x1f6d5, 853}, - {0x1f6e0, 854}, {0x1f6e1, 855}, {0x1f6e2, 856}, {0x1f6e3, 857}, {0x1f6e4, 858}, {0x1f6e5, 859}, {0x1f6e9, 860}, - {0x1f6eb, 861}, {0x1f6ec, 862}, {0x1f6f0, 863}, {0x1f6f3, 864}, {0x1f6f4, 865}, {0x1f6f5, 866}, {0x1f6f6, 867}, - {0x1f6f7, 868}, {0x1f6f8, 869}, {0x1f6f9, 870}, {0x1f6fa, 871}, {0x1f7e0, 872}, {0x1f7e1, 873}, {0x1f7e2, 874}, - {0x1f7e3, 875}, {0x1f7e4, 876}, {0x1f7e5, 877}, {0x1f7e6, 878}, {0x1f7e7, 879}, {0x1f7e8, 880}, {0x1f7e9, 881}, - {0x1f7ea, 882}, {0x1f7eb, 883}, {0x1f90d, 884}, {0x1f90e, 885}, {0x1f90f, 886}, {0x1f910, 887}, {0x1f911, 888}, - {0x1f912, 889}, {0x1f913, 890}, {0x1f914, 891}, {0x1f915, 892}, {0x1f916, 893}, {0x1f917, 894}, {0x1f918, 895}, - {0x1f919, 896}, {0x1f91a, 897}, {0x1f91b, 898}, {0x1f91c, 899}, {0x1f91d, 900}, {0x1f91e, 901}, {0x1f91f, 902}, - {0x1f920, 903}, {0x1f921, 904}, {0x1f922, 905}, {0x1f923, 906}, {0x1f924, 907}, {0x1f925, 908}, {0x1f926, 909}, - {0x1f927, 910}, {0x1f928, 911}, {0x1f929, 912}, {0x1f92a, 913}, {0x1f92b, 914}, {0x1f92c, 915}, {0x1f92d, 916}, - {0x1f92e, 917}, {0x1f92f, 918}, {0x1f930, 919}, {0x1f931, 920}, {0x1f932, 921}, {0x1f933, 922}, {0x1f934, 923}, - {0x1f935, 924}, {0x1f936, 925}, {0x1f937, 926}, {0x1f938, 927}, {0x1f939, 928}, {0x1f93a, 929}, {0x1f93c, 930}, - {0x1f93d, 931}, {0x1f93e, 932}, {0x1f93f, 933}, {0x1f940, 934}, {0x1f941, 935}, {0x1f942, 936}, {0x1f943, 937}, - {0x1f944, 938}, {0x1f945, 939}, {0x1f947, 940}, {0x1f948, 941}, {0x1f949, 942}, {0x1f94a, 943}, {0x1f94b, 944}, - {0x1f94c, 945}, {0x1f94d, 946}, {0x1f94e, 947}, {0x1f94f, 948}, {0x1f950, 949}, {0x1f951, 950}, {0x1f952, 951}, - {0x1f953, 952}, {0x1f954, 953}, {0x1f955, 954}, {0x1f956, 955}, {0x1f957, 956}, {0x1f958, 957}, {0x1f959, 958}, - {0x1f95a, 959}, {0x1f95b, 960}, {0x1f95c, 961}, {0x1f95d, 962}, {0x1f95e, 963}, {0x1f95f, 964}, {0x1f960, 965}, - {0x1f961, 966}, {0x1f962, 967}, {0x1f963, 968}, {0x1f964, 969}, {0x1f965, 970}, {0x1f966, 971}, {0x1f967, 972}, - {0x1f968, 973}, {0x1f969, 974}, {0x1f96a, 975}, {0x1f96b, 976}, {0x1f96c, 977}, {0x1f96d, 978}, {0x1f96e, 979}, - {0x1f96f, 980}, {0x1f970, 981}, {0x1f971, 982}, {0x1f973, 983}, {0x1f974, 984}, {0x1f975, 985}, {0x1f976, 986}, - {0x1f97a, 987}, {0x1f97b, 988}, {0x1f97c, 989}, {0x1f97d, 990}, {0x1f97e, 991}, {0x1f97f, 992}, {0x1f980, 993}, - {0x1f981, 994}, {0x1f982, 995}, {0x1f983, 996}, {0x1f984, 997}, {0x1f985, 998}, {0x1f986, 999}, {0x1f987, 1000}, - {0x1f988, 1001}, {0x1f989, 1002}, {0x1f98a, 1003}, {0x1f98b, 1004}, {0x1f98c, 1005}, {0x1f98d, 1006}, {0x1f98e, 1007}, - {0x1f98f, 1008}, {0x1f990, 1009}, {0x1f991, 1010}, {0x1f992, 1011}, {0x1f993, 1012}, {0x1f994, 1013}, {0x1f995, 1014}, - {0x1f996, 1015}, {0x1f997, 1016}, {0x1f998, 1017}, {0x1f999, 1018}, {0x1f99a, 1019}, {0x1f99b, 1020}, {0x1f99c, 1021}, - {0x1f99d, 1022}, {0x1f99e, 1023}, {0x1f99f, 1024}, {0x1f9a0, 1025}, {0x1f9a1, 1026}, {0x1f9a2, 1027}, {0x1f9a5, 1028}, - {0x1f9a6, 1029}, {0x1f9a7, 1030}, {0x1f9a8, 1031}, {0x1f9a9, 1032}, {0x1f9aa, 1033}, {0x1f9ae, 1034}, {0x1f9af, 1035}, - {0x1f9b0, 1036}, {0x1f9b1, 1037}, {0x1f9b2, 1038}, {0x1f9b3, 1039}, {0x1f9b4, 1040}, {0x1f9b5, 1041}, {0x1f9b6, 1042}, - {0x1f9b7, 1043}, {0x1f9b8, 1044}, {0x1f9b9, 1045}, {0x1f9ba, 1046}, {0x1f9bb, 1047}, {0x1f9bc, 1048}, {0x1f9bd, 1049}, - {0x1f9be, 1050}, {0x1f9bf, 1051}, {0x1f9c0, 1052}, {0x1f9c1, 1053}, {0x1f9c2, 1054}, {0x1f9c3, 1055}, {0x1f9c4, 1056}, - {0x1f9c5, 1057}, {0x1f9c6, 1058}, {0x1f9c7, 1059}, {0x1f9c8, 1060}, {0x1f9c9, 1061}, {0x1f9ca, 1062}, {0x1f9cd, 1063}, - {0x1f9ce, 1064}, {0x1f9cf, 1065}, {0x1f9d0, 1066}, {0x1f9d1, 1067}, {0x1f9d2, 1068}, {0x1f9d3, 1069}, {0x1f9d4, 1070}, - {0x1f9d5, 1071}, {0x1f9d6, 1072}, {0x1f9d7, 1073}, {0x1f9d8, 1074}, {0x1f9d9, 1075}, {0x1f9da, 1076}, {0x1f9db, 1077}, - {0x1f9dc, 1078}, {0x1f9dd, 1079}, {0x1f9de, 1080}, {0x1f9df, 1081}, {0x1f9e0, 1082}, {0x1f9e1, 1083}, {0x1f9e2, 1084}, - {0x1f9e3, 1085}, {0x1f9e4, 1086}, {0x1f9e5, 1087}, {0x1f9e6, 1088}, {0x1f9e7, 1089}, {0x1f9e8, 1090}, {0x1f9e9, 1091}, - {0x1f9ea, 1092}, {0x1f9eb, 1093}, {0x1f9ec, 1094}, {0x1f9ed, 1095}, {0x1f9ee, 1096}, {0x1f9ef, 1097}, {0x1f9f0, 1098}, - {0x1f9f1, 1099}, {0x1f9f2, 1100}, {0x1f9f3, 1101}, {0x1f9f4, 1102}, {0x1f9f5, 1103}, {0x1f9f6, 1104}, {0x1f9f7, 1105}, - {0x1f9f8, 1106}, {0x1f9f9, 1107}, {0x1f9fa, 1108}, {0x1f9fb, 1109}, {0x1f9fc, 1110}, {0x1f9fd, 1111}, {0x1f9fe, 1112}, - {0x1f9ff, 1113}, {0x1fa70, 1114}, {0x1fa71, 1115}, {0x1fa72, 1116}, {0x1fa73, 1117}, {0x1fa78, 1118}, {0x1fa79, 1119}, - {0x1fa7a, 1120}, {0x1fa80, 1121}, {0x1fa81, 1122}, {0x1fa82, 1123}, {0x1fa90, 1124}, {0x1fa91, 1125}, {0x1fa92, 1126}, - {0x1fa93, 1127}, {0x1fa94, 1128}, {0x1fa95, 1129}, {0x203c, 1130}, {0x2049, 1131}, {0x20e3, 1132}, {0x2122, 1133}, - {0x2139, 1134}, {0x2194, 1135}, {0x2195, 1136}, {0x2196, 1137}, {0x2197, 1138}, {0x2198, 1139}, {0x2199, 1140}, - {0x21a9, 1141}, {0x21aa, 1142}, {0x231a, 1143}, {0x231b, 1144}, {0x2328, 1145}, {0x23cf, 1146}, {0x23e9, 1147}, - {0x23ea, 1148}, {0x23eb, 1149}, {0x23ec, 1150}, {0x23ed, 1151}, {0x23ee, 1152}, {0x23ef, 1153}, {0x23f0, 1154}, - {0x23f1, 1155}, {0x23f2, 1156}, {0x23f3, 1157}, {0x23f8, 1158}, {0x23f9, 1159}, {0x23fa, 1160}, {0x24c2, 1161}, - {0x25aa, 1162}, {0x25ab, 1163}, {0x25b6, 1164}, {0x25c0, 1165}, {0x25fb, 1166}, {0x25fc, 1167}, {0x25fd, 1168}, - {0x25fe, 1169}, {0x2600, 1170}, {0x2601, 1171}, {0x2602, 1172}, {0x2603, 1173}, {0x2604, 1174}, {0x260e, 1175}, - {0x2611, 1176}, {0x2614, 1177}, {0x2615, 1178}, {0x2618, 1179}, {0x261d, 1180}, {0x2620, 1181}, {0x2622, 1182}, - {0x2623, 1183}, {0x2626, 1184}, {0x262a, 1185}, {0x262e, 1186}, {0x262f, 1187}, {0x2638, 1188}, {0x2639, 1189}, - {0x263a, 1190}, {0x2640, 1191}, {0x2642, 1192}, {0x2648, 1193}, {0x2649, 1194}, {0x264a, 1195}, {0x264b, 1196}, - {0x264c, 1197}, {0x264d, 1198}, {0x264e, 1199}, {0x264f, 1200}, {0x2650, 1201}, {0x2651, 1202}, {0x2652, 1203}, - {0x2653, 1204}, {0x265f, 1205}, {0x2660, 1206}, {0x2663, 1207}, {0x2665, 1208}, {0x2666, 1209}, {0x2668, 1210}, - {0x267b, 1211}, {0x267e, 1212}, {0x267f, 1213}, {0x2692, 1214}, {0x2693, 1215}, {0x2694, 1216}, {0x2695, 1217}, - {0x2696, 1218}, {0x2697, 1219}, {0x2699, 1220}, {0x269b, 1221}, {0x269c, 1222}, {0x26a0, 1223}, {0x26a1, 1224}, - {0x26aa, 1225}, {0x26ab, 1226}, {0x26b0, 1227}, {0x26b1, 1228}, {0x26bd, 1229}, {0x26be, 1230}, {0x26c4, 1231}, - {0x26c5, 1232}, {0x26c8, 1233}, {0x26ce, 1234}, {0x26cf, 1235}, {0x26d1, 1236}, {0x26d3, 1237}, {0x26d4, 1238}, - {0x26e9, 1239}, {0x26ea, 1240}, {0x26f0, 1241}, {0x26f1, 1242}, {0x26f2, 1243}, {0x26f3, 1244}, {0x26f4, 1245}, - {0x26f5, 1246}, {0x26f7, 1247}, {0x26f8, 1248}, {0x26f9, 1249}, {0x26fa, 1250}, {0x26fd, 1251}, {0x2702, 1252}, - {0x2705, 1253}, {0x2708, 1254}, {0x2709, 1255}, {0x270a, 1256}, {0x270b, 1257}, {0x270c, 1258}, {0x270d, 1259}, - {0x270f, 1260}, {0x2712, 1261}, {0x2714, 1262}, {0x2716, 1263}, {0x271d, 1264}, {0x2721, 1265}, {0x2728, 1266}, - {0x2733, 1267}, {0x2734, 1268}, {0x2744, 1269}, {0x2747, 1270}, {0x274c, 1271}, {0x274e, 1272}, {0x2753, 1273}, - {0x2754, 1274}, {0x2755, 1275}, {0x2757, 1276}, {0x2763, 1277}, {0x2764, 1278}, {0x2795, 1279}, {0x2796, 1280}, - {0x2797, 1281}, {0x27a1, 1282}, {0x27b0, 1283}, {0x27bf, 1284}, {0x2934, 1285}, {0x2935, 1286}, {0x2b05, 1287}, - {0x2b06, 1288}, {0x2b07, 1289}, {0x2b1b, 1290}, {0x2b1c, 1291}, {0x2b50, 1292}, {0x2b55, 1293}, {0x3030, 1294}, - {0x303d, 1295}, {0x3297, 1296}, {0x3299, 1297}, - }; + public static Dictionary emojiLookupTable { + get { + return configuration.emojiLookupTable; + } + } - public static readonly HashSet SingleCharEmojiCodePoints = new HashSet { - 0x203c, 0x2049, 0x20e3, 0x2122, 0x2139, 0x2194, 0x2195, 0x2196, 0x2197, 0x2198, 0x2199, 0x21a9, - 0x21aa, 0x231a, 0x231b, 0x2328, 0x23cf, 0x23e9, 0x23ea, 0x23eb, 0x23ec, 0x23ed, 0x23ee, 0x23ef, - 0x23f0, 0x23f1, 0x23f2, 0x23f3, 0x23f8, 0x23f9, 0x23fa, 0x24c2, 0x25aa, 0x25ab, 0x25b6, 0x25c0, - 0x25fb, 0x25fc, 0x25fd, 0x25fe, 0x2600, 0x2601, 0x2602, 0x2603, 0x2604, 0x260e, 0x2611, 0x2614, - 0x2615, 0x2618, 0x261d, 0x2620, 0x2622, 0x2623, 0x2626, 0x262a, 0x262e, 0x262f, 0x2638, 0x2639, - 0x263a, 0x2640, 0x2642, 0x2648, 0x2649, 0x264a, 0x264b, 0x264c, 0x264d, 0x264e, 0x264f, 0x2650, - 0x2651, 0x2652, 0x2653, 0x265f, 0x2660, 0x2663, 0x2665, 0x2666, 0x2668, 0x267b, 0x267e, 0x267f, - 0x2692, 0x2693, 0x2694, 0x2695, 0x2696, 0x2697, 0x2699, 0x269b, 0x269c, 0x26a0, 0x26a1, 0x26aa, - 0x26ab, 0x26b0, 0x26b1, 0x26bd, 0x26be, 0x26c4, 0x26c5, 0x26c8, 0x26ce, 0x26cf, 0x26d1, 0x26d3, - 0x26d4, 0x26e9, 0x26ea, 0x26f0, 0x26f1, 0x26f2, 0x26f3, 0x26f4, 0x26f5, 0x26f7, 0x26f8, 0x26f9, - 0x26fa, 0x26fd, 0x2702, 0x2705, 0x2708, 0x2709, 0x270a, 0x270b, 0x270c, 0x270d, 0x270f, 0x2712, - 0x2714, 0x2716, 0x271d, 0x2721, 0x2728, 0x2733, 0x2734, 0x2744, 0x2747, 0x274c, 0x274e, 0x2753, - 0x2754, 0x2755, 0x2757, 0x2763, 0x2764, 0x2795, 0x2796, 0x2797, 0x27a1, 0x27b0, 0x27bf, 0x2934, - 0x2935, 0x2b05, 0x2b06, 0x2b07, 0x2b1b, 0x2b1c, 0x2b50, 0x2b55, 0x3030, 0x303d, 0x3297, 0x3299 - }; + public static int rowCount { + get { return configuration.spriteSheetNumberOfRows; } + } - public const int rowCount = 36; - public const int colCount = 37; + public static int colCount { + get { return configuration.spriteSheetNumberOfColumns; } + } + public static float advanceFactor = 1.3f; public static float sizeFactor = 1.2f; @@ -264,11 +505,11 @@ public static bool isSingleCharEmoji(int c) { } public static bool isSingleCharNonEmptyEmoji(int c) { - return SingleCharEmojiCodePoints.Contains(c); + return c <= 0xffff && emojiLookupTable.ContainsKey(c); } public static bool isEmptyEmoji(int c) { - return c == 0xFE0F; + return c == 0xFE0F && !emojiLookupTable.ContainsKey(c); } public static List splitByEmoji(string text) {