From 59bc0e556c05d094e1b2824c3db53d9a720d2403 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 18:21:50 +0200 Subject: [PATCH 1/7] Delete the EmojiOne sample sprite asset, its sheet and attribution Sixteen faces nothing references but TMP Settings (E3); EmojiOne art is not openly licensed. TMP Settings still names the asset until EmojiFont.Build rewrites its emoji routing, so this commit leaves a dangling reference and the next commits land the font that replaces it. Co-Authored-By: Claude Opus 5.5 --- .../TextMesh Pro/Resources/Sprite Assets.meta | 9 - .../Resources/Sprite Assets/EmojiOne.asset | 3 - .../Sprite Assets/EmojiOne.asset.meta | 8 - Assets/TextMesh Pro/Sprites.meta | 8 - .../Sprites/EmojiOne Attribution.txt | 3 - .../Sprites/EmojiOne Attribution.txt.meta | 7 - Assets/TextMesh Pro/Sprites/EmojiOne.json | 156 ------- .../TextMesh Pro/Sprites/EmojiOne.json.meta | 8 - Assets/TextMesh Pro/Sprites/EmojiOne.png | 3 - Assets/TextMesh Pro/Sprites/EmojiOne.png.meta | 431 ------------------ 10 files changed, 636 deletions(-) delete mode 100644 Assets/TextMesh Pro/Resources/Sprite Assets.meta delete mode 100644 Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset delete mode 100644 Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta delete mode 100644 Assets/TextMesh Pro/Sprites.meta delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne.json delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne.json.meta delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne.png delete mode 100644 Assets/TextMesh Pro/Sprites/EmojiOne.png.meta diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets.meta b/Assets/TextMesh Pro/Resources/Sprite Assets.meta deleted file mode 100644 index 5171f1b68..000000000 --- a/Assets/TextMesh Pro/Resources/Sprite Assets.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 512a49d95c0c4332bdd98131869c23c9 -folderAsset: yes -timeCreated: 1441876896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset b/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset deleted file mode 100644 index 8fd3185ec..000000000 --- a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:155fff99f467baa93dd2d0886df466bd242cd5e3c8c60c9d43e9cdad269f7f54 -size 13441 diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta b/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta deleted file mode 100644 index c7ac83f4d..000000000 --- a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c41005c129ba4d66911b75229fd70b45 -timeCreated: 1480316912 -licenseType: Pro -NativeFormatImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TextMesh Pro/Sprites.meta b/Assets/TextMesh Pro/Sprites.meta deleted file mode 100644 index 8b699e5fc..000000000 --- a/Assets/TextMesh Pro/Sprites.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d0603b6d5186471b96c778c3949c7ce2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt b/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt deleted file mode 100644 index 384180a92..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt +++ /dev/null @@ -1,3 +0,0 @@ -This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ - -Please visit their website to view the complete set of their emojis and review their licensing terms. \ No newline at end of file diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta b/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta deleted file mode 100644 index 0d30e6532..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 381dcb09d5029d14897e55f98031fca5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.json b/Assets/TextMesh Pro/Sprites/EmojiOne.json deleted file mode 100644 index 6c4e50bc8..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne.json +++ /dev/null @@ -1,156 +0,0 @@ -{"frames": [ - -{ - "filename": "1f60a.png", - "frame": {"x":0,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60b.png", - "frame": {"x":128,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60d.png", - "frame": {"x":256,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60e.png", - "frame": {"x":384,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f600.png", - "frame": {"x":0,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f601.png", - "frame": {"x":128,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f602.png", - "frame": {"x":256,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f603.png", - "frame": {"x":384,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f604.png", - "frame": {"x":0,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f605.png", - "frame": {"x":128,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f606.png", - "frame": {"x":256,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f609.png", - "frame": {"x":384,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f618.png", - "frame": {"x":0,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f923.png", - "frame": {"x":128,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "263a.png", - "frame": {"x":256,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "2639.png", - "frame": {"x":384,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}], -"meta": { - "app": "http://www.codeandweb.com/texturepacker", - "version": "1.0", - "image": "EmojiOne.png", - "format": "RGBA8888", - "size": {"w":512,"h":512}, - "scale": "1", - "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" -} -} diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta b/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta deleted file mode 100644 index 762cf15c9..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8f05276190cf498a8153f6cbe761d4e6 -timeCreated: 1480316860 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.png b/Assets/TextMesh Pro/Sprites/EmojiOne.png deleted file mode 100644 index 63e49d095..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a87b965a701de3dc31d7401e542b1fc946587f912c51d7a26e46ade9f098bd1a -size 112319 diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta b/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta deleted file mode 100644 index c9fa1a7df..000000000 --- a/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta +++ /dev/null @@ -1,431 +0,0 @@ -fileFormatVersion: 2 -guid: dffef66376be4fa480fb02b19edbe903 -TextureImporter: - fileIDToRecycleName: - 21300000: EmojiOne_0 - 21300002: EmojiOne_1 - 21300004: EmojiOne_2 - 21300006: EmojiOne_3 - 21300008: EmojiOne_4 - 21300010: EmojiOne_6 - 21300012: EmojiOne_7 - 21300014: EmojiOne_8 - 21300016: EmojiOne_9 - 21300018: EmojiOne_10 - 21300020: EmojiOne_11 - 21300022: EmojiOne_12 - 21300024: EmojiOne_13 - 21300026: EmojiOne_5 - 21300028: EmojiOne_14 - externalObjects: {} - serializedVersion: 5 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 2 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: iPhone - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: - - serializedVersion: 2 - name: EmojiOne_0 - rect: - serializedVersion: 2 - x: 0 - y: 384 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 4bcc36da2108f2c4ba3de5c921d25c3c - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_1 - rect: - serializedVersion: 2 - x: 128 - y: 384 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: e9eea8093eaeaee4d901c4553f572c22 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_2 - rect: - serializedVersion: 2 - x: 256 - y: 384 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 49451da35411dcc42a3692e39b0fde70 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_3 - rect: - serializedVersion: 2 - x: 384 - y: 384 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: f65709664b924904790c850a50ca82bc - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_4 - rect: - serializedVersion: 2 - x: 0 - y: 256 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 5b92c568a5ec9ad4b9ed90e271f1c9a8 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_6 - rect: - serializedVersion: 2 - x: 256 - y: 256 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: b10f2b48b7281594bb8a24a6511a35af - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_7 - rect: - serializedVersion: 2 - x: 384 - y: 256 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 10a600f9329dc2246a897e89f4d283cd - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_8 - rect: - serializedVersion: 2 - x: 0 - y: 128 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 66cffa363b90ab14787d8a5b90cf4502 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_9 - rect: - serializedVersion: 2 - x: 128 - y: 128 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 55cf3d409c9b89349b1e1bdc1cc224ad - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_10 - rect: - serializedVersion: 2 - x: 256 - y: 128 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 2a9e58eaf96feef42bcefa1cf257193f - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_11 - rect: - serializedVersion: 2 - x: 384 - y: 128 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 2489120affc155840ae6a7be2e93ce19 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_12 - rect: - serializedVersion: 2 - x: 0 - y: 0 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 412349a150598d14da4d7140df5c0286 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_13 - rect: - serializedVersion: 2 - x: 128 - y: 0 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: a937464b42bb3634782dea34c6becb6c - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_5 - rect: - serializedVersion: 2 - x: 256 - y: 0 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0, y: 0} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: b0f933b217682124dbfc5e6b89abe3d0 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: EmojiOne_14 - rect: - serializedVersion: 2 - x: 128 - y: 256 - width: 128 - height: 128 - alignment: 0 - pivot: {x: 0, y: 0} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: f7235c763afe4434e8bb666750a41096 - vertices: [] - indices: - edges: [] - weights: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: 3e32d8f5477abfc43b19066e8ad5032e - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: From 4e1b4882d470d3989aa1ea28e2887fe17e8310f8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 18:43:39 +0200 Subject: [PATCH 2/7] Add the emoji font pipeline: pinned Twemoji fetch, font builder, rendering check tools/emoji/fetch_emoji_font.py builds Assets/Fonts/Emoji/Twemoji.ttf from the pinned jdecked/twemoji release with nanoemoji (glyf_colr_0); EmojiFont.Build is the one writer of Emoji.asset and TMP Settings' emoji routing; EmojiCheck.Run renders every single-code-point emoji and the Pirates names through TMP. The generated font, lock and asset land in the next commit. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/Editor/EmojiCheck.cs | 118 ++++++++++++++++++++++ Assets/Scripts/Editor/EmojiCheck.cs.meta | 2 + Assets/Scripts/Editor/EmojiFont.cs | 74 ++++++++++++++ Assets/Scripts/Editor/EmojiFont.cs.meta | 2 + tools/emoji/fetch_emoji_font.py | 122 +++++++++++++++++++++++ tools/emoji/requirements.txt | 23 +++++ 6 files changed, 341 insertions(+) create mode 100644 Assets/Scripts/Editor/EmojiCheck.cs create mode 100644 Assets/Scripts/Editor/EmojiCheck.cs.meta create mode 100644 Assets/Scripts/Editor/EmojiFont.cs create mode 100644 Assets/Scripts/Editor/EmojiFont.cs.meta create mode 100644 tools/emoji/fetch_emoji_font.py create mode 100644 tools/emoji/requirements.txt diff --git a/Assets/Scripts/Editor/EmojiCheck.cs b/Assets/Scripts/Editor/EmojiCheck.cs new file mode 100644 index 000000000..3623587ce --- /dev/null +++ b/Assets/Scripts/Editor/EmojiCheck.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using TMPro; +using UnityEditor; +using UnityEngine; + +// Every single-code-point emoji the pinned font set draws, and the Pirates product names, render through an +// ordinary TMP text on the game's body font with no missing code point and with ink in the emoji atlas. +// Run as -executeMethod EmojiCheck.Run (exit 1 on failure in batchmode, as EngineAssetCheck). Corpus: +// tools/emoji/emoji-singles.txt; -emojiLimit N spreads N entries evenly across it for the spike. +public static class EmojiCheck +{ + const string BodyFontPath = "Assets/Fonts/Ubuntu/Ubuntu-L Small SDF.asset"; + const int Chunk = 64; + + // The eight Pirates products (addenda "The Pirates record r2"), written as code points. + static readonly string[] PiratesNames = + { + "\U0001FAF3\U0001F52B", "\U0001FAA6\U0001F920", "\U0001F9FE\U0001F6AB", "\U0001F3A8\U0001F648", + "\U0001F525", "\U0001F440\U0001F3AF", "\U0001F511\U0001F3C3\U0001F4A8", "\U0001F4E6\U0001F92B", + }; + + [MenuItem("Aetheria/Text/Check Emoji Rendering")] + public static void Run() + { + var failures = new List(); + var summary = RunCheck(failures); + foreach (var failure in failures.Take(20)) Debug.LogError(failure); + Debug.Log($"EmojiCheck: {summary}; {failures.Count} failure(s)."); + if (Application.isBatchMode) EditorApplication.Exit(failures.Count == 0 ? 0 : 1); + } + + static string RunCheck(List failures) + { + var emoji = AssetDatabase.LoadAssetAtPath(EmojiFont.AssetPath); + var body = AssetDatabase.LoadAssetAtPath(BodyFontPath); + if (emoji == null || body == null) + { + failures.Add("EmojiCheck: Emoji.asset or the body font is missing; run EmojiFont.Build first."); + return "nothing checked"; + } + + var corpus = LoadSingles(); + var missing = new HashSet(); + TMP_Text.MissingCharacterEventCallback onMissing = (unicode, index, source, asset, component) => missing.Add(unicode); + TMP_Text.OnMissingCharacter += onMissing; + + var canvas = new GameObject("EmojiCheck", typeof(Canvas)); + var text = new GameObject("Text", typeof(RectTransform)).AddComponent(); + text.transform.SetParent(canvas.transform, false); + text.font = body; + text.textWrappingMode = TextWrappingModes.NoWrap; + text.rectTransform.sizeDelta = new Vector2(100000, 100000); + + int viaEmoji = 0, viaOther = 0, blank = 0; + try + { + void Render(string content, string label) + { + text.text = content; + text.ForceMeshUpdate(); + for (var i = 0; i < text.textInfo.characterCount; i++) + { + var info = text.textInfo.characterInfo[i]; + if (info.character == ' ' || info.elementType != TMP_TextElementType.Character) continue; + if (info.fontAsset == emoji) viaEmoji++; else viaOther++; + if (info.fontAsset == emoji && info.textElement.glyph.glyphRect.width <= 0) + { + blank++; + failures.Add($"blank glyph U+{(int)info.character:X4} in {label}"); + } + } + } + + for (var i = 0; i < corpus.Count; i += Chunk) + { + var slice = corpus.Skip(i).Take(Chunk).ToList(); + Render(string.Join(" ", slice.Select(char.ConvertFromUtf32)), $"chunk {i}"); + } + foreach (var name in PiratesNames) Render(name, "Pirates name"); + } + finally + { + TMP_Text.OnMissingCharacter -= onMissing; + UnityEngine.Object.DestroyImmediate(canvas); + } + + foreach (var cp in missing.OrderBy(c => c)) failures.Add($"missing code point U+{cp:X4}"); + + long ink = 0, colour = 0; + foreach (var page in emoji.atlasTextures) + { + var pixels = page.GetPixels32(); + ink += pixels.LongCount(p => p.a != 0); + colour += pixels.LongCount(p => p.a != 0 && (p.r != p.g || p.g != p.b)); + } + if (ink == 0) failures.Add("the emoji atlas holds no ink after rendering"); + else if (colour == 0) failures.Add("the emoji atlas holds no coloured pixel: the glyphs rendered monochrome"); + + // Dynamic atlas content is cache: drop it so this check leaves the asset as Build wrote it. + emoji.ClearFontAssetData(true); + return $"checked {corpus.Count} single code points + {PiratesNames.Length} Pirates names, {missing.Count} missing, " + + $"{viaEmoji} glyphs via the emoji asset, {viaOther} via other fonts, {blank} blank, {ink} atlas ink pixels of which {colour} coloured"; + } + + static List LoadSingles() + { + var path = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "tools", "emoji", "emoji-singles.txt"); + var all = File.ReadAllLines(path).Where(l => l.Length > 0).Select(l => Convert.ToInt32(l, 16)).ToList(); + var args = Environment.GetCommandLineArgs(); + var at = Array.IndexOf(args, "-emojiLimit"); + if (at < 0 || at + 1 >= args.Length) return all; + var limit = int.Parse(args[at + 1]); + return Enumerable.Range(0, limit).Select(i => all[i * all.Count / limit]).ToList(); + } +} diff --git a/Assets/Scripts/Editor/EmojiCheck.cs.meta b/Assets/Scripts/Editor/EmojiCheck.cs.meta new file mode 100644 index 000000000..945280e85 --- /dev/null +++ b/Assets/Scripts/Editor/EmojiCheck.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c6f940add256a754daac8460fc79480d \ No newline at end of file diff --git a/Assets/Scripts/Editor/EmojiFont.cs b/Assets/Scripts/Editor/EmojiFont.cs new file mode 100644 index 000000000..855bece3a --- /dev/null +++ b/Assets/Scripts/Editor/EmojiFont.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using TMPro; +using UnityEditor; +using UnityEngine; +using UnityEngine.TextCore.LowLevel; + +// The one writer of the emoji font asset and of TMP Settings' emoji routing. The font file is the +// output of tools/emoji/fetch_emoji_font.py; the asset is a dynamic COLOR font asset whose atlas pages +// are cache, filled on first use at runtime and cleared here. Every TMP text reaches emoji through +// TMP Settings' emoji fallback and global fallback list; no component names an emoji font. +public static class EmojiFont +{ + public const string FontPath = "Assets/Fonts/Emoji/Twemoji.ttf"; + public const string AssetPath = "Assets/Fonts/Emoji/Emoji.asset"; + + // Colour outlines (COLRv0) are rasterised at one size; 109 is the strike size a CBDT set needs. + const int SamplingPointSize = 64; + const int AtlasPadding = 4; + const int AtlasSize = 2048; + + // Menu entry for interactive use; -executeMethod EmojiFont.Build for batchmode, exit 1 on failure. + [MenuItem("Aetheria/Text/Build Emoji Font")] + public static void Build() + { + var ok = TryBuild(out var message); + if (ok) Debug.Log(message); else Debug.LogError(message); + if (Application.isBatchMode) EditorApplication.Exit(ok ? 0 : 1); + } + + static bool TryBuild(out string message) + { + var font = AssetDatabase.LoadAssetAtPath(FontPath); + if (font == null) + { + message = $"EmojiFont: {FontPath} is missing; run tools/emoji/fetch_emoji_font.py."; + return false; + } + + // An existing asset keeps its GUID, so a second Build changes nothing the settings point at. + var asset = AssetDatabase.LoadAssetAtPath(AssetPath); + if (asset == null) + { + asset = TMP_FontAsset.CreateFontAsset(font, SamplingPointSize, AtlasPadding, GlyphRenderMode.COLOR, + AtlasSize, AtlasSize, AtlasPopulationMode.Dynamic, enableMultiAtlasSupport: true); + if (asset == null) + { + message = $"EmojiFont: TMP could not create a font asset from {FontPath}."; + return false; + } + asset.name = "Emoji"; + AssetDatabase.CreateAsset(asset, AssetPath); + foreach (var page in asset.atlasTextures) + { + page.name = "Emoji Atlas"; + AssetDatabase.AddObjectToAsset(page, asset); + } + asset.material.name = "Emoji Atlas Material"; + AssetDatabase.AddObjectToAsset(asset.material, asset); + } + else asset.ClearFontAssetData(true); + + // Text-presentation emoji (U+263A without FE0F) are not routed through the emoji list, so the + // asset is also the global fallback. + TMP_Settings.emojiFallbackTextAssets = new List { asset }; + TMP_Settings.fallbackFontAssets = new List { asset }; + TMP_Settings.defaultSpriteAsset = null; + + EditorUtility.SetDirty(asset); + EditorUtility.SetDirty(TMP_Settings.instance); + AssetDatabase.SaveAssets(); + message = "EmojiFont: built " + AssetPath + " and routed TMP Settings' emoji fallback to it."; + return true; + } +} diff --git a/Assets/Scripts/Editor/EmojiFont.cs.meta b/Assets/Scripts/Editor/EmojiFont.cs.meta new file mode 100644 index 000000000..5888665c0 --- /dev/null +++ b/Assets/Scripts/Editor/EmojiFont.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bd3a902defe23f14fbe821ca9fb26a08 \ No newline at end of file diff --git a/tools/emoji/fetch_emoji_font.py b/tools/emoji/fetch_emoji_font.py new file mode 100644 index 000000000..77e03e6f5 --- /dev/null +++ b/tools/emoji/fetch_emoji_font.py @@ -0,0 +1,122 @@ +"""Build Assets/Fonts/Emoji/Twemoji.ttf from the pinned Twemoji release. + +Run with the venv that has tools/emoji/requirements.txt installed: + py -3 tools/emoji/fetch_emoji_font.py [--cache DIR] [--jobs N] + +Downloads the jdecked/twemoji release source archive (sha256 pinned below), runs nanoemoji +(glyf_colr_0) over its SVGs, and writes the font, the licence text, the single-code-point corpus +the editor smoke reads, and emoji-font.lock. The font is the only artifact Unity consumes; nothing +here is hand-made art. A second run with the same pins must reproduce the font's sha256. +""" +import argparse, hashlib, os, re, shutil, subprocess, sys, tarfile, tempfile, urllib.request +from importlib import metadata +from pathlib import Path + +TWEMOJI_VERSION = "v17.0.3" +TWEMOJI_URL = "https://github.com/jdecked/twemoji/archive/refs/tags/v17.0.3.tar.gz" +TWEMOJI_SHA256 = "a0855654b633045ae2337537e77f1bb4361162f7fcd910e613eaab1d6d9c5fca" +# 2026-06-01T22:21:37Z, the release's publication time: fixes head.created/modified for reproducibility. +SOURCE_DATE_EPOCH = "1780352497" +FAMILY = "Twemoji" + +ROOT = Path(__file__).resolve().parents[2] +FONT_DIR = ROOT / "Assets" / "Fonts" / "Emoji" +SINGLES = ROOT / "tools" / "emoji" / "emoji-singles.txt" + + +def sha256(path): + h = hashlib.sha256() + with open(path, "rb") as f: + for block in iter(lambda: f.read(1 << 20), b""): + h.update(block) + return h.hexdigest() + + +def download(cache): + archive = cache / f"twemoji-{TWEMOJI_VERSION}.tar.gz" + if not archive.exists(): + cache.mkdir(parents=True, exist_ok=True) + urllib.request.urlretrieve(TWEMOJI_URL, archive) + got = sha256(archive) + if got != TWEMOJI_SHA256: + archive.unlink() + sys.exit(f"archive sha256 {got} != pinned {TWEMOJI_SHA256}") + return archive + + +def licence_text(root): + readme = (root / "README.md").read_text(encoding="utf-8") + attribution = re.search(r"## Attribution Requirements\n\n(.*?)\n\n## ", readme, re.S).group(1) + graphics = re.search(r"Graphics licensed under CC-BY 4.0: \S+", readme).group(0) + copyright_lines = [l for l in (root / "LICENSE").read_text(encoding="utf-8").splitlines() if l.startswith("Copyright")] + return ( + f"Twemoji {TWEMOJI_VERSION}: {TWEMOJI_URL}\n" + + "\n".join(copyright_lines) + "\n" + graphics + "\n\n" + "Change notice (CC BY 4.0 section 3(a)(1)(B)): the SVG graphics are converted to a COLRv0 colour\n" + "font (Twemoji.ttf) by tools/emoji/fetch_emoji_font.py using nanoemoji. No artwork is edited.\n\n" + "Attribution Requirements (upstream README)\n\n" + attribution + "\n\n" + "LICENSE-GRAPHICS (upstream, verbatim)\n" + "=======================================================================\n\n" + + (root / "LICENSE-GRAPHICS").read_text(encoding="utf-8") + ) + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--cache", type=Path, default=Path(tempfile.gettempdir()) / "aetheria-emoji-cache") + ap.add_argument("--jobs", type=int, default=max(1, min(4, (os.cpu_count() or 2) // 2))) + args = ap.parse_args() + + archive = download(args.cache) + work = args.cache / f"build-{TWEMOJI_VERSION}" + if work.exists(): + shutil.rmtree(work) + work.mkdir(parents=True) + with tarfile.open(archive) as tar: + tar.extractall(work / "src", filter="data") + src = next((work / "src").iterdir()) + svgs = sorted((src / "assets" / "svg").glob("*.svg")) + + env = dict(os.environ, SOURCE_DATE_EPOCH=SOURCE_DATE_EPOCH) + # nanoemoji shells out to ninja and picosvg by name; they live beside this interpreter. + env["PATH"] = str(Path(sys.executable).parent) + os.pathsep + env["PATH"] + build = work / "build" + # 4000 paths overflow the Windows command line, so the inputs travel in an absl flagfile. + flagfile = work / "inputs.flags" + flagfile.write_text("".join(f"{p.as_posix()}\n" for p in svgs), encoding="utf-8") + run = [sys.executable, "-c", "from nanoemoji.nanoemoji import main; main()", "--color_format", "glyf_colr_0", + "--family", FAMILY, "--output_file", f"{FAMILY}.ttf", "--build_dir", str(build), "--noexec_ninja", + f"--flagfile={flagfile}"] + subprocess.run(run, check=True, env=env, cwd=work) + subprocess.run(["ninja", "-j", str(args.jobs), "-C", str(build)], check=True, env=env) + + FONT_DIR.mkdir(parents=True, exist_ok=True) + out = FONT_DIR / f"{FAMILY}.ttf" + shutil.copyfile(build / f"{FAMILY}.ttf", out) + (FONT_DIR / "LICENSE.txt").write_text(licence_text(src), encoding="utf-8", newline="\n") + + # The smoke's corpus: every single-code-point glyph the pinned release draws. + singles = sorted(p.stem for p in svgs if re.fullmatch(r"[0-9a-f]{4,6}", p.stem)) + SINGLES.write_text("".join(f"{s}\n" for s in singles), encoding="utf-8", newline="\n") + + tools = {n: metadata.version(n) for n in ("nanoemoji", "fonttools", "picosvg", "ninja")} + lock = [ + f"source_url={TWEMOJI_URL}", f"source_version={TWEMOJI_VERSION}", f"source_sha256={TWEMOJI_SHA256}", + f"svg_count={len(svgs)}", f"single_codepoint_count={len(singles)}", + *(f"tool_{n}={v}" for n, v in tools.items()), + f"source_date_epoch={SOURCE_DATE_EPOCH}", "color_format=glyf_colr_0", + f"font_file={out.name}", f"font_sha256={sha256(out)}", f"singles_sha256={sha256(SINGLES)}", + ] + previous = (FONT_DIR / "emoji-font.lock") + if previous.exists(): + old = dict(l.split("=", 1) for l in previous.read_text().splitlines() if "=" in l) + if old.get("font_sha256") != sha256(out): + print(f"NOT REPRODUCED: font_sha256 {sha256(out)} != lock {old.get('font_sha256')}") + else: + print("reproduced: font_sha256 equals the lock") + previous.write_text("\n".join(lock) + "\n", encoding="utf-8", newline="\n") + print("\n".join(lock)) + + +if __name__ == "__main__": + main() diff --git a/tools/emoji/requirements.txt b/tools/emoji/requirements.txt new file mode 100644 index 000000000..955d3e31b --- /dev/null +++ b/tools/emoji/requirements.txt @@ -0,0 +1,23 @@ +# Pinned toolchain for fetch_emoji_font.py (py -3 -m venv, then pip install -r this file). +# nanoemoji is the spec's tool; the rest is its resolved dependency set at 0.16.0. +absl-py==2.5.0 +attrs==26.1.0 +booleanOperations==0.10.0 +cffsubr==0.4.0 +fontMath==0.10.0 +fonttools==4.66.1 +lxml==6.1.3 +nanoemoji==0.16.0 +ninja==1.13.2 +picosvg==0.23.0 +pillow==12.3.0 +pngquant-cli==3.0.3 +pyclipper==1.4.0 +regex==2026.9.29 +resvg-cli==0.44.0 +skia-pathops==0.9.2 +toml==0.10.2 +typing_extensions==4.16.0 +ufo2ft==3.9.1 +ufoLib2==0.19.0 +zopfli==0.4.3 From 1c549325f938d1ad7bdae9f9a0c122754723dbad Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 19:34:49 +0200 Subject: [PATCH 3/7] Generate the Twemoji colour font, build Emoji.asset and route TMP's emoji fallback to it Assets/Fonts/Emoji/Twemoji.ttf is fetch_emoji_font.py's output for jdecked/twemoji v17.0.3 (nanoemoji 0.16.0, glyf_colr_0), reproduced bit-identically by two independent runs on Yggdrasil; the lock pins source and font sha256. EmojiFont.Build wrote Emoji.asset (dynamic, COLOR, multi-atlas) and TMP Settings' emoji fallback list, global fallback entry and empty default sprite asset. EmojiCheck.Run: 1425 single code points and the eight Pirates names render with no missing code point. CC BY 4.0 attribution ships in Assets/Fonts/Emoji/LICENSE.txt. Builds. Co-Authored-By: Claude Opus 5.5 --- Assets/Fonts/Emoji.meta | 8 + Assets/Fonts/Emoji/Emoji.asset | 3 + Assets/Fonts/Emoji/Emoji.asset.meta | 8 + Assets/Fonts/Emoji/LICENSE.txt | 410 +++++ Assets/Fonts/Emoji/LICENSE.txt.meta | 7 + Assets/Fonts/Emoji/Twemoji.ttf | 3 + Assets/Fonts/Emoji/Twemoji.ttf.meta | 21 + Assets/Fonts/Emoji/emoji-font.lock | 14 + Assets/Fonts/Emoji/emoji-font.lock.meta | 7 + Assets/Scripts/Editor/EmojiCheck.cs | 5 +- Assets/Scripts/Editor/EmojiFont.cs | 4 +- .../TextMesh Pro/Resources/TMP Settings.asset | 4 +- tools/emoji/emoji-singles.txt | 1425 +++++++++++++++++ 13 files changed, 1915 insertions(+), 4 deletions(-) create mode 100644 Assets/Fonts/Emoji.meta create mode 100644 Assets/Fonts/Emoji/Emoji.asset create mode 100644 Assets/Fonts/Emoji/Emoji.asset.meta create mode 100644 Assets/Fonts/Emoji/LICENSE.txt create mode 100644 Assets/Fonts/Emoji/LICENSE.txt.meta create mode 100644 Assets/Fonts/Emoji/Twemoji.ttf create mode 100644 Assets/Fonts/Emoji/Twemoji.ttf.meta create mode 100644 Assets/Fonts/Emoji/emoji-font.lock create mode 100644 Assets/Fonts/Emoji/emoji-font.lock.meta create mode 100644 tools/emoji/emoji-singles.txt diff --git a/Assets/Fonts/Emoji.meta b/Assets/Fonts/Emoji.meta new file mode 100644 index 000000000..442fb19cd --- /dev/null +++ b/Assets/Fonts/Emoji.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5e0ef88f85924e146855ca7bb57bbdb6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fonts/Emoji/Emoji.asset b/Assets/Fonts/Emoji/Emoji.asset new file mode 100644 index 000000000..b37478ebd --- /dev/null +++ b/Assets/Fonts/Emoji/Emoji.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0da0ff045c78def703de64f1c79a0f6c0842985e21c261b165ada948dc726b1e +size 5791 diff --git a/Assets/Fonts/Emoji/Emoji.asset.meta b/Assets/Fonts/Emoji/Emoji.asset.meta new file mode 100644 index 000000000..f89bc04be --- /dev/null +++ b/Assets/Fonts/Emoji/Emoji.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4cbb1005dc560d54ba85c3d091dbe30b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fonts/Emoji/LICENSE.txt b/Assets/Fonts/Emoji/LICENSE.txt new file mode 100644 index 000000000..db961e007 --- /dev/null +++ b/Assets/Fonts/Emoji/LICENSE.txt @@ -0,0 +1,410 @@ +Twemoji v17.0.3: https://github.com/jdecked/twemoji/archive/refs/tags/v17.0.3.tar.gz +Copyright (c) 2022–present Jason Sofonia & Justine De Caires +Copyright (c) 2014–2021 Twitter +Graphics licensed under CC-BY 4.0: + +Change notice (CC BY 4.0 section 3(a)(1)(B)): the SVG graphics are converted to a COLRv0 colour +font (Twemoji.ttf) by tools/emoji/fetch_emoji_font.py using nanoemoji. No artwork is edited. + +Attribution Requirements (upstream README) + +As an open source project, attribution is critical from a legal, practical and motivational perspective in our opinion. The graphics are licensed under the CC-BY 4.0 which has a pretty good guide on [best practices for attribution](https://wiki.creativecommons.org/Best_practices_for_attribution). + +However, we consider the guide a bit onerous and as a project, will accept a mention in a project README or an 'About' section or footer on a website. In mobile applications, a common place would be in the Settings/About section (for example, see the mobile Twitter application Settings->About->Legal section). We would consider a mention in the HTML/JS source sufficient also. + +LICENSE-GRAPHICS (upstream, verbatim) +======================================================================= + +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public licenses. +Notwithstanding, Creative Commons may elect to apply one of its public +licenses to material it publishes and in those instances will be +considered the "Licensor." Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the public +licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/Assets/Fonts/Emoji/LICENSE.txt.meta b/Assets/Fonts/Emoji/LICENSE.txt.meta new file mode 100644 index 000000000..8dabd4444 --- /dev/null +++ b/Assets/Fonts/Emoji/LICENSE.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: db23d2e6bc295794888af02d32cbae60 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fonts/Emoji/Twemoji.ttf b/Assets/Fonts/Emoji/Twemoji.ttf new file mode 100644 index 000000000..a9e0584f1 --- /dev/null +++ b/Assets/Fonts/Emoji/Twemoji.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de66290bfa98226e40d8999a3ab024c2242e8d2938f939d9a85c1494844f6aa0 +size 1805808 diff --git a/Assets/Fonts/Emoji/Twemoji.ttf.meta b/Assets/Fonts/Emoji/Twemoji.ttf.meta new file mode 100644 index 000000000..5cc7ab440 --- /dev/null +++ b/Assets/Fonts/Emoji/Twemoji.ttf.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: bde541f3fd3b82b4aa6aa068e4a205a7 +TrueTypeFontImporter: + externalObjects: {} + serializedVersion: 4 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 0 + characterPadding: 1 + includeFontData: 1 + fontNames: + - Aetheria Emoji + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + useLegacyBoundsCalculation: 0 + shouldRoundAdvanceValue: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fonts/Emoji/emoji-font.lock b/Assets/Fonts/Emoji/emoji-font.lock new file mode 100644 index 000000000..de5012a8b --- /dev/null +++ b/Assets/Fonts/Emoji/emoji-font.lock @@ -0,0 +1,14 @@ +source_url=https://github.com/jdecked/twemoji/archive/refs/tags/v17.0.3.tar.gz +source_version=v17.0.3 +source_sha256=a0855654b633045ae2337537e77f1bb4361162f7fcd910e613eaab1d6d9c5fca +svg_count=4009 +single_codepoint_count=1425 +tool_nanoemoji=0.16.0 +tool_fonttools=4.66.1 +tool_picosvg=0.23.0 +tool_ninja=1.13.2 +source_date_epoch=1780352497 +color_format=glyf_colr_0 +font_file=Twemoji.ttf +font_sha256=de66290bfa98226e40d8999a3ab024c2242e8d2938f939d9a85c1494844f6aa0 +singles_sha256=d07a0693cef0530acf540cdeb60d341912f639370e7e30271e90452a8aecdc0d diff --git a/Assets/Fonts/Emoji/emoji-font.lock.meta b/Assets/Fonts/Emoji/emoji-font.lock.meta new file mode 100644 index 000000000..d59e8a3eb --- /dev/null +++ b/Assets/Fonts/Emoji/emoji-font.lock.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6290b5397f6ae1d47a19c6886ebd87e2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Editor/EmojiCheck.cs b/Assets/Scripts/Editor/EmojiCheck.cs index 3623587ce..48afc0018 100644 --- a/Assets/Scripts/Editor/EmojiCheck.cs +++ b/Assets/Scripts/Editor/EmojiCheck.cs @@ -90,8 +90,11 @@ public static class EmojiCheck foreach (var cp in missing.OrderBy(c => c)) failures.Add($"missing code point U+{cp:X4}"); long ink = 0, colour = 0; + int pages = 0, nullPages = 0; foreach (var page in emoji.atlasTextures) { + if (page == null) { nullPages++; continue; } + pages++; var pixels = page.GetPixels32(); ink += pixels.LongCount(p => p.a != 0); colour += pixels.LongCount(p => p.a != 0 && (p.r != p.g || p.g != p.b)); @@ -102,7 +105,7 @@ public static class EmojiCheck // Dynamic atlas content is cache: drop it so this check leaves the asset as Build wrote it. emoji.ClearFontAssetData(true); return $"checked {corpus.Count} single code points + {PiratesNames.Length} Pirates names, {missing.Count} missing, " + - $"{viaEmoji} glyphs via the emoji asset, {viaOther} via other fonts, {blank} blank, {ink} atlas ink pixels of which {colour} coloured"; + $"{viaEmoji} glyphs via the emoji asset, {viaOther} via other fonts, {blank} blank, {ink} atlas ink pixels of which {colour} coloured, {pages} atlas pages ({nullPages} null)"; } static List LoadSingles() diff --git a/Assets/Scripts/Editor/EmojiFont.cs b/Assets/Scripts/Editor/EmojiFont.cs index 855bece3a..c7ce97aaf 100644 --- a/Assets/Scripts/Editor/EmojiFont.cs +++ b/Assets/Scripts/Editor/EmojiFont.cs @@ -57,7 +57,9 @@ public static class EmojiFont asset.material.name = "Emoji Atlas Material"; AssetDatabase.AddObjectToAsset(asset.material, asset); } - else asset.ClearFontAssetData(true); + + // The atlas pages are cache: Build leaves them empty, the same state EmojiCheck restores. + asset.ClearFontAssetData(true); // Text-presentation emoji (U+263A without FE0F) are not routed through the emoji list, so the // asset is also the global fallback. diff --git a/Assets/TextMesh Pro/Resources/TMP Settings.asset b/Assets/TextMesh Pro/Resources/TMP Settings.asset index 769423630..0371c3b56 100644 --- a/Assets/TextMesh Pro/Resources/TMP Settings.asset +++ b/Assets/TextMesh Pro/Resources/TMP Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76affcb169f370013c97b08f1d6d3e092a054a2abf970e164cd40400799552a7 -size 1852 +oid sha256:f00aad0de57d69c610a4a421bf4652e93f45c2a39bacc76dec8a7921bf699ecb +size 1930 diff --git a/tools/emoji/emoji-singles.txt b/tools/emoji/emoji-singles.txt new file mode 100644 index 000000000..09fcc972e --- /dev/null +++ b/tools/emoji/emoji-singles.txt @@ -0,0 +1,1425 @@ +1f004 +1f0cf +1f170 +1f171 +1f17e +1f17f +1f18e +1f191 +1f192 +1f193 +1f194 +1f195 +1f196 +1f197 +1f198 +1f199 +1f19a +1f1e6 +1f1e7 +1f1e8 +1f1e9 +1f1ea +1f1eb +1f1ec +1f1ed +1f1ee +1f1ef +1f1f0 +1f1f1 +1f1f2 +1f1f3 +1f1f4 +1f1f5 +1f1f6 +1f1f7 +1f1f8 +1f1f9 +1f1fa +1f1fb +1f1fc +1f1fd +1f1fe +1f1ff +1f201 +1f202 +1f21a +1f22f +1f232 +1f233 +1f234 +1f235 +1f236 +1f237 +1f238 +1f239 +1f23a +1f250 +1f251 +1f300 +1f301 +1f302 +1f303 +1f304 +1f305 +1f306 +1f307 +1f308 +1f309 +1f30a +1f30b +1f30c +1f30d +1f30e +1f30f +1f310 +1f311 +1f312 +1f313 +1f314 +1f315 +1f316 +1f317 +1f318 +1f319 +1f31a +1f31b +1f31c +1f31d +1f31e +1f31f +1f320 +1f321 +1f324 +1f325 +1f326 +1f327 +1f328 +1f329 +1f32a +1f32b +1f32c +1f32d +1f32e +1f32f +1f330 +1f331 +1f332 +1f333 +1f334 +1f335 +1f336 +1f337 +1f338 +1f339 +1f33a +1f33b +1f33c +1f33d +1f33e +1f33f +1f340 +1f341 +1f342 +1f343 +1f344 +1f345 +1f346 +1f347 +1f348 +1f349 +1f34a +1f34b +1f34c +1f34d +1f34e +1f34f +1f350 +1f351 +1f352 +1f353 +1f354 +1f355 +1f356 +1f357 +1f358 +1f359 +1f35a +1f35b +1f35c +1f35d +1f35e +1f35f +1f360 +1f361 +1f362 +1f363 +1f364 +1f365 +1f366 +1f367 +1f368 +1f369 +1f36a +1f36b +1f36c +1f36d +1f36e +1f36f +1f370 +1f371 +1f372 +1f373 +1f374 +1f375 +1f376 +1f377 +1f378 +1f379 +1f37a +1f37b +1f37c +1f37d +1f37e +1f37f +1f380 +1f381 +1f382 +1f383 +1f384 +1f385 +1f386 +1f387 +1f388 +1f389 +1f38a +1f38b +1f38c +1f38d +1f38e +1f38f +1f390 +1f391 +1f392 +1f393 +1f396 +1f397 +1f399 +1f39a +1f39b +1f39e +1f39f +1f3a0 +1f3a1 +1f3a2 +1f3a3 +1f3a4 +1f3a5 +1f3a6 +1f3a7 +1f3a8 +1f3a9 +1f3aa +1f3ab +1f3ac +1f3ad +1f3ae +1f3af +1f3b0 +1f3b1 +1f3b2 +1f3b3 +1f3b4 +1f3b5 +1f3b6 +1f3b7 +1f3b8 +1f3b9 +1f3ba +1f3bb +1f3bc +1f3bd +1f3be +1f3bf +1f3c0 +1f3c1 +1f3c2 +1f3c3 +1f3c4 +1f3c5 +1f3c6 +1f3c7 +1f3c8 +1f3c9 +1f3ca +1f3cb +1f3cc +1f3cd +1f3ce +1f3cf +1f3d0 +1f3d1 +1f3d2 +1f3d3 +1f3d4 +1f3d5 +1f3d6 +1f3d7 +1f3d8 +1f3d9 +1f3da +1f3db +1f3dc +1f3dd +1f3de +1f3df +1f3e0 +1f3e1 +1f3e2 +1f3e3 +1f3e4 +1f3e5 +1f3e6 +1f3e7 +1f3e8 +1f3e9 +1f3ea +1f3eb +1f3ec +1f3ed +1f3ee +1f3ef +1f3f0 +1f3f3 +1f3f4 +1f3f5 +1f3f7 +1f3f8 +1f3f9 +1f3fa +1f3fb +1f3fc +1f3fd +1f3fe +1f3ff +1f400 +1f401 +1f402 +1f403 +1f404 +1f405 +1f406 +1f407 +1f408 +1f409 +1f40a +1f40b +1f40c +1f40d +1f40e +1f40f +1f410 +1f411 +1f412 +1f413 +1f414 +1f415 +1f416 +1f417 +1f418 +1f419 +1f41a +1f41b +1f41c +1f41d +1f41e +1f41f +1f420 +1f421 +1f422 +1f423 +1f424 +1f425 +1f426 +1f427 +1f428 +1f429 +1f42a +1f42b +1f42c +1f42d +1f42e +1f42f +1f430 +1f431 +1f432 +1f433 +1f434 +1f435 +1f436 +1f437 +1f438 +1f439 +1f43a +1f43b +1f43c +1f43d +1f43e +1f43f +1f440 +1f441 +1f442 +1f443 +1f444 +1f445 +1f446 +1f447 +1f448 +1f449 +1f44a +1f44b +1f44c +1f44d +1f44e +1f44f +1f450 +1f451 +1f452 +1f453 +1f454 +1f455 +1f456 +1f457 +1f458 +1f459 +1f45a +1f45b +1f45c +1f45d +1f45e +1f45f +1f460 +1f461 +1f462 +1f463 +1f464 +1f465 +1f466 +1f467 +1f468 +1f469 +1f46a +1f46b +1f46c +1f46d +1f46e +1f46f +1f470 +1f471 +1f472 +1f473 +1f474 +1f475 +1f476 +1f477 +1f478 +1f479 +1f47a +1f47b +1f47c +1f47d +1f47e +1f47f +1f480 +1f481 +1f482 +1f483 +1f484 +1f485 +1f486 +1f487 +1f488 +1f489 +1f48a +1f48b +1f48c +1f48d +1f48e +1f48f +1f490 +1f491 +1f492 +1f493 +1f494 +1f495 +1f496 +1f497 +1f498 +1f499 +1f49a +1f49b +1f49c +1f49d +1f49e +1f49f +1f4a0 +1f4a1 +1f4a2 +1f4a3 +1f4a4 +1f4a5 +1f4a6 +1f4a7 +1f4a8 +1f4a9 +1f4aa +1f4ab +1f4ac +1f4ad +1f4ae +1f4af +1f4b0 +1f4b1 +1f4b2 +1f4b3 +1f4b4 +1f4b5 +1f4b6 +1f4b7 +1f4b8 +1f4b9 +1f4ba +1f4bb +1f4bc +1f4bd +1f4be +1f4bf +1f4c0 +1f4c1 +1f4c2 +1f4c3 +1f4c4 +1f4c5 +1f4c6 +1f4c7 +1f4c8 +1f4c9 +1f4ca +1f4cb +1f4cc +1f4cd +1f4ce +1f4cf +1f4d0 +1f4d1 +1f4d2 +1f4d3 +1f4d4 +1f4d5 +1f4d6 +1f4d7 +1f4d8 +1f4d9 +1f4da +1f4db +1f4dc +1f4dd +1f4de +1f4df +1f4e0 +1f4e1 +1f4e2 +1f4e3 +1f4e4 +1f4e5 +1f4e6 +1f4e7 +1f4e8 +1f4e9 +1f4ea +1f4eb +1f4ec +1f4ed +1f4ee +1f4ef +1f4f0 +1f4f1 +1f4f2 +1f4f3 +1f4f4 +1f4f5 +1f4f6 +1f4f7 +1f4f8 +1f4f9 +1f4fa +1f4fb +1f4fc +1f4fd +1f4ff +1f500 +1f501 +1f502 +1f503 +1f504 +1f505 +1f506 +1f507 +1f508 +1f509 +1f50a +1f50b +1f50c +1f50d +1f50e +1f50f +1f510 +1f511 +1f512 +1f513 +1f514 +1f515 +1f516 +1f517 +1f518 +1f519 +1f51a +1f51b +1f51c +1f51d +1f51e +1f51f +1f520 +1f521 +1f522 +1f523 +1f524 +1f525 +1f526 +1f527 +1f528 +1f529 +1f52a +1f52b +1f52c +1f52d +1f52e +1f52f +1f530 +1f531 +1f532 +1f533 +1f534 +1f535 +1f536 +1f537 +1f538 +1f539 +1f53a +1f53b +1f53c +1f53d +1f549 +1f54a +1f54b +1f54c +1f54d +1f54e +1f550 +1f551 +1f552 +1f553 +1f554 +1f555 +1f556 +1f557 +1f558 +1f559 +1f55a +1f55b +1f55c +1f55d +1f55e +1f55f +1f560 +1f561 +1f562 +1f563 +1f564 +1f565 +1f566 +1f567 +1f56f +1f570 +1f573 +1f574 +1f575 +1f576 +1f577 +1f578 +1f579 +1f57a +1f587 +1f58a +1f58b +1f58c +1f58d +1f590 +1f595 +1f596 +1f5a4 +1f5a5 +1f5a8 +1f5b1 +1f5b2 +1f5bc +1f5c2 +1f5c3 +1f5c4 +1f5d1 +1f5d2 +1f5d3 +1f5dc +1f5dd +1f5de +1f5e1 +1f5e3 +1f5e8 +1f5ef +1f5f3 +1f5fa +1f5fb +1f5fc +1f5fd +1f5fe +1f5ff +1f600 +1f601 +1f602 +1f603 +1f604 +1f605 +1f606 +1f607 +1f608 +1f609 +1f60a +1f60b +1f60c +1f60d +1f60e +1f60f +1f610 +1f611 +1f612 +1f613 +1f614 +1f615 +1f616 +1f617 +1f618 +1f619 +1f61a +1f61b +1f61c +1f61d +1f61e +1f61f +1f620 +1f621 +1f622 +1f623 +1f624 +1f625 +1f626 +1f627 +1f628 +1f629 +1f62a +1f62b +1f62c +1f62d +1f62e +1f62f +1f630 +1f631 +1f632 +1f633 +1f634 +1f635 +1f636 +1f637 +1f638 +1f639 +1f63a +1f63b +1f63c +1f63d +1f63e +1f63f +1f640 +1f641 +1f642 +1f643 +1f644 +1f645 +1f646 +1f647 +1f648 +1f649 +1f64a +1f64b +1f64c +1f64d +1f64e +1f64f +1f680 +1f681 +1f682 +1f683 +1f684 +1f685 +1f686 +1f687 +1f688 +1f689 +1f68a +1f68b +1f68c +1f68d +1f68e +1f68f +1f690 +1f691 +1f692 +1f693 +1f694 +1f695 +1f696 +1f697 +1f698 +1f699 +1f69a +1f69b +1f69c +1f69d +1f69e +1f69f +1f6a0 +1f6a1 +1f6a2 +1f6a3 +1f6a4 +1f6a5 +1f6a6 +1f6a7 +1f6a8 +1f6a9 +1f6aa +1f6ab +1f6ac +1f6ad +1f6ae +1f6af +1f6b0 +1f6b1 +1f6b2 +1f6b3 +1f6b4 +1f6b5 +1f6b6 +1f6b7 +1f6b8 +1f6b9 +1f6ba +1f6bb +1f6bc +1f6bd +1f6be +1f6bf +1f6c0 +1f6c1 +1f6c2 +1f6c3 +1f6c4 +1f6c5 +1f6cb +1f6cc +1f6cd +1f6ce +1f6cf +1f6d0 +1f6d1 +1f6d2 +1f6d5 +1f6d6 +1f6d7 +1f6d8 +1f6dc +1f6dd +1f6de +1f6df +1f6e0 +1f6e1 +1f6e2 +1f6e3 +1f6e4 +1f6e5 +1f6e9 +1f6eb +1f6ec +1f6f0 +1f6f3 +1f6f4 +1f6f5 +1f6f6 +1f6f7 +1f6f8 +1f6f9 +1f6fa +1f6fb +1f6fc +1f7e0 +1f7e1 +1f7e2 +1f7e3 +1f7e4 +1f7e5 +1f7e6 +1f7e7 +1f7e8 +1f7e9 +1f7ea +1f7eb +1f7f0 +1f90c +1f90d +1f90e +1f90f +1f910 +1f911 +1f912 +1f913 +1f914 +1f915 +1f916 +1f917 +1f918 +1f919 +1f91a +1f91b +1f91c +1f91d +1f91e +1f91f +1f920 +1f921 +1f922 +1f923 +1f924 +1f925 +1f926 +1f927 +1f928 +1f929 +1f92a +1f92b +1f92c +1f92d +1f92e +1f92f +1f930 +1f931 +1f932 +1f933 +1f934 +1f935 +1f936 +1f937 +1f938 +1f939 +1f93a +1f93c +1f93d +1f93e +1f93f +1f940 +1f941 +1f942 +1f943 +1f944 +1f945 +1f947 +1f948 +1f949 +1f94a +1f94b +1f94c +1f94d +1f94e +1f94f +1f950 +1f951 +1f952 +1f953 +1f954 +1f955 +1f956 +1f957 +1f958 +1f959 +1f95a +1f95b +1f95c +1f95d +1f95e +1f95f +1f960 +1f961 +1f962 +1f963 +1f964 +1f965 +1f966 +1f967 +1f968 +1f969 +1f96a +1f96b +1f96c +1f96d +1f96e +1f96f +1f970 +1f971 +1f972 +1f973 +1f974 +1f975 +1f976 +1f977 +1f978 +1f979 +1f97a +1f97b +1f97c +1f97d +1f97e +1f97f +1f980 +1f981 +1f982 +1f983 +1f984 +1f985 +1f986 +1f987 +1f988 +1f989 +1f98a +1f98b +1f98c +1f98d +1f98e +1f98f +1f990 +1f991 +1f992 +1f993 +1f994 +1f995 +1f996 +1f997 +1f998 +1f999 +1f99a +1f99b +1f99c +1f99d +1f99e +1f99f +1f9a0 +1f9a1 +1f9a2 +1f9a3 +1f9a4 +1f9a5 +1f9a6 +1f9a7 +1f9a8 +1f9a9 +1f9aa +1f9ab +1f9ac +1f9ad +1f9ae +1f9af +1f9b0 +1f9b1 +1f9b2 +1f9b3 +1f9b4 +1f9b5 +1f9b6 +1f9b7 +1f9b8 +1f9b9 +1f9ba +1f9bb +1f9bc +1f9bd +1f9be +1f9bf +1f9c0 +1f9c1 +1f9c2 +1f9c3 +1f9c4 +1f9c5 +1f9c6 +1f9c7 +1f9c8 +1f9c9 +1f9ca +1f9cb +1f9cc +1f9cd +1f9ce +1f9cf +1f9d0 +1f9d1 +1f9d2 +1f9d3 +1f9d4 +1f9d5 +1f9d6 +1f9d7 +1f9d8 +1f9d9 +1f9da +1f9db +1f9dc +1f9dd +1f9de +1f9df +1f9e0 +1f9e1 +1f9e2 +1f9e3 +1f9e4 +1f9e5 +1f9e6 +1f9e7 +1f9e8 +1f9e9 +1f9ea +1f9eb +1f9ec +1f9ed +1f9ee +1f9ef +1f9f0 +1f9f1 +1f9f2 +1f9f3 +1f9f4 +1f9f5 +1f9f6 +1f9f7 +1f9f8 +1f9f9 +1f9fa +1f9fb +1f9fc +1f9fd +1f9fe +1f9ff +1fa70 +1fa71 +1fa72 +1fa73 +1fa74 +1fa75 +1fa76 +1fa77 +1fa78 +1fa79 +1fa7a +1fa7b +1fa7c +1fa80 +1fa81 +1fa82 +1fa83 +1fa84 +1fa85 +1fa86 +1fa87 +1fa88 +1fa89 +1fa8a +1fa8e +1fa8f +1fa90 +1fa91 +1fa92 +1fa93 +1fa94 +1fa95 +1fa96 +1fa97 +1fa98 +1fa99 +1fa9a +1fa9b +1fa9c +1fa9d +1fa9e +1fa9f +1faa0 +1faa1 +1faa2 +1faa3 +1faa4 +1faa5 +1faa6 +1faa7 +1faa8 +1faa9 +1faaa +1faab +1faac +1faad +1faae +1faaf +1fab0 +1fab1 +1fab2 +1fab3 +1fab4 +1fab5 +1fab6 +1fab7 +1fab8 +1fab9 +1faba +1fabb +1fabc +1fabd +1fabe +1fabf +1fac0 +1fac1 +1fac2 +1fac3 +1fac4 +1fac5 +1fac6 +1fac8 +1facd +1face +1facf +1fad0 +1fad1 +1fad2 +1fad3 +1fad4 +1fad5 +1fad6 +1fad7 +1fad8 +1fad9 +1fada +1fadb +1fadc +1fadf +1fae0 +1fae1 +1fae2 +1fae3 +1fae4 +1fae5 +1fae6 +1fae7 +1fae8 +1fae9 +1faea +1faef +1faf0 +1faf1 +1faf2 +1faf3 +1faf4 +1faf5 +1faf6 +1faf7 +1faf8 +203c +2049 +2122 +2139 +2194 +2195 +2196 +2197 +2198 +2199 +21a9 +21aa +231a +231b +2328 +23cf +23e9 +23ea +23eb +23ec +23ed +23ee +23ef +23f0 +23f1 +23f2 +23f3 +23f8 +23f9 +23fa +24c2 +25aa +25ab +25b6 +25c0 +25fb +25fc +25fd +25fe +2600 +2601 +2602 +2603 +2604 +260e +2611 +2614 +2615 +2618 +261d +2620 +2622 +2623 +2626 +262a +262e +262f +2638 +2639 +263a +2640 +2642 +2648 +2649 +264a +264b +264c +264d +264e +264f +2650 +2651 +2652 +2653 +265f +2660 +2663 +2665 +2666 +2668 +267b +267e +267f +2692 +2693 +2694 +2695 +2696 +2697 +2699 +269b +269c +26a0 +26a1 +26a7 +26aa +26ab +26b0 +26b1 +26bd +26be +26c4 +26c5 +26c8 +26ce +26cf +26d1 +26d3 +26d4 +26e9 +26ea +26f0 +26f1 +26f2 +26f3 +26f4 +26f5 +26f7 +26f8 +26f9 +26fa +26fd +2702 +2705 +2708 +2709 +270a +270b +270c +270d +270f +2712 +2714 +2716 +271d +2721 +2728 +2733 +2734 +2744 +2747 +274c +274e +2753 +2754 +2755 +2757 +2763 +2764 +2795 +2796 +2797 +27a1 +27b0 +27bf +2934 +2935 +2b05 +2b06 +2b07 +2b1b +2b1c +2b50 +2b55 +3030 +303d +3297 +3299 +e50a From 851476bc23778093b279132e69bd1a2c2e2e39e4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 22:05:09 +0200 Subject: [PATCH 4/7] Emoji font script: pin Unicode emoji-test.txt, refuse outside the pinned container The corpus now derives from emoji-test.txt (sha256 pinned), keeps single code points of any digit count, and lists the emoji Twemoji lacks. The script runs only on linux, Python 3.13, image python:3.13-slim and records those in the lock; identical pins with a different font exit 1 and leave the committed font and lock untouched. Co-Authored-By: Claude Sonnet 5.5 --- tools/emoji/fetch_emoji_font.py | 120 +++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 33 deletions(-) diff --git a/tools/emoji/fetch_emoji_font.py b/tools/emoji/fetch_emoji_font.py index 77e03e6f5..901709c4f 100644 --- a/tools/emoji/fetch_emoji_font.py +++ b/tools/emoji/fetch_emoji_font.py @@ -1,14 +1,19 @@ """Build Assets/Fonts/Emoji/Twemoji.ttf from the pinned Twemoji release. -Run with the venv that has tools/emoji/requirements.txt installed: - py -3 tools/emoji/fetch_emoji_font.py [--cache DIR] [--jobs N] +The font reproduces ONLY inside the pinned Linux container (PINNED_IMAGE, Python PINNED_PYTHON); on any +other platform the script refuses to run and writes nothing. It does not run under `py -3` on Windows. +Run it on Yggdrasil (or any docker host) from the repository root: + docker run --rm -e EMOJI_FONT_IMAGE=python:3.13-slim -v "$PWD":/src -w /src python:3.13-slim sh -c \\ + "pip install -r tools/emoji/requirements.txt && python tools/emoji/fetch_emoji_font.py [--jobs N]" -Downloads the jdecked/twemoji release source archive (sha256 pinned below), runs nanoemoji -(glyf_colr_0) over its SVGs, and writes the font, the licence text, the single-code-point corpus -the editor smoke reads, and emoji-font.lock. The font is the only artifact Unity consumes; nothing -here is hand-made art. A second run with the same pins must reproduce the font's sha256. +Downloads the jdecked/twemoji release source archive and Unicode's emoji-test.txt (both sha256 pinned +below), runs nanoemoji (glyf_colr_0) over the SVGs, and writes the font, the licence text, the smoke's +corpus (emoji-singles.txt, from emoji-test.txt), the list of emoji Twemoji lacks (emoji-unsupported.txt) +and emoji-font.lock. The font is the only artifact Unity consumes; nothing here is hand-made art. +A run whose font-determining pins match the lock must reproduce the font's sha256, or the script exits 1 +and leaves the committed font and lock untouched; the lock never follows the machine. """ -import argparse, hashlib, os, re, shutil, subprocess, sys, tarfile, tempfile, urllib.request +import argparse, hashlib, os, platform, re, shutil, subprocess, sys, tarfile, tempfile, urllib.request from importlib import metadata from pathlib import Path @@ -18,10 +23,20 @@ TWEMOJI_SHA256 = "a0855654b633045ae2337537e77f1bb4361162f7fcd910e613eaab1d6d9c5f # 2026-06-01T22:21:37Z, the release's publication time: fixes head.created/modified for reproducibility. SOURCE_DATE_EPOCH = "1780352497" FAMILY = "Twemoji" +# Unicode's emoji-test.txt for the Emoji version Twemoji v17.0.3 targets: the smoke's corpus. +EMOJI_TEST_VERSION = "17.0" +EMOJI_TEST_URL = "https://unicode.org/Public/17.0.0/emoji/emoji-test.txt" +EMOJI_TEST_SHA256 = "1d8a944f88d7952f7ef7c5167fef3c67995bcae24543949710231b03a201acda" +# The one environment the font reproduces in. The docker command passes the image tag in; a container +# cannot read its own image name. +PINNED_PLATFORM = "linux" +PINNED_PYTHON = "3.13" +PINNED_IMAGE = "python:3.13-slim" ROOT = Path(__file__).resolve().parents[2] FONT_DIR = ROOT / "Assets" / "Fonts" / "Emoji" SINGLES = ROOT / "tools" / "emoji" / "emoji-singles.txt" +UNSUPPORTED = ROOT / "tools" / "emoji" / "emoji-unsupported.txt" def sha256(path): @@ -32,16 +47,36 @@ def sha256(path): return h.hexdigest() -def download(cache): - archive = cache / f"twemoji-{TWEMOJI_VERSION}.tar.gz" - if not archive.exists(): +def download(cache, url, name, pinned): + path = cache / name + if not path.exists(): cache.mkdir(parents=True, exist_ok=True) - urllib.request.urlretrieve(TWEMOJI_URL, archive) - got = sha256(archive) - if got != TWEMOJI_SHA256: - archive.unlink() - sys.exit(f"archive sha256 {got} != pinned {TWEMOJI_SHA256}") - return archive + urllib.request.urlretrieve(url, path) + got = sha256(path) + if got != pinned: + path.unlink() + sys.exit(f"{name} sha256 {got} != pinned {pinned}") + return path + + +def single_code_points(emoji_test): + """Every emoji of the Emoji version that is one code point, bare or with its FE0F presentation + selector (so (c) and (r) are in), of any qualification status including components.""" + found = set() + for line in emoji_test.read_text(encoding="utf-8").splitlines(): + if not line or line.startswith("#"): + continue + points = [int(p, 16) for p in line.split(";", 1)[0].split() if int(p, 16) != 0xFE0F] + if len(points) == 1: + found.add(points[0]) + return sorted(found) + + +def refuse_unless_pinned_environment(): + here = (sys.platform, f"{sys.version_info.major}.{sys.version_info.minor}", os.environ.get("EMOJI_FONT_IMAGE")) + if here != (PINNED_PLATFORM, PINNED_PYTHON, PINNED_IMAGE): + sys.exit(f"refusing to run: the font reproduces only on {PINNED_PLATFORM}, Python {PINNED_PYTHON}, image " + f"{PINNED_IMAGE} (EMOJI_FONT_IMAGE); this is {here}. Nothing was written.") def licence_text(root): @@ -66,8 +101,10 @@ def main(): ap.add_argument("--cache", type=Path, default=Path(tempfile.gettempdir()) / "aetheria-emoji-cache") ap.add_argument("--jobs", type=int, default=max(1, min(4, (os.cpu_count() or 2) // 2))) args = ap.parse_args() + refuse_unless_pinned_environment() - archive = download(args.cache) + archive = download(args.cache, TWEMOJI_URL, f"twemoji-{TWEMOJI_VERSION}.tar.gz", TWEMOJI_SHA256) + emoji_test = download(args.cache, EMOJI_TEST_URL, f"emoji-test-{EMOJI_TEST_VERSION}.txt", EMOJI_TEST_SHA256) work = args.cache / f"build-{TWEMOJI_VERSION}" if work.exists(): shutil.rmtree(work) @@ -90,31 +127,48 @@ def main(): subprocess.run(run, check=True, env=env, cwd=work) subprocess.run(["ninja", "-j", str(args.jobs), "-C", str(build)], check=True, env=env) + built = build / f"{FAMILY}.ttf" + font_sha = sha256(built) + tools = {n: metadata.version(n) for n in ("nanoemoji", "fonttools", "picosvg", "ninja")} + font_pins = { + "source_sha256": TWEMOJI_SHA256, **{f"tool_{n}": v for n, v in tools.items()}, + "source_date_epoch": SOURCE_DATE_EPOCH, "color_format": "glyf_colr_0", + "python_version": platform.python_version(), "platform": PINNED_PLATFORM, "container_image": PINNED_IMAGE, + } + lock_path = FONT_DIR / "emoji-font.lock" + old = dict(l.split("=", 1) for l in lock_path.read_text().splitlines() if "=" in l) if lock_path.exists() else {} + if old and all(old.get(k) == v for k, v in font_pins.items()): + if old.get("font_sha256") != font_sha: + sys.exit(f"NOT REPRODUCED: font_sha256 {font_sha} != lock {old.get('font_sha256')} with identical pins. " + "Nothing was written.") + print("reproduced: font_sha256 equals the lock") + + # The smoke's corpus is Unicode's list of single-code-point emoji, not the supplier's file names; + # what Twemoji does not draw is reported, not hidden. + drawn = {int(p.stem, 16) for p in svgs if re.fullmatch(r"[0-9a-f]+", p.stem)} + singles = single_code_points(emoji_test) + unsupported = [cp for cp in singles if cp not in drawn] + FONT_DIR.mkdir(parents=True, exist_ok=True) out = FONT_DIR / f"{FAMILY}.ttf" - shutil.copyfile(build / f"{FAMILY}.ttf", out) + shutil.copyfile(built, out) (FONT_DIR / "LICENSE.txt").write_text(licence_text(src), encoding="utf-8", newline="\n") + SINGLES.write_text("".join(f"{cp:X}\n" for cp in singles), encoding="utf-8", newline="\n") + UNSUPPORTED.write_text("".join(f"{cp:X}\n" for cp in unsupported), encoding="utf-8", newline="\n") + print(f"Twemoji lacks {len(unsupported)} of {len(singles)} single-code-point emoji: " + + " ".join(f"U+{cp:04X}" for cp in unsupported)) - # The smoke's corpus: every single-code-point glyph the pinned release draws. - singles = sorted(p.stem for p in svgs if re.fullmatch(r"[0-9a-f]{4,6}", p.stem)) - SINGLES.write_text("".join(f"{s}\n" for s in singles), encoding="utf-8", newline="\n") - - tools = {n: metadata.version(n) for n in ("nanoemoji", "fonttools", "picosvg", "ninja")} lock = [ f"source_url={TWEMOJI_URL}", f"source_version={TWEMOJI_VERSION}", f"source_sha256={TWEMOJI_SHA256}", - f"svg_count={len(svgs)}", f"single_codepoint_count={len(singles)}", + f"emoji_test_version={EMOJI_TEST_VERSION}", f"emoji_test_url={EMOJI_TEST_URL}", f"emoji_test_sha256={EMOJI_TEST_SHA256}", + f"svg_count={len(svgs)}", f"single_codepoint_count={len(singles)}", f"unsupported_count={len(unsupported)}", *(f"tool_{n}={v}" for n, v in tools.items()), f"source_date_epoch={SOURCE_DATE_EPOCH}", "color_format=glyf_colr_0", - f"font_file={out.name}", f"font_sha256={sha256(out)}", f"singles_sha256={sha256(SINGLES)}", + f"python_version={font_pins['python_version']}", f"platform={PINNED_PLATFORM}", f"container_image={PINNED_IMAGE}", + f"font_file={out.name}", f"font_sha256={font_sha}", + f"singles_sha256={sha256(SINGLES)}", f"unsupported_sha256={sha256(UNSUPPORTED)}", ] - previous = (FONT_DIR / "emoji-font.lock") - if previous.exists(): - old = dict(l.split("=", 1) for l in previous.read_text().splitlines() if "=" in l) - if old.get("font_sha256") != sha256(out): - print(f"NOT REPRODUCED: font_sha256 {sha256(out)} != lock {old.get('font_sha256')}") - else: - print("reproduced: font_sha256 equals the lock") - previous.write_text("\n".join(lock) + "\n", encoding="utf-8", newline="\n") + lock_path.write_text("\n".join(lock) + "\n", encoding="utf-8", newline="\n") print("\n".join(lock)) From 8e73b5427171bb52f0350fea0a0c4f7109fdb0b9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 22:45:46 +0200 Subject: [PATCH 5/7] README: Twemoji CC BY 4.0 attribution Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5136180f9..79f0033f2 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ Client-Server communication is implemented using [LiteNetLib](https://github.com Game content lives in `GameData/Aetheria.cc`, a [CultCache](https://github.com/GameCult/CultLib) store that is read-only at runtime. Run state and player state (settings and bindings) live in their own `.cc` stores in the same cache. Persistent data types carry MessagePack attributes; some also carry [JSON.Net](https://www.newtonsoft.com/json) attributes. +Emoji are drawn from [Twemoji](https://github.com/jdecked/twemoji) v17.0.3, converted to a colour font (`Assets/Fonts/Emoji/Twemoji.ttf`, built by `tools/emoji/fetch_emoji_font.py`; the artwork itself is not edited). Copyright (c) 2022–present Jason Sofonia & Justine De Caires; copyright (c) 2014–2021 Twitter. The graphics are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); the full notice is `Assets/Fonts/Emoji/LICENSE.txt`. + ### Programming Paradigms The codebase makes heavy use of C#'s [Language Integrated Queries (LINQ)](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/), allowing for the concise representation of operations that modify or filter collections (though they do generate some garbage so must be avoided within the update loop). Asynchronous stream processing is often performed using the [functional reactive programming](http://reactivex.io/) paradigm, which is achieved using [Microsoft's Reactive Extensions](https://github.com/dotnet/reactive) on the server and [Reactive Extensions for Unity](https://github.com/neuecc/UniRx). Combining Observables with LINQ allows for extremely powerful expressions of the programmer's intent. From 8d2b18bb178bab7ed446cdc5d206503df3199e97 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 22:45:48 +0200 Subject: [PATCH 6/7] Emoji corpus from Unicode's emoji-test.txt; lock records interpreter and container 1400 single code points (the 2 and 3 digit ones included), Twemoji lacks none; font sha256 unchanged (reproduced in python:3.13-slim on Yggdrasil). Co-Authored-By: Claude Sonnet 5.5 --- Assets/Fonts/Emoji/emoji-font.lock | 12 +- tools/emoji/emoji-singles.txt | 2681 ++++++++++++++-------------- tools/emoji/emoji-unsupported.txt | 0 3 files changed, 1338 insertions(+), 1355 deletions(-) create mode 100644 tools/emoji/emoji-unsupported.txt diff --git a/Assets/Fonts/Emoji/emoji-font.lock b/Assets/Fonts/Emoji/emoji-font.lock index de5012a8b..f05a93bf9 100644 --- a/Assets/Fonts/Emoji/emoji-font.lock +++ b/Assets/Fonts/Emoji/emoji-font.lock @@ -1,14 +1,22 @@ source_url=https://github.com/jdecked/twemoji/archive/refs/tags/v17.0.3.tar.gz source_version=v17.0.3 source_sha256=a0855654b633045ae2337537e77f1bb4361162f7fcd910e613eaab1d6d9c5fca +emoji_test_version=17.0 +emoji_test_url=https://unicode.org/Public/17.0.0/emoji/emoji-test.txt +emoji_test_sha256=1d8a944f88d7952f7ef7c5167fef3c67995bcae24543949710231b03a201acda svg_count=4009 -single_codepoint_count=1425 +single_codepoint_count=1400 +unsupported_count=0 tool_nanoemoji=0.16.0 tool_fonttools=4.66.1 tool_picosvg=0.23.0 tool_ninja=1.13.2 source_date_epoch=1780352497 color_format=glyf_colr_0 +python_version=3.13.15 +platform=linux +container_image=python:3.13-slim font_file=Twemoji.ttf font_sha256=de66290bfa98226e40d8999a3ab024c2242e8d2938f939d9a85c1494844f6aa0 -singles_sha256=d07a0693cef0530acf540cdeb60d341912f639370e7e30271e90452a8aecdc0d +singles_sha256=7ad887a16ef5386df040e1e8988e9bdc55ae5cab461ffc9df4613d0cb5770b4e +unsupported_sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 diff --git a/tools/emoji/emoji-singles.txt b/tools/emoji/emoji-singles.txt index 09fcc972e..f3901bb01 100644 --- a/tools/emoji/emoji-singles.txt +++ b/tools/emoji/emoji-singles.txt @@ -1,1260 +1,6 @@ -1f004 -1f0cf -1f170 -1f171 -1f17e -1f17f -1f18e -1f191 -1f192 -1f193 -1f194 -1f195 -1f196 -1f197 -1f198 -1f199 -1f19a -1f1e6 -1f1e7 -1f1e8 -1f1e9 -1f1ea -1f1eb -1f1ec -1f1ed -1f1ee -1f1ef -1f1f0 -1f1f1 -1f1f2 -1f1f3 -1f1f4 -1f1f5 -1f1f6 -1f1f7 -1f1f8 -1f1f9 -1f1fa -1f1fb -1f1fc -1f1fd -1f1fe -1f1ff -1f201 -1f202 -1f21a -1f22f -1f232 -1f233 -1f234 -1f235 -1f236 -1f237 -1f238 -1f239 -1f23a -1f250 -1f251 -1f300 -1f301 -1f302 -1f303 -1f304 -1f305 -1f306 -1f307 -1f308 -1f309 -1f30a -1f30b -1f30c -1f30d -1f30e -1f30f -1f310 -1f311 -1f312 -1f313 -1f314 -1f315 -1f316 -1f317 -1f318 -1f319 -1f31a -1f31b -1f31c -1f31d -1f31e -1f31f -1f320 -1f321 -1f324 -1f325 -1f326 -1f327 -1f328 -1f329 -1f32a -1f32b -1f32c -1f32d -1f32e -1f32f -1f330 -1f331 -1f332 -1f333 -1f334 -1f335 -1f336 -1f337 -1f338 -1f339 -1f33a -1f33b -1f33c -1f33d -1f33e -1f33f -1f340 -1f341 -1f342 -1f343 -1f344 -1f345 -1f346 -1f347 -1f348 -1f349 -1f34a -1f34b -1f34c -1f34d -1f34e -1f34f -1f350 -1f351 -1f352 -1f353 -1f354 -1f355 -1f356 -1f357 -1f358 -1f359 -1f35a -1f35b -1f35c -1f35d -1f35e -1f35f -1f360 -1f361 -1f362 -1f363 -1f364 -1f365 -1f366 -1f367 -1f368 -1f369 -1f36a -1f36b -1f36c -1f36d -1f36e -1f36f -1f370 -1f371 -1f372 -1f373 -1f374 -1f375 -1f376 -1f377 -1f378 -1f379 -1f37a -1f37b -1f37c -1f37d -1f37e -1f37f -1f380 -1f381 -1f382 -1f383 -1f384 -1f385 -1f386 -1f387 -1f388 -1f389 -1f38a -1f38b -1f38c -1f38d -1f38e -1f38f -1f390 -1f391 -1f392 -1f393 -1f396 -1f397 -1f399 -1f39a -1f39b -1f39e -1f39f -1f3a0 -1f3a1 -1f3a2 -1f3a3 -1f3a4 -1f3a5 -1f3a6 -1f3a7 -1f3a8 -1f3a9 -1f3aa -1f3ab -1f3ac -1f3ad -1f3ae -1f3af -1f3b0 -1f3b1 -1f3b2 -1f3b3 -1f3b4 -1f3b5 -1f3b6 -1f3b7 -1f3b8 -1f3b9 -1f3ba -1f3bb -1f3bc -1f3bd -1f3be -1f3bf -1f3c0 -1f3c1 -1f3c2 -1f3c3 -1f3c4 -1f3c5 -1f3c6 -1f3c7 -1f3c8 -1f3c9 -1f3ca -1f3cb -1f3cc -1f3cd -1f3ce -1f3cf -1f3d0 -1f3d1 -1f3d2 -1f3d3 -1f3d4 -1f3d5 -1f3d6 -1f3d7 -1f3d8 -1f3d9 -1f3da -1f3db -1f3dc -1f3dd -1f3de -1f3df -1f3e0 -1f3e1 -1f3e2 -1f3e3 -1f3e4 -1f3e5 -1f3e6 -1f3e7 -1f3e8 -1f3e9 -1f3ea -1f3eb -1f3ec -1f3ed -1f3ee -1f3ef -1f3f0 -1f3f3 -1f3f4 -1f3f5 -1f3f7 -1f3f8 -1f3f9 -1f3fa -1f3fb -1f3fc -1f3fd -1f3fe -1f3ff -1f400 -1f401 -1f402 -1f403 -1f404 -1f405 -1f406 -1f407 -1f408 -1f409 -1f40a -1f40b -1f40c -1f40d -1f40e -1f40f -1f410 -1f411 -1f412 -1f413 -1f414 -1f415 -1f416 -1f417 -1f418 -1f419 -1f41a -1f41b -1f41c -1f41d -1f41e -1f41f -1f420 -1f421 -1f422 -1f423 -1f424 -1f425 -1f426 -1f427 -1f428 -1f429 -1f42a -1f42b -1f42c -1f42d -1f42e -1f42f -1f430 -1f431 -1f432 -1f433 -1f434 -1f435 -1f436 -1f437 -1f438 -1f439 -1f43a -1f43b -1f43c -1f43d -1f43e -1f43f -1f440 -1f441 -1f442 -1f443 -1f444 -1f445 -1f446 -1f447 -1f448 -1f449 -1f44a -1f44b -1f44c -1f44d -1f44e -1f44f -1f450 -1f451 -1f452 -1f453 -1f454 -1f455 -1f456 -1f457 -1f458 -1f459 -1f45a -1f45b -1f45c -1f45d -1f45e -1f45f -1f460 -1f461 -1f462 -1f463 -1f464 -1f465 -1f466 -1f467 -1f468 -1f469 -1f46a -1f46b -1f46c -1f46d -1f46e -1f46f -1f470 -1f471 -1f472 -1f473 -1f474 -1f475 -1f476 -1f477 -1f478 -1f479 -1f47a -1f47b -1f47c -1f47d -1f47e -1f47f -1f480 -1f481 -1f482 -1f483 -1f484 -1f485 -1f486 -1f487 -1f488 -1f489 -1f48a -1f48b -1f48c -1f48d -1f48e -1f48f -1f490 -1f491 -1f492 -1f493 -1f494 -1f495 -1f496 -1f497 -1f498 -1f499 -1f49a -1f49b -1f49c -1f49d -1f49e -1f49f -1f4a0 -1f4a1 -1f4a2 -1f4a3 -1f4a4 -1f4a5 -1f4a6 -1f4a7 -1f4a8 -1f4a9 -1f4aa -1f4ab -1f4ac -1f4ad -1f4ae -1f4af -1f4b0 -1f4b1 -1f4b2 -1f4b3 -1f4b4 -1f4b5 -1f4b6 -1f4b7 -1f4b8 -1f4b9 -1f4ba -1f4bb -1f4bc -1f4bd -1f4be -1f4bf -1f4c0 -1f4c1 -1f4c2 -1f4c3 -1f4c4 -1f4c5 -1f4c6 -1f4c7 -1f4c8 -1f4c9 -1f4ca -1f4cb -1f4cc -1f4cd -1f4ce -1f4cf -1f4d0 -1f4d1 -1f4d2 -1f4d3 -1f4d4 -1f4d5 -1f4d6 -1f4d7 -1f4d8 -1f4d9 -1f4da -1f4db -1f4dc -1f4dd -1f4de -1f4df -1f4e0 -1f4e1 -1f4e2 -1f4e3 -1f4e4 -1f4e5 -1f4e6 -1f4e7 -1f4e8 -1f4e9 -1f4ea -1f4eb -1f4ec -1f4ed -1f4ee -1f4ef -1f4f0 -1f4f1 -1f4f2 -1f4f3 -1f4f4 -1f4f5 -1f4f6 -1f4f7 -1f4f8 -1f4f9 -1f4fa -1f4fb -1f4fc -1f4fd -1f4ff -1f500 -1f501 -1f502 -1f503 -1f504 -1f505 -1f506 -1f507 -1f508 -1f509 -1f50a -1f50b -1f50c -1f50d -1f50e -1f50f -1f510 -1f511 -1f512 -1f513 -1f514 -1f515 -1f516 -1f517 -1f518 -1f519 -1f51a -1f51b -1f51c -1f51d -1f51e -1f51f -1f520 -1f521 -1f522 -1f523 -1f524 -1f525 -1f526 -1f527 -1f528 -1f529 -1f52a -1f52b -1f52c -1f52d -1f52e -1f52f -1f530 -1f531 -1f532 -1f533 -1f534 -1f535 -1f536 -1f537 -1f538 -1f539 -1f53a -1f53b -1f53c -1f53d -1f549 -1f54a -1f54b -1f54c -1f54d -1f54e -1f550 -1f551 -1f552 -1f553 -1f554 -1f555 -1f556 -1f557 -1f558 -1f559 -1f55a -1f55b -1f55c -1f55d -1f55e -1f55f -1f560 -1f561 -1f562 -1f563 -1f564 -1f565 -1f566 -1f567 -1f56f -1f570 -1f573 -1f574 -1f575 -1f576 -1f577 -1f578 -1f579 -1f57a -1f587 -1f58a -1f58b -1f58c -1f58d -1f590 -1f595 -1f596 -1f5a4 -1f5a5 -1f5a8 -1f5b1 -1f5b2 -1f5bc -1f5c2 -1f5c3 -1f5c4 -1f5d1 -1f5d2 -1f5d3 -1f5dc -1f5dd -1f5de -1f5e1 -1f5e3 -1f5e8 -1f5ef -1f5f3 -1f5fa -1f5fb -1f5fc -1f5fd -1f5fe -1f5ff -1f600 -1f601 -1f602 -1f603 -1f604 -1f605 -1f606 -1f607 -1f608 -1f609 -1f60a -1f60b -1f60c -1f60d -1f60e -1f60f -1f610 -1f611 -1f612 -1f613 -1f614 -1f615 -1f616 -1f617 -1f618 -1f619 -1f61a -1f61b -1f61c -1f61d -1f61e -1f61f -1f620 -1f621 -1f622 -1f623 -1f624 -1f625 -1f626 -1f627 -1f628 -1f629 -1f62a -1f62b -1f62c -1f62d -1f62e -1f62f -1f630 -1f631 -1f632 -1f633 -1f634 -1f635 -1f636 -1f637 -1f638 -1f639 -1f63a -1f63b -1f63c -1f63d -1f63e -1f63f -1f640 -1f641 -1f642 -1f643 -1f644 -1f645 -1f646 -1f647 -1f648 -1f649 -1f64a -1f64b -1f64c -1f64d -1f64e -1f64f -1f680 -1f681 -1f682 -1f683 -1f684 -1f685 -1f686 -1f687 -1f688 -1f689 -1f68a -1f68b -1f68c -1f68d -1f68e -1f68f -1f690 -1f691 -1f692 -1f693 -1f694 -1f695 -1f696 -1f697 -1f698 -1f699 -1f69a -1f69b -1f69c -1f69d -1f69e -1f69f -1f6a0 -1f6a1 -1f6a2 -1f6a3 -1f6a4 -1f6a5 -1f6a6 -1f6a7 -1f6a8 -1f6a9 -1f6aa -1f6ab -1f6ac -1f6ad -1f6ae -1f6af -1f6b0 -1f6b1 -1f6b2 -1f6b3 -1f6b4 -1f6b5 -1f6b6 -1f6b7 -1f6b8 -1f6b9 -1f6ba -1f6bb -1f6bc -1f6bd -1f6be -1f6bf -1f6c0 -1f6c1 -1f6c2 -1f6c3 -1f6c4 -1f6c5 -1f6cb -1f6cc -1f6cd -1f6ce -1f6cf -1f6d0 -1f6d1 -1f6d2 -1f6d5 -1f6d6 -1f6d7 -1f6d8 -1f6dc -1f6dd -1f6de -1f6df -1f6e0 -1f6e1 -1f6e2 -1f6e3 -1f6e4 -1f6e5 -1f6e9 -1f6eb -1f6ec -1f6f0 -1f6f3 -1f6f4 -1f6f5 -1f6f6 -1f6f7 -1f6f8 -1f6f9 -1f6fa -1f6fb -1f6fc -1f7e0 -1f7e1 -1f7e2 -1f7e3 -1f7e4 -1f7e5 -1f7e6 -1f7e7 -1f7e8 -1f7e9 -1f7ea -1f7eb -1f7f0 -1f90c -1f90d -1f90e -1f90f -1f910 -1f911 -1f912 -1f913 -1f914 -1f915 -1f916 -1f917 -1f918 -1f919 -1f91a -1f91b -1f91c -1f91d -1f91e -1f91f -1f920 -1f921 -1f922 -1f923 -1f924 -1f925 -1f926 -1f927 -1f928 -1f929 -1f92a -1f92b -1f92c -1f92d -1f92e -1f92f -1f930 -1f931 -1f932 -1f933 -1f934 -1f935 -1f936 -1f937 -1f938 -1f939 -1f93a -1f93c -1f93d -1f93e -1f93f -1f940 -1f941 -1f942 -1f943 -1f944 -1f945 -1f947 -1f948 -1f949 -1f94a -1f94b -1f94c -1f94d -1f94e -1f94f -1f950 -1f951 -1f952 -1f953 -1f954 -1f955 -1f956 -1f957 -1f958 -1f959 -1f95a -1f95b -1f95c -1f95d -1f95e -1f95f -1f960 -1f961 -1f962 -1f963 -1f964 -1f965 -1f966 -1f967 -1f968 -1f969 -1f96a -1f96b -1f96c -1f96d -1f96e -1f96f -1f970 -1f971 -1f972 -1f973 -1f974 -1f975 -1f976 -1f977 -1f978 -1f979 -1f97a -1f97b -1f97c -1f97d -1f97e -1f97f -1f980 -1f981 -1f982 -1f983 -1f984 -1f985 -1f986 -1f987 -1f988 -1f989 -1f98a -1f98b -1f98c -1f98d -1f98e -1f98f -1f990 -1f991 -1f992 -1f993 -1f994 -1f995 -1f996 -1f997 -1f998 -1f999 -1f99a -1f99b -1f99c -1f99d -1f99e -1f99f -1f9a0 -1f9a1 -1f9a2 -1f9a3 -1f9a4 -1f9a5 -1f9a6 -1f9a7 -1f9a8 -1f9a9 -1f9aa -1f9ab -1f9ac -1f9ad -1f9ae -1f9af -1f9b0 -1f9b1 -1f9b2 -1f9b3 -1f9b4 -1f9b5 -1f9b6 -1f9b7 -1f9b8 -1f9b9 -1f9ba -1f9bb -1f9bc -1f9bd -1f9be -1f9bf -1f9c0 -1f9c1 -1f9c2 -1f9c3 -1f9c4 -1f9c5 -1f9c6 -1f9c7 -1f9c8 -1f9c9 -1f9ca -1f9cb -1f9cc -1f9cd -1f9ce -1f9cf -1f9d0 -1f9d1 -1f9d2 -1f9d3 -1f9d4 -1f9d5 -1f9d6 -1f9d7 -1f9d8 -1f9d9 -1f9da -1f9db -1f9dc -1f9dd -1f9de -1f9df -1f9e0 -1f9e1 -1f9e2 -1f9e3 -1f9e4 -1f9e5 -1f9e6 -1f9e7 -1f9e8 -1f9e9 -1f9ea -1f9eb -1f9ec -1f9ed -1f9ee -1f9ef -1f9f0 -1f9f1 -1f9f2 -1f9f3 -1f9f4 -1f9f5 -1f9f6 -1f9f7 -1f9f8 -1f9f9 -1f9fa -1f9fb -1f9fc -1f9fd -1f9fe -1f9ff -1fa70 -1fa71 -1fa72 -1fa73 -1fa74 -1fa75 -1fa76 -1fa77 -1fa78 -1fa79 -1fa7a -1fa7b -1fa7c -1fa80 -1fa81 -1fa82 -1fa83 -1fa84 -1fa85 -1fa86 -1fa87 -1fa88 -1fa89 -1fa8a -1fa8e -1fa8f -1fa90 -1fa91 -1fa92 -1fa93 -1fa94 -1fa95 -1fa96 -1fa97 -1fa98 -1fa99 -1fa9a -1fa9b -1fa9c -1fa9d -1fa9e -1fa9f -1faa0 -1faa1 -1faa2 -1faa3 -1faa4 -1faa5 -1faa6 -1faa7 -1faa8 -1faa9 -1faaa -1faab -1faac -1faad -1faae -1faaf -1fab0 -1fab1 -1fab2 -1fab3 -1fab4 -1fab5 -1fab6 -1fab7 -1fab8 -1fab9 -1faba -1fabb -1fabc -1fabd -1fabe -1fabf -1fac0 -1fac1 -1fac2 -1fac3 -1fac4 -1fac5 -1fac6 -1fac8 -1facd -1face -1facf -1fad0 -1fad1 -1fad2 -1fad3 -1fad4 -1fad5 -1fad6 -1fad7 -1fad8 -1fad9 -1fada -1fadb -1fadc -1fadf -1fae0 -1fae1 -1fae2 -1fae3 -1fae4 -1fae5 -1fae6 -1fae7 -1fae8 -1fae9 -1faea -1faef -1faf0 -1faf1 -1faf2 -1faf3 -1faf4 -1faf5 -1faf6 -1faf7 -1faf8 -203c +A9 +AE +203C 2049 2122 2139 @@ -1264,79 +10,79 @@ 2197 2198 2199 -21a9 -21aa -231a -231b +21A9 +21AA +231A +231B 2328 -23cf -23e9 -23ea -23eb -23ec -23ed -23ee -23ef -23f0 -23f1 -23f2 -23f3 -23f8 -23f9 -23fa -24c2 -25aa -25ab -25b6 -25c0 -25fb -25fc -25fd -25fe +23CF +23E9 +23EA +23EB +23EC +23ED +23EE +23EF +23F0 +23F1 +23F2 +23F3 +23F8 +23F9 +23FA +24C2 +25AA +25AB +25B6 +25C0 +25FB +25FC +25FD +25FE 2600 2601 2602 2603 2604 -260e +260E 2611 2614 2615 2618 -261d +261D 2620 2622 2623 2626 -262a -262e -262f +262A +262E +262F 2638 2639 -263a +263A 2640 2642 2648 2649 -264a -264b -264c -264d -264e -264f +264A +264B +264C +264D +264E +264F 2650 2651 2652 2653 -265f +265F 2660 2663 2665 2666 2668 -267b -267e -267f +267B +267E +267F 2692 2693 2694 @@ -1344,59 +90,59 @@ 2696 2697 2699 -269b -269c -26a0 -26a1 -26a7 -26aa -26ab -26b0 -26b1 -26bd -26be -26c4 -26c5 -26c8 -26ce -26cf -26d1 -26d3 -26d4 -26e9 -26ea -26f0 -26f1 -26f2 -26f3 -26f4 -26f5 -26f7 -26f8 -26f9 -26fa -26fd +269B +269C +26A0 +26A1 +26A7 +26AA +26AB +26B0 +26B1 +26BD +26BE +26C4 +26C5 +26C8 +26CE +26CF +26D1 +26D3 +26D4 +26E9 +26EA +26F0 +26F1 +26F2 +26F3 +26F4 +26F5 +26F7 +26F8 +26F9 +26FA +26FD 2702 2705 2708 2709 -270a -270b -270c -270d -270f +270A +270B +270C +270D +270F 2712 2714 2716 -271d +271D 2721 2728 2733 2734 2744 2747 -274c -274e +274C +274E 2753 2754 2755 @@ -1406,20 +152,1249 @@ 2795 2796 2797 -27a1 -27b0 -27bf +27A1 +27B0 +27BF 2934 2935 -2b05 -2b06 -2b07 -2b1b -2b1c -2b50 -2b55 +2B05 +2B06 +2B07 +2B1B +2B1C +2B50 +2B55 3030 -303d +303D 3297 3299 -e50a +1F004 +1F0CF +1F170 +1F171 +1F17E +1F17F +1F18E +1F191 +1F192 +1F193 +1F194 +1F195 +1F196 +1F197 +1F198 +1F199 +1F19A +1F201 +1F202 +1F21A +1F22F +1F232 +1F233 +1F234 +1F235 +1F236 +1F237 +1F238 +1F239 +1F23A +1F250 +1F251 +1F300 +1F301 +1F302 +1F303 +1F304 +1F305 +1F306 +1F307 +1F308 +1F309 +1F30A +1F30B +1F30C +1F30D +1F30E +1F30F +1F310 +1F311 +1F312 +1F313 +1F314 +1F315 +1F316 +1F317 +1F318 +1F319 +1F31A +1F31B +1F31C +1F31D +1F31E +1F31F +1F320 +1F321 +1F324 +1F325 +1F326 +1F327 +1F328 +1F329 +1F32A +1F32B +1F32C +1F32D +1F32E +1F32F +1F330 +1F331 +1F332 +1F333 +1F334 +1F335 +1F336 +1F337 +1F338 +1F339 +1F33A +1F33B +1F33C +1F33D +1F33E +1F33F +1F340 +1F341 +1F342 +1F343 +1F344 +1F345 +1F346 +1F347 +1F348 +1F349 +1F34A +1F34B +1F34C +1F34D +1F34E +1F34F +1F350 +1F351 +1F352 +1F353 +1F354 +1F355 +1F356 +1F357 +1F358 +1F359 +1F35A +1F35B +1F35C +1F35D +1F35E +1F35F +1F360 +1F361 +1F362 +1F363 +1F364 +1F365 +1F366 +1F367 +1F368 +1F369 +1F36A +1F36B +1F36C +1F36D +1F36E +1F36F +1F370 +1F371 +1F372 +1F373 +1F374 +1F375 +1F376 +1F377 +1F378 +1F379 +1F37A +1F37B +1F37C +1F37D +1F37E +1F37F +1F380 +1F381 +1F382 +1F383 +1F384 +1F385 +1F386 +1F387 +1F388 +1F389 +1F38A +1F38B +1F38C +1F38D +1F38E +1F38F +1F390 +1F391 +1F392 +1F393 +1F396 +1F397 +1F399 +1F39A +1F39B +1F39E +1F39F +1F3A0 +1F3A1 +1F3A2 +1F3A3 +1F3A4 +1F3A5 +1F3A6 +1F3A7 +1F3A8 +1F3A9 +1F3AA +1F3AB +1F3AC +1F3AD +1F3AE +1F3AF +1F3B0 +1F3B1 +1F3B2 +1F3B3 +1F3B4 +1F3B5 +1F3B6 +1F3B7 +1F3B8 +1F3B9 +1F3BA +1F3BB +1F3BC +1F3BD +1F3BE +1F3BF +1F3C0 +1F3C1 +1F3C2 +1F3C3 +1F3C4 +1F3C5 +1F3C6 +1F3C7 +1F3C8 +1F3C9 +1F3CA +1F3CB +1F3CC +1F3CD +1F3CE +1F3CF +1F3D0 +1F3D1 +1F3D2 +1F3D3 +1F3D4 +1F3D5 +1F3D6 +1F3D7 +1F3D8 +1F3D9 +1F3DA +1F3DB +1F3DC +1F3DD +1F3DE +1F3DF +1F3E0 +1F3E1 +1F3E2 +1F3E3 +1F3E4 +1F3E5 +1F3E6 +1F3E7 +1F3E8 +1F3E9 +1F3EA +1F3EB +1F3EC +1F3ED +1F3EE +1F3EF +1F3F0 +1F3F3 +1F3F4 +1F3F5 +1F3F7 +1F3F8 +1F3F9 +1F3FA +1F3FB +1F3FC +1F3FD +1F3FE +1F3FF +1F400 +1F401 +1F402 +1F403 +1F404 +1F405 +1F406 +1F407 +1F408 +1F409 +1F40A +1F40B +1F40C +1F40D +1F40E +1F40F +1F410 +1F411 +1F412 +1F413 +1F414 +1F415 +1F416 +1F417 +1F418 +1F419 +1F41A +1F41B +1F41C +1F41D +1F41E +1F41F +1F420 +1F421 +1F422 +1F423 +1F424 +1F425 +1F426 +1F427 +1F428 +1F429 +1F42A +1F42B +1F42C +1F42D +1F42E +1F42F +1F430 +1F431 +1F432 +1F433 +1F434 +1F435 +1F436 +1F437 +1F438 +1F439 +1F43A +1F43B +1F43C +1F43D +1F43E +1F43F +1F440 +1F441 +1F442 +1F443 +1F444 +1F445 +1F446 +1F447 +1F448 +1F449 +1F44A +1F44B +1F44C +1F44D +1F44E +1F44F +1F450 +1F451 +1F452 +1F453 +1F454 +1F455 +1F456 +1F457 +1F458 +1F459 +1F45A +1F45B +1F45C +1F45D +1F45E +1F45F +1F460 +1F461 +1F462 +1F463 +1F464 +1F465 +1F466 +1F467 +1F468 +1F469 +1F46A +1F46B +1F46C +1F46D +1F46E +1F46F +1F470 +1F471 +1F472 +1F473 +1F474 +1F475 +1F476 +1F477 +1F478 +1F479 +1F47A +1F47B +1F47C +1F47D +1F47E +1F47F +1F480 +1F481 +1F482 +1F483 +1F484 +1F485 +1F486 +1F487 +1F488 +1F489 +1F48A +1F48B +1F48C +1F48D +1F48E +1F48F +1F490 +1F491 +1F492 +1F493 +1F494 +1F495 +1F496 +1F497 +1F498 +1F499 +1F49A +1F49B +1F49C +1F49D +1F49E +1F49F +1F4A0 +1F4A1 +1F4A2 +1F4A3 +1F4A4 +1F4A5 +1F4A6 +1F4A7 +1F4A8 +1F4A9 +1F4AA +1F4AB +1F4AC +1F4AD +1F4AE +1F4AF +1F4B0 +1F4B1 +1F4B2 +1F4B3 +1F4B4 +1F4B5 +1F4B6 +1F4B7 +1F4B8 +1F4B9 +1F4BA +1F4BB +1F4BC +1F4BD +1F4BE +1F4BF +1F4C0 +1F4C1 +1F4C2 +1F4C3 +1F4C4 +1F4C5 +1F4C6 +1F4C7 +1F4C8 +1F4C9 +1F4CA +1F4CB +1F4CC +1F4CD +1F4CE +1F4CF +1F4D0 +1F4D1 +1F4D2 +1F4D3 +1F4D4 +1F4D5 +1F4D6 +1F4D7 +1F4D8 +1F4D9 +1F4DA +1F4DB +1F4DC +1F4DD +1F4DE +1F4DF +1F4E0 +1F4E1 +1F4E2 +1F4E3 +1F4E4 +1F4E5 +1F4E6 +1F4E7 +1F4E8 +1F4E9 +1F4EA +1F4EB +1F4EC +1F4ED +1F4EE +1F4EF +1F4F0 +1F4F1 +1F4F2 +1F4F3 +1F4F4 +1F4F5 +1F4F6 +1F4F7 +1F4F8 +1F4F9 +1F4FA +1F4FB +1F4FC +1F4FD +1F4FF +1F500 +1F501 +1F502 +1F503 +1F504 +1F505 +1F506 +1F507 +1F508 +1F509 +1F50A +1F50B +1F50C +1F50D +1F50E +1F50F +1F510 +1F511 +1F512 +1F513 +1F514 +1F515 +1F516 +1F517 +1F518 +1F519 +1F51A +1F51B +1F51C +1F51D +1F51E +1F51F +1F520 +1F521 +1F522 +1F523 +1F524 +1F525 +1F526 +1F527 +1F528 +1F529 +1F52A +1F52B +1F52C +1F52D +1F52E +1F52F +1F530 +1F531 +1F532 +1F533 +1F534 +1F535 +1F536 +1F537 +1F538 +1F539 +1F53A +1F53B +1F53C +1F53D +1F549 +1F54A +1F54B +1F54C +1F54D +1F54E +1F550 +1F551 +1F552 +1F553 +1F554 +1F555 +1F556 +1F557 +1F558 +1F559 +1F55A +1F55B +1F55C +1F55D +1F55E +1F55F +1F560 +1F561 +1F562 +1F563 +1F564 +1F565 +1F566 +1F567 +1F56F +1F570 +1F573 +1F574 +1F575 +1F576 +1F577 +1F578 +1F579 +1F57A +1F587 +1F58A +1F58B +1F58C +1F58D +1F590 +1F595 +1F596 +1F5A4 +1F5A5 +1F5A8 +1F5B1 +1F5B2 +1F5BC +1F5C2 +1F5C3 +1F5C4 +1F5D1 +1F5D2 +1F5D3 +1F5DC +1F5DD +1F5DE +1F5E1 +1F5E3 +1F5E8 +1F5EF +1F5F3 +1F5FA +1F5FB +1F5FC +1F5FD +1F5FE +1F5FF +1F600 +1F601 +1F602 +1F603 +1F604 +1F605 +1F606 +1F607 +1F608 +1F609 +1F60A +1F60B +1F60C +1F60D +1F60E +1F60F +1F610 +1F611 +1F612 +1F613 +1F614 +1F615 +1F616 +1F617 +1F618 +1F619 +1F61A +1F61B +1F61C +1F61D +1F61E +1F61F +1F620 +1F621 +1F622 +1F623 +1F624 +1F625 +1F626 +1F627 +1F628 +1F629 +1F62A +1F62B +1F62C +1F62D +1F62E +1F62F +1F630 +1F631 +1F632 +1F633 +1F634 +1F635 +1F636 +1F637 +1F638 +1F639 +1F63A +1F63B +1F63C +1F63D +1F63E +1F63F +1F640 +1F641 +1F642 +1F643 +1F644 +1F645 +1F646 +1F647 +1F648 +1F649 +1F64A +1F64B +1F64C +1F64D +1F64E +1F64F +1F680 +1F681 +1F682 +1F683 +1F684 +1F685 +1F686 +1F687 +1F688 +1F689 +1F68A +1F68B +1F68C +1F68D +1F68E +1F68F +1F690 +1F691 +1F692 +1F693 +1F694 +1F695 +1F696 +1F697 +1F698 +1F699 +1F69A +1F69B +1F69C +1F69D +1F69E +1F69F +1F6A0 +1F6A1 +1F6A2 +1F6A3 +1F6A4 +1F6A5 +1F6A6 +1F6A7 +1F6A8 +1F6A9 +1F6AA +1F6AB +1F6AC +1F6AD +1F6AE +1F6AF +1F6B0 +1F6B1 +1F6B2 +1F6B3 +1F6B4 +1F6B5 +1F6B6 +1F6B7 +1F6B8 +1F6B9 +1F6BA +1F6BB +1F6BC +1F6BD +1F6BE +1F6BF +1F6C0 +1F6C1 +1F6C2 +1F6C3 +1F6C4 +1F6C5 +1F6CB +1F6CC +1F6CD +1F6CE +1F6CF +1F6D0 +1F6D1 +1F6D2 +1F6D5 +1F6D6 +1F6D7 +1F6D8 +1F6DC +1F6DD +1F6DE +1F6DF +1F6E0 +1F6E1 +1F6E2 +1F6E3 +1F6E4 +1F6E5 +1F6E9 +1F6EB +1F6EC +1F6F0 +1F6F3 +1F6F4 +1F6F5 +1F6F6 +1F6F7 +1F6F8 +1F6F9 +1F6FA +1F6FB +1F6FC +1F7E0 +1F7E1 +1F7E2 +1F7E3 +1F7E4 +1F7E5 +1F7E6 +1F7E7 +1F7E8 +1F7E9 +1F7EA +1F7EB +1F7F0 +1F90C +1F90D +1F90E +1F90F +1F910 +1F911 +1F912 +1F913 +1F914 +1F915 +1F916 +1F917 +1F918 +1F919 +1F91A +1F91B +1F91C +1F91D +1F91E +1F91F +1F920 +1F921 +1F922 +1F923 +1F924 +1F925 +1F926 +1F927 +1F928 +1F929 +1F92A +1F92B +1F92C +1F92D +1F92E +1F92F +1F930 +1F931 +1F932 +1F933 +1F934 +1F935 +1F936 +1F937 +1F938 +1F939 +1F93A +1F93C +1F93D +1F93E +1F93F +1F940 +1F941 +1F942 +1F943 +1F944 +1F945 +1F947 +1F948 +1F949 +1F94A +1F94B +1F94C +1F94D +1F94E +1F94F +1F950 +1F951 +1F952 +1F953 +1F954 +1F955 +1F956 +1F957 +1F958 +1F959 +1F95A +1F95B +1F95C +1F95D +1F95E +1F95F +1F960 +1F961 +1F962 +1F963 +1F964 +1F965 +1F966 +1F967 +1F968 +1F969 +1F96A +1F96B +1F96C +1F96D +1F96E +1F96F +1F970 +1F971 +1F972 +1F973 +1F974 +1F975 +1F976 +1F977 +1F978 +1F979 +1F97A +1F97B +1F97C +1F97D +1F97E +1F97F +1F980 +1F981 +1F982 +1F983 +1F984 +1F985 +1F986 +1F987 +1F988 +1F989 +1F98A +1F98B +1F98C +1F98D +1F98E +1F98F +1F990 +1F991 +1F992 +1F993 +1F994 +1F995 +1F996 +1F997 +1F998 +1F999 +1F99A +1F99B +1F99C +1F99D +1F99E +1F99F +1F9A0 +1F9A1 +1F9A2 +1F9A3 +1F9A4 +1F9A5 +1F9A6 +1F9A7 +1F9A8 +1F9A9 +1F9AA +1F9AB +1F9AC +1F9AD +1F9AE +1F9AF +1F9B0 +1F9B1 +1F9B2 +1F9B3 +1F9B4 +1F9B5 +1F9B6 +1F9B7 +1F9B8 +1F9B9 +1F9BA +1F9BB +1F9BC +1F9BD +1F9BE +1F9BF +1F9C0 +1F9C1 +1F9C2 +1F9C3 +1F9C4 +1F9C5 +1F9C6 +1F9C7 +1F9C8 +1F9C9 +1F9CA +1F9CB +1F9CC +1F9CD +1F9CE +1F9CF +1F9D0 +1F9D1 +1F9D2 +1F9D3 +1F9D4 +1F9D5 +1F9D6 +1F9D7 +1F9D8 +1F9D9 +1F9DA +1F9DB +1F9DC +1F9DD +1F9DE +1F9DF +1F9E0 +1F9E1 +1F9E2 +1F9E3 +1F9E4 +1F9E5 +1F9E6 +1F9E7 +1F9E8 +1F9E9 +1F9EA +1F9EB +1F9EC +1F9ED +1F9EE +1F9EF +1F9F0 +1F9F1 +1F9F2 +1F9F3 +1F9F4 +1F9F5 +1F9F6 +1F9F7 +1F9F8 +1F9F9 +1F9FA +1F9FB +1F9FC +1F9FD +1F9FE +1F9FF +1FA70 +1FA71 +1FA72 +1FA73 +1FA74 +1FA75 +1FA76 +1FA77 +1FA78 +1FA79 +1FA7A +1FA7B +1FA7C +1FA80 +1FA81 +1FA82 +1FA83 +1FA84 +1FA85 +1FA86 +1FA87 +1FA88 +1FA89 +1FA8A +1FA8E +1FA8F +1FA90 +1FA91 +1FA92 +1FA93 +1FA94 +1FA95 +1FA96 +1FA97 +1FA98 +1FA99 +1FA9A +1FA9B +1FA9C +1FA9D +1FA9E +1FA9F +1FAA0 +1FAA1 +1FAA2 +1FAA3 +1FAA4 +1FAA5 +1FAA6 +1FAA7 +1FAA8 +1FAA9 +1FAAA +1FAAB +1FAAC +1FAAD +1FAAE +1FAAF +1FAB0 +1FAB1 +1FAB2 +1FAB3 +1FAB4 +1FAB5 +1FAB6 +1FAB7 +1FAB8 +1FAB9 +1FABA +1FABB +1FABC +1FABD +1FABE +1FABF +1FAC0 +1FAC1 +1FAC2 +1FAC3 +1FAC4 +1FAC5 +1FAC6 +1FAC8 +1FACD +1FACE +1FACF +1FAD0 +1FAD1 +1FAD2 +1FAD3 +1FAD4 +1FAD5 +1FAD6 +1FAD7 +1FAD8 +1FAD9 +1FADA +1FADB +1FADC +1FADF +1FAE0 +1FAE1 +1FAE2 +1FAE3 +1FAE4 +1FAE5 +1FAE6 +1FAE7 +1FAE8 +1FAE9 +1FAEA +1FAEF +1FAF0 +1FAF1 +1FAF2 +1FAF3 +1FAF4 +1FAF5 +1FAF6 +1FAF7 +1FAF8 diff --git a/tools/emoji/emoji-unsupported.txt b/tools/emoji/emoji-unsupported.txt new file mode 100644 index 000000000..e69de29bb From 37f40dfdd7447e4ebaecfe17e831a6f7e706681f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 22:45:51 +0200 Subject: [PATCH 7/7] Emoji routing: the global fallback is the only route; the check observes it EmojiFont.Build leaves TMP's emoji fallback list empty. EmojiCheck fails when that list is non-empty, when the global fallback lacks Emoji.asset, or when a glyph is served by a font other than Emoji.asset or the body font; reads the Pirates product names from the shipped catalog; renders the emoji-test.txt corpus and reports what Twemoji lacks; counts only used atlas pages (TMP doubles the array capacity, so trailing slots are null by design). Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/Editor/EmojiCheck.cs | 84 ++++++++++++++----- Assets/Scripts/Editor/EmojiFont.cs | 13 +-- .../TextMesh Pro/Resources/TMP Settings.asset | 4 +- 3 files changed, 70 insertions(+), 31 deletions(-) diff --git a/Assets/Scripts/Editor/EmojiCheck.cs b/Assets/Scripts/Editor/EmojiCheck.cs index 48afc0018..5080315b3 100644 --- a/Assets/Scripts/Editor/EmojiCheck.cs +++ b/Assets/Scripts/Editor/EmojiCheck.cs @@ -6,22 +6,20 @@ using TMPro; using UnityEditor; using UnityEngine; -// Every single-code-point emoji the pinned font set draws, and the Pirates product names, render through an -// ordinary TMP text on the game's body font with no missing code point and with ink in the emoji atlas. +// Every single-code-point emoji of the pinned Unicode Emoji version that Twemoji draws, and the Pirates product +// names read from the shipped catalog, render through an ordinary TMP text on the game's body font with no +// missing code point, no blank glyph, ink in the emoji atlas, and each glyph served by the emoji asset or by the +// body font itself, never by a third font. TMP Settings must route emoji by exactly one entry: the global +// fallback (the emoji fallback list stays empty), so dropping that entry or re-adding the second route fails. // Run as -executeMethod EmojiCheck.Run (exit 1 on failure in batchmode, as EngineAssetCheck). Corpus: -// tools/emoji/emoji-singles.txt; -emojiLimit N spreads N entries evenly across it for the spike. +// tools/emoji/emoji-singles.txt (from emoji-test.txt); the emoji Twemoji lacks are listed in +// tools/emoji/emoji-unsupported.txt and reported, not rendered; -emojiLimit N spreads N entries evenly for a spike. public static class EmojiCheck { const string BodyFontPath = "Assets/Fonts/Ubuntu/Ubuntu-L Small SDF.asset"; + const string PiratesFaction = "Pirates"; const int Chunk = 64; - // The eight Pirates products (addenda "The Pirates record r2"), written as code points. - static readonly string[] PiratesNames = - { - "\U0001FAF3\U0001F52B", "\U0001FAA6\U0001F920", "\U0001F9FE\U0001F6AB", "\U0001F3A8\U0001F648", - "\U0001F525", "\U0001F440\U0001F3AF", "\U0001F511\U0001F3C3\U0001F4A8", "\U0001F4E6\U0001F92B", - }; - [MenuItem("Aetheria/Text/Check Emoji Rendering")] public static void Run() { @@ -32,7 +30,8 @@ public static class EmojiCheck if (Application.isBatchMode) EditorApplication.Exit(failures.Count == 0 ? 0 : 1); } - static string RunCheck(List failures) + // Public so a scratch driver can mutate TMP Settings in memory and watch this fail; adds to failures. + public static string RunCheck(List failures) { var emoji = AssetDatabase.LoadAssetAtPath(EmojiFont.AssetPath); var body = AssetDatabase.LoadAssetAtPath(BodyFontPath); @@ -42,7 +41,14 @@ public static class EmojiCheck return "nothing checked"; } - var corpus = LoadSingles(); + // One route: the global fallback names the emoji asset, and the emoji fallback list is empty. + if (TMP_Settings.emojiFallbackTextAssets != null && TMP_Settings.emojiFallbackTextAssets.Count > 0) + failures.Add("TMP Settings' emoji fallback list is not empty: a second emoji route exists (EmojiFont.Build leaves it empty)."); + if (TMP_Settings.fallbackFontAssets == null || !TMP_Settings.fallbackFontAssets.Contains(emoji)) + failures.Add("TMP Settings' global fallback list does not name Emoji.asset: the only emoji route is gone."); + + var unsupported = new HashSet(LoadCodePoints("emoji-unsupported.txt")); + var corpus = LoadSingles().Where(cp => !unsupported.Contains(cp)).ToList(); var missing = new HashSet(); TMP_Text.MissingCharacterEventCallback onMissing = (unicode, index, source, asset, component) => missing.Add(unicode); TMP_Text.OnMissingCharacter += onMissing; @@ -54,7 +60,8 @@ public static class EmojiCheck text.textWrappingMode = TextWrappingModes.NoWrap; text.rectTransform.sizeDelta = new Vector2(100000, 100000); - int viaEmoji = 0, viaOther = 0, blank = 0; + int viaEmoji = 0, viaBody = 0, blank = 0, pirateNames = 0; + var strays = new HashSet(); try { void Render(string content, string label) @@ -65,7 +72,10 @@ public static class EmojiCheck { var info = text.textInfo.characterInfo[i]; if (info.character == ' ' || info.elementType != TMP_TextElementType.Character) continue; - if (info.fontAsset == emoji) viaEmoji++; else viaOther++; + if (info.fontAsset == emoji) viaEmoji++; + else if (info.fontAsset == body) viaBody++; + else if (strays.Add($"{info.fontAsset.name}:{(int)info.character:X}")) + failures.Add($"U+{(int)info.character:X4} in {label} was served by {info.fontAsset.name}, not Emoji.asset or the body font"); if (info.fontAsset == emoji && info.textElement.glyph.glyphRect.width <= 0) { blank++; @@ -79,7 +89,24 @@ public static class EmojiCheck var slice = corpus.Skip(i).Take(Chunk).ToList(); Render(string.Join(" ", slice.Select(char.ConvertFromUtf32)), $"chunk {i}"); } - foreach (var name in PiratesNames) Render(name, "Pirates name"); + + // The Pirates names as the shipped catalog stores them, through the game's own catalog reader. + var catalogPath = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "GameData", "Aetheria.cc"); + using (var catalog = AetheriaStores.Open(catalogPath)) + { + var pirates = catalog.GetAll().SingleOrDefault(faction => faction.Name == PiratesFaction); + if (pirates == null) failures.Add($"the catalog has no {PiratesFaction} faction"); + else + { + var key = catalog.RefOf(pirates); + foreach (var product in catalog.GetAll().Where(product => product.Manufacturer.Equals(key))) + { + pirateNames++; + Render(product.Name, $"Pirates product name \"{product.Name}\""); + } + if (pirateNames == 0) failures.Add($"the catalog has no {PiratesFaction} products"); + } + } } finally { @@ -89,12 +116,13 @@ public static class EmojiCheck foreach (var cp in missing.OrderBy(c => c)) failures.Add($"missing code point U+{cp:X4}"); + // TMP over-allocates atlasTextures by doubling its capacity when a page is added, so entries past + // atlasTextureCount are null by design (3 pages in a 4-slot array). Only the used pages count. long ink = 0, colour = 0; - int pages = 0, nullPages = 0; - foreach (var page in emoji.atlasTextures) + for (var i = 0; i < emoji.atlasTextureCount; i++) { - if (page == null) { nullPages++; continue; } - pages++; + var page = emoji.atlasTextures[i]; + if (page == null) { failures.Add($"emoji atlas page {i} of {emoji.atlasTextureCount} is null"); continue; } var pixels = page.GetPixels32(); ink += pixels.LongCount(p => p.a != 0); colour += pixels.LongCount(p => p.a != 0 && (p.r != p.g || p.g != p.b)); @@ -102,20 +130,30 @@ public static class EmojiCheck if (ink == 0) failures.Add("the emoji atlas holds no ink after rendering"); else if (colour == 0) failures.Add("the emoji atlas holds no coloured pixel: the glyphs rendered monochrome"); + var pages = emoji.atlasTextureCount; // Dynamic atlas content is cache: drop it so this check leaves the asset as Build wrote it. emoji.ClearFontAssetData(true); - return $"checked {corpus.Count} single code points + {PiratesNames.Length} Pirates names, {missing.Count} missing, " + - $"{viaEmoji} glyphs via the emoji asset, {viaOther} via other fonts, {blank} blank, {ink} atlas ink pixels of which {colour} coloured, {pages} atlas pages ({nullPages} null)"; + if (unsupported.Count > 0) + Debug.LogWarning($"EmojiCheck: Twemoji lacks {unsupported.Count} single-code-point emoji of the Emoji version: " + + string.Join(" ", unsupported.OrderBy(c => c).Select(c => $"U+{c:X4}"))); + return $"checked {corpus.Count} single code points ({unsupported.Count} not drawn by Twemoji, listed in the warning) + {pirateNames} Pirates product names, " + + $"{missing.Count} missing, {viaEmoji} glyphs via the emoji asset, {viaBody} via the body font, {strays.Count} via other fonts, {blank} blank, " + + $"{ink} atlas ink pixels of which {colour} coloured, {pages} atlas pages"; } static List LoadSingles() { - var path = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "tools", "emoji", "emoji-singles.txt"); - var all = File.ReadAllLines(path).Where(l => l.Length > 0).Select(l => Convert.ToInt32(l, 16)).ToList(); + var all = LoadCodePoints("emoji-singles.txt"); var args = Environment.GetCommandLineArgs(); var at = Array.IndexOf(args, "-emojiLimit"); if (at < 0 || at + 1 >= args.Length) return all; var limit = int.Parse(args[at + 1]); return Enumerable.Range(0, limit).Select(i => all[i * all.Count / limit]).ToList(); } + + static List LoadCodePoints(string file) + { + var path = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "tools", "emoji", file); + return File.ReadAllLines(path).Where(l => l.Length > 0).Select(l => Convert.ToInt32(l, 16)).ToList(); + } } diff --git a/Assets/Scripts/Editor/EmojiFont.cs b/Assets/Scripts/Editor/EmojiFont.cs index c7ce97aaf..0c1d4eac2 100644 --- a/Assets/Scripts/Editor/EmojiFont.cs +++ b/Assets/Scripts/Editor/EmojiFont.cs @@ -6,8 +6,10 @@ using UnityEngine.TextCore.LowLevel; // The one writer of the emoji font asset and of TMP Settings' emoji routing. The font file is the // output of tools/emoji/fetch_emoji_font.py; the asset is a dynamic COLOR font asset whose atlas pages -// are cache, filled on first use at runtime and cleared here. Every TMP text reaches emoji through -// TMP Settings' emoji fallback and global fallback list; no component names an emoji font. +// are cache, filled on first use at runtime and cleared here. Every TMP text reaches emoji through ONE +// route, TMP Settings' global fallback list; the emoji fallback list stays empty, and no component names +// an emoji font. (Measured: the global list alone resolves every single code point; the emoji list alone +// leaves 200 text-presentation emoji unresolved. A second route could only disagree with the first.) public static class EmojiFont { public const string FontPath = "Assets/Fonts/Emoji/Twemoji.ttf"; @@ -61,16 +63,15 @@ public static class EmojiFont // The atlas pages are cache: Build leaves them empty, the same state EmojiCheck restores. asset.ClearFontAssetData(true); - // Text-presentation emoji (U+263A without FE0F) are not routed through the emoji list, so the - // asset is also the global fallback. - TMP_Settings.emojiFallbackTextAssets = new List { asset }; + // One route: the global fallback. It also serves text-presentation emoji (U+263A without FE0F). + TMP_Settings.emojiFallbackTextAssets = new List(); TMP_Settings.fallbackFontAssets = new List { asset }; TMP_Settings.defaultSpriteAsset = null; EditorUtility.SetDirty(asset); EditorUtility.SetDirty(TMP_Settings.instance); AssetDatabase.SaveAssets(); - message = "EmojiFont: built " + AssetPath + " and routed TMP Settings' emoji fallback to it."; + message = "EmojiFont: built " + AssetPath + " and made it TMP Settings' only emoji route (the global fallback)."; return true; } } diff --git a/Assets/TextMesh Pro/Resources/TMP Settings.asset b/Assets/TextMesh Pro/Resources/TMP Settings.asset index 0371c3b56..d7c619e31 100644 --- a/Assets/TextMesh Pro/Resources/TMP Settings.asset +++ b/Assets/TextMesh Pro/Resources/TMP Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f00aad0de57d69c610a4a421bf4652e93f45c2a39bacc76dec8a7921bf699ecb -size 1930 +oid sha256:1e678e96aa2e2acd6a205a7c33df946e3a59e8dfae43e0cbbc98ddecc6983a58 +size 1861