|
@ -0,0 +1,36 @@
|
||||||
|
# Build instructions
|
||||||
|
|
||||||
|
Typically build the CBDT then the COLRv1 as COLRv1 copies some information from CBDT.
|
||||||
|
|
||||||
|
## CBDT
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -rf venv # in case you have an old borked venv!
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
rm -rf build/ && time make -j 48
|
||||||
|
# Should take 2-3 minutes to create noto-emoji/NotoColorEmoji.ttf
|
||||||
|
|
||||||
|
mv *.ttf fonts/
|
||||||
|
```
|
||||||
|
|
||||||
|
## COLRv1
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# If you are updating to a new Unicode rev, update configs
|
||||||
|
(cd colrv1 && python colrv1_generate_configs.py)
|
||||||
|
git diff colrv1/*.toml
|
||||||
|
|
||||||
|
# Compile the fonts
|
||||||
|
(cd colrv1 && rm -rf build/ && time nanoemoji *.toml)
|
||||||
|
cp colrv1/build/NotoColorEmoji.ttf fonts/Noto-COLRv1.ttf
|
||||||
|
cp colrv1/build/NotoColorEmoji-noflags.ttf fonts/Noto-COLRv1-noflags.ttf
|
||||||
|
|
||||||
|
# Post-process them
|
||||||
|
python colrv1_postproc.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Emojicompat
|
||||||
|
|
||||||
|
TODO detailed instructions
|
|
@ -78,7 +78,7 @@
|
||||||
<head>
|
<head>
|
||||||
<!-- Most of this table will be recalculated by the compiler -->
|
<!-- Most of this table will be recalculated by the compiler -->
|
||||||
<tableVersion value="1.0"/>
|
<tableVersion value="1.0"/>
|
||||||
<fontRevision value="2.034"/>
|
<fontRevision value="2.038"/>
|
||||||
<checkSumAdjustment value="0x4d5a161a"/>
|
<checkSumAdjustment value="0x4d5a161a"/>
|
||||||
<magicNumber value="0x5f0f3cf5"/>
|
<magicNumber value="0x5f0f3cf5"/>
|
||||||
<flags value="00000000 00001011"/>
|
<flags value="00000000 00001011"/>
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
|
|
||||||
<name>
|
<name>
|
||||||
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
|
||||||
Copyright 2013 Google Inc.
|
Copyright 2022 Google Inc.
|
||||||
</namerecord>
|
</namerecord>
|
||||||
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
|
||||||
Noto Color Emoji
|
Noto Color Emoji
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
Noto Color Emoji
|
Noto Color Emoji
|
||||||
</namerecord>
|
</namerecord>
|
||||||
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
|
||||||
Version 2.034;GOOG;noto-emoji:20211013:BETA
|
Version 2.038;GOOG;noto-emoji:20220906:4b1c5bfb0d5b1f5c69aa321d5b6e70656ead1d30
|
||||||
</namerecord>
|
</namerecord>
|
||||||
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
|
||||||
NotoColorEmoji
|
NotoColorEmoji
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# COLRv1 Build
|
|
||||||
|
|
||||||
We assume the bitmap version with equivalent coverage exists and
|
|
||||||
contains emojicompat metadata.
|
|
||||||
|
|
||||||
## Build Steps
|
|
||||||
|
|
||||||
1. Check the list of sources in the config files is in sync with the current sources
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# running from the noto-emoji repository root directory
|
|
||||||
python colrv1_generate_configs.py
|
|
||||||
git diff colrv1/*.toml
|
|
||||||
```
|
|
||||||
|
|
||||||
If configs are in sync, the `colrv1/*.toml` files should contain no diffs.
|
|
||||||
|
|
||||||
1. Compile the COLRv1 fonts
|
|
||||||
|
|
||||||
```shell
|
|
||||||
time nanoemoji *.toml
|
|
||||||
cp build/NotoColorEmoji.ttf ../fonts/Noto-COLRv1.ttf
|
|
||||||
cp build/NotoColorEmoji-noflags.ttf ../fonts/Noto-COLRv1-noflags.ttf
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Post-process COLRv1 font for Android
|
|
||||||
* At time of writing only the noflags version is for Android
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Assumed to be in a python3 environment with requirements.txt fulfilled
|
|
||||||
python colrv1_postproc.py colrv1/build/NotoColorEmoji-noflags.ttf \
|
|
||||||
PATH_TO/NotoColorEmojiCompat.ttf
|
|
||||||
```
|
|
|
@ -485,6 +485,7 @@ srcs = [
|
||||||
"../svg/emoji_u1f424.svg",
|
"../svg/emoji_u1f424.svg",
|
||||||
"../svg/emoji_u1f425.svg",
|
"../svg/emoji_u1f425.svg",
|
||||||
"../svg/emoji_u1f426.svg",
|
"../svg/emoji_u1f426.svg",
|
||||||
|
"../svg/emoji_u1f426_200d_2b1b.svg",
|
||||||
"../svg/emoji_u1f427.svg",
|
"../svg/emoji_u1f427.svg",
|
||||||
"../svg/emoji_u1f428.svg",
|
"../svg/emoji_u1f428.svg",
|
||||||
"../svg/emoji_u1f429.svg",
|
"../svg/emoji_u1f429.svg",
|
||||||
|
@ -2074,6 +2075,7 @@ srcs = [
|
||||||
"../svg/emoji_u1f6d5.svg",
|
"../svg/emoji_u1f6d5.svg",
|
||||||
"../svg/emoji_u1f6d6.svg",
|
"../svg/emoji_u1f6d6.svg",
|
||||||
"../svg/emoji_u1f6d7.svg",
|
"../svg/emoji_u1f6d7.svg",
|
||||||
|
"../svg/emoji_u1f6dc.svg",
|
||||||
"../svg/emoji_u1f6dd.svg",
|
"../svg/emoji_u1f6dd.svg",
|
||||||
"../svg/emoji_u1f6de.svg",
|
"../svg/emoji_u1f6de.svg",
|
||||||
"../svg/emoji_u1f6df.svg",
|
"../svg/emoji_u1f6df.svg",
|
||||||
|
@ -3071,6 +3073,9 @@ srcs = [
|
||||||
"../svg/emoji_u1fa72.svg",
|
"../svg/emoji_u1fa72.svg",
|
||||||
"../svg/emoji_u1fa73.svg",
|
"../svg/emoji_u1fa73.svg",
|
||||||
"../svg/emoji_u1fa74.svg",
|
"../svg/emoji_u1fa74.svg",
|
||||||
|
"../svg/emoji_u1fa75.svg",
|
||||||
|
"../svg/emoji_u1fa76.svg",
|
||||||
|
"../svg/emoji_u1fa77.svg",
|
||||||
"../svg/emoji_u1fa78.svg",
|
"../svg/emoji_u1fa78.svg",
|
||||||
"../svg/emoji_u1fa79.svg",
|
"../svg/emoji_u1fa79.svg",
|
||||||
"../svg/emoji_u1fa7a.svg",
|
"../svg/emoji_u1fa7a.svg",
|
||||||
|
@ -3083,6 +3088,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fa84.svg",
|
"../svg/emoji_u1fa84.svg",
|
||||||
"../svg/emoji_u1fa85.svg",
|
"../svg/emoji_u1fa85.svg",
|
||||||
"../svg/emoji_u1fa86.svg",
|
"../svg/emoji_u1fa86.svg",
|
||||||
|
"../svg/emoji_u1fa87.svg",
|
||||||
|
"../svg/emoji_u1fa88.svg",
|
||||||
"../svg/emoji_u1fa90.svg",
|
"../svg/emoji_u1fa90.svg",
|
||||||
"../svg/emoji_u1fa91.svg",
|
"../svg/emoji_u1fa91.svg",
|
||||||
"../svg/emoji_u1fa92.svg",
|
"../svg/emoji_u1fa92.svg",
|
||||||
|
@ -3112,6 +3119,9 @@ srcs = [
|
||||||
"../svg/emoji_u1faaa.svg",
|
"../svg/emoji_u1faaa.svg",
|
||||||
"../svg/emoji_u1faab.svg",
|
"../svg/emoji_u1faab.svg",
|
||||||
"../svg/emoji_u1faac.svg",
|
"../svg/emoji_u1faac.svg",
|
||||||
|
"../svg/emoji_u1faad.svg",
|
||||||
|
"../svg/emoji_u1faae.svg",
|
||||||
|
"../svg/emoji_u1faaf.svg",
|
||||||
"../svg/emoji_u1fab0.svg",
|
"../svg/emoji_u1fab0.svg",
|
||||||
"../svg/emoji_u1fab1.svg",
|
"../svg/emoji_u1fab1.svg",
|
||||||
"../svg/emoji_u1fab2.svg",
|
"../svg/emoji_u1fab2.svg",
|
||||||
|
@ -3123,6 +3133,10 @@ srcs = [
|
||||||
"../svg/emoji_u1fab8.svg",
|
"../svg/emoji_u1fab8.svg",
|
||||||
"../svg/emoji_u1fab9.svg",
|
"../svg/emoji_u1fab9.svg",
|
||||||
"../svg/emoji_u1faba.svg",
|
"../svg/emoji_u1faba.svg",
|
||||||
|
"../svg/emoji_u1fabb.svg",
|
||||||
|
"../svg/emoji_u1fabc.svg",
|
||||||
|
"../svg/emoji_u1fabd.svg",
|
||||||
|
"../svg/emoji_u1fabf.svg",
|
||||||
"../svg/emoji_u1fac0.svg",
|
"../svg/emoji_u1fac0.svg",
|
||||||
"../svg/emoji_u1fac1.svg",
|
"../svg/emoji_u1fac1.svg",
|
||||||
"../svg/emoji_u1fac2.svg",
|
"../svg/emoji_u1fac2.svg",
|
||||||
|
@ -3144,6 +3158,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fac5_1f3fd.svg",
|
"../svg/emoji_u1fac5_1f3fd.svg",
|
||||||
"../svg/emoji_u1fac5_1f3fe.svg",
|
"../svg/emoji_u1fac5_1f3fe.svg",
|
||||||
"../svg/emoji_u1fac5_1f3ff.svg",
|
"../svg/emoji_u1fac5_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1face.svg",
|
||||||
|
"../svg/emoji_u1facf.svg",
|
||||||
"../svg/emoji_u1fad0.svg",
|
"../svg/emoji_u1fad0.svg",
|
||||||
"../svg/emoji_u1fad1.svg",
|
"../svg/emoji_u1fad1.svg",
|
||||||
"../svg/emoji_u1fad2.svg",
|
"../svg/emoji_u1fad2.svg",
|
||||||
|
@ -3154,6 +3170,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fad7.svg",
|
"../svg/emoji_u1fad7.svg",
|
||||||
"../svg/emoji_u1fad8.svg",
|
"../svg/emoji_u1fad8.svg",
|
||||||
"../svg/emoji_u1fad9.svg",
|
"../svg/emoji_u1fad9.svg",
|
||||||
|
"../svg/emoji_u1fada.svg",
|
||||||
|
"../svg/emoji_u1fadb.svg",
|
||||||
"../svg/emoji_u1fae0.svg",
|
"../svg/emoji_u1fae0.svg",
|
||||||
"../svg/emoji_u1fae1.svg",
|
"../svg/emoji_u1fae1.svg",
|
||||||
"../svg/emoji_u1fae2.svg",
|
"../svg/emoji_u1fae2.svg",
|
||||||
|
@ -3162,6 +3180,7 @@ srcs = [
|
||||||
"../svg/emoji_u1fae5.svg",
|
"../svg/emoji_u1fae5.svg",
|
||||||
"../svg/emoji_u1fae6.svg",
|
"../svg/emoji_u1fae6.svg",
|
||||||
"../svg/emoji_u1fae7.svg",
|
"../svg/emoji_u1fae7.svg",
|
||||||
|
"../svg/emoji_u1fae8.svg",
|
||||||
"../svg/emoji_u1faf0.svg",
|
"../svg/emoji_u1faf0.svg",
|
||||||
"../svg/emoji_u1faf0_1f3fb.svg",
|
"../svg/emoji_u1faf0_1f3fb.svg",
|
||||||
"../svg/emoji_u1faf0_1f3fc.svg",
|
"../svg/emoji_u1faf0_1f3fc.svg",
|
||||||
|
@ -3224,6 +3243,18 @@ srcs = [
|
||||||
"../svg/emoji_u1faf6_1f3fd.svg",
|
"../svg/emoji_u1faf6_1f3fd.svg",
|
||||||
"../svg/emoji_u1faf6_1f3fe.svg",
|
"../svg/emoji_u1faf6_1f3fe.svg",
|
||||||
"../svg/emoji_u1faf6_1f3ff.svg",
|
"../svg/emoji_u1faf6_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1faf7.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fb.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fc.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fd.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fe.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1faf8.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fb.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fc.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fd.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fe.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3ff.svg",
|
||||||
"../svg/emoji_u203c.svg",
|
"../svg/emoji_u203c.svg",
|
||||||
"../svg/emoji_u2049.svg",
|
"../svg/emoji_u2049.svg",
|
||||||
"../svg/emoji_u20e3.svg",
|
"../svg/emoji_u20e3.svg",
|
||||||
|
|
|
@ -459,6 +459,7 @@ srcs = [
|
||||||
"../svg/emoji_u1f424.svg",
|
"../svg/emoji_u1f424.svg",
|
||||||
"../svg/emoji_u1f425.svg",
|
"../svg/emoji_u1f425.svg",
|
||||||
"../svg/emoji_u1f426.svg",
|
"../svg/emoji_u1f426.svg",
|
||||||
|
"../svg/emoji_u1f426_200d_2b1b.svg",
|
||||||
"../svg/emoji_u1f427.svg",
|
"../svg/emoji_u1f427.svg",
|
||||||
"../svg/emoji_u1f428.svg",
|
"../svg/emoji_u1f428.svg",
|
||||||
"../svg/emoji_u1f429.svg",
|
"../svg/emoji_u1f429.svg",
|
||||||
|
@ -2048,6 +2049,7 @@ srcs = [
|
||||||
"../svg/emoji_u1f6d5.svg",
|
"../svg/emoji_u1f6d5.svg",
|
||||||
"../svg/emoji_u1f6d6.svg",
|
"../svg/emoji_u1f6d6.svg",
|
||||||
"../svg/emoji_u1f6d7.svg",
|
"../svg/emoji_u1f6d7.svg",
|
||||||
|
"../svg/emoji_u1f6dc.svg",
|
||||||
"../svg/emoji_u1f6dd.svg",
|
"../svg/emoji_u1f6dd.svg",
|
||||||
"../svg/emoji_u1f6de.svg",
|
"../svg/emoji_u1f6de.svg",
|
||||||
"../svg/emoji_u1f6df.svg",
|
"../svg/emoji_u1f6df.svg",
|
||||||
|
@ -3045,6 +3047,9 @@ srcs = [
|
||||||
"../svg/emoji_u1fa72.svg",
|
"../svg/emoji_u1fa72.svg",
|
||||||
"../svg/emoji_u1fa73.svg",
|
"../svg/emoji_u1fa73.svg",
|
||||||
"../svg/emoji_u1fa74.svg",
|
"../svg/emoji_u1fa74.svg",
|
||||||
|
"../svg/emoji_u1fa75.svg",
|
||||||
|
"../svg/emoji_u1fa76.svg",
|
||||||
|
"../svg/emoji_u1fa77.svg",
|
||||||
"../svg/emoji_u1fa78.svg",
|
"../svg/emoji_u1fa78.svg",
|
||||||
"../svg/emoji_u1fa79.svg",
|
"../svg/emoji_u1fa79.svg",
|
||||||
"../svg/emoji_u1fa7a.svg",
|
"../svg/emoji_u1fa7a.svg",
|
||||||
|
@ -3057,6 +3062,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fa84.svg",
|
"../svg/emoji_u1fa84.svg",
|
||||||
"../svg/emoji_u1fa85.svg",
|
"../svg/emoji_u1fa85.svg",
|
||||||
"../svg/emoji_u1fa86.svg",
|
"../svg/emoji_u1fa86.svg",
|
||||||
|
"../svg/emoji_u1fa87.svg",
|
||||||
|
"../svg/emoji_u1fa88.svg",
|
||||||
"../svg/emoji_u1fa90.svg",
|
"../svg/emoji_u1fa90.svg",
|
||||||
"../svg/emoji_u1fa91.svg",
|
"../svg/emoji_u1fa91.svg",
|
||||||
"../svg/emoji_u1fa92.svg",
|
"../svg/emoji_u1fa92.svg",
|
||||||
|
@ -3086,6 +3093,9 @@ srcs = [
|
||||||
"../svg/emoji_u1faaa.svg",
|
"../svg/emoji_u1faaa.svg",
|
||||||
"../svg/emoji_u1faab.svg",
|
"../svg/emoji_u1faab.svg",
|
||||||
"../svg/emoji_u1faac.svg",
|
"../svg/emoji_u1faac.svg",
|
||||||
|
"../svg/emoji_u1faad.svg",
|
||||||
|
"../svg/emoji_u1faae.svg",
|
||||||
|
"../svg/emoji_u1faaf.svg",
|
||||||
"../svg/emoji_u1fab0.svg",
|
"../svg/emoji_u1fab0.svg",
|
||||||
"../svg/emoji_u1fab1.svg",
|
"../svg/emoji_u1fab1.svg",
|
||||||
"../svg/emoji_u1fab2.svg",
|
"../svg/emoji_u1fab2.svg",
|
||||||
|
@ -3097,6 +3107,10 @@ srcs = [
|
||||||
"../svg/emoji_u1fab8.svg",
|
"../svg/emoji_u1fab8.svg",
|
||||||
"../svg/emoji_u1fab9.svg",
|
"../svg/emoji_u1fab9.svg",
|
||||||
"../svg/emoji_u1faba.svg",
|
"../svg/emoji_u1faba.svg",
|
||||||
|
"../svg/emoji_u1fabb.svg",
|
||||||
|
"../svg/emoji_u1fabc.svg",
|
||||||
|
"../svg/emoji_u1fabd.svg",
|
||||||
|
"../svg/emoji_u1fabf.svg",
|
||||||
"../svg/emoji_u1fac0.svg",
|
"../svg/emoji_u1fac0.svg",
|
||||||
"../svg/emoji_u1fac1.svg",
|
"../svg/emoji_u1fac1.svg",
|
||||||
"../svg/emoji_u1fac2.svg",
|
"../svg/emoji_u1fac2.svg",
|
||||||
|
@ -3118,6 +3132,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fac5_1f3fd.svg",
|
"../svg/emoji_u1fac5_1f3fd.svg",
|
||||||
"../svg/emoji_u1fac5_1f3fe.svg",
|
"../svg/emoji_u1fac5_1f3fe.svg",
|
||||||
"../svg/emoji_u1fac5_1f3ff.svg",
|
"../svg/emoji_u1fac5_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1face.svg",
|
||||||
|
"../svg/emoji_u1facf.svg",
|
||||||
"../svg/emoji_u1fad0.svg",
|
"../svg/emoji_u1fad0.svg",
|
||||||
"../svg/emoji_u1fad1.svg",
|
"../svg/emoji_u1fad1.svg",
|
||||||
"../svg/emoji_u1fad2.svg",
|
"../svg/emoji_u1fad2.svg",
|
||||||
|
@ -3128,6 +3144,8 @@ srcs = [
|
||||||
"../svg/emoji_u1fad7.svg",
|
"../svg/emoji_u1fad7.svg",
|
||||||
"../svg/emoji_u1fad8.svg",
|
"../svg/emoji_u1fad8.svg",
|
||||||
"../svg/emoji_u1fad9.svg",
|
"../svg/emoji_u1fad9.svg",
|
||||||
|
"../svg/emoji_u1fada.svg",
|
||||||
|
"../svg/emoji_u1fadb.svg",
|
||||||
"../svg/emoji_u1fae0.svg",
|
"../svg/emoji_u1fae0.svg",
|
||||||
"../svg/emoji_u1fae1.svg",
|
"../svg/emoji_u1fae1.svg",
|
||||||
"../svg/emoji_u1fae2.svg",
|
"../svg/emoji_u1fae2.svg",
|
||||||
|
@ -3136,6 +3154,7 @@ srcs = [
|
||||||
"../svg/emoji_u1fae5.svg",
|
"../svg/emoji_u1fae5.svg",
|
||||||
"../svg/emoji_u1fae6.svg",
|
"../svg/emoji_u1fae6.svg",
|
||||||
"../svg/emoji_u1fae7.svg",
|
"../svg/emoji_u1fae7.svg",
|
||||||
|
"../svg/emoji_u1fae8.svg",
|
||||||
"../svg/emoji_u1faf0.svg",
|
"../svg/emoji_u1faf0.svg",
|
||||||
"../svg/emoji_u1faf0_1f3fb.svg",
|
"../svg/emoji_u1faf0_1f3fb.svg",
|
||||||
"../svg/emoji_u1faf0_1f3fc.svg",
|
"../svg/emoji_u1faf0_1f3fc.svg",
|
||||||
|
@ -3198,6 +3217,18 @@ srcs = [
|
||||||
"../svg/emoji_u1faf6_1f3fd.svg",
|
"../svg/emoji_u1faf6_1f3fd.svg",
|
||||||
"../svg/emoji_u1faf6_1f3fe.svg",
|
"../svg/emoji_u1faf6_1f3fe.svg",
|
||||||
"../svg/emoji_u1faf6_1f3ff.svg",
|
"../svg/emoji_u1faf6_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1faf7.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fb.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fc.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fd.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3fe.svg",
|
||||||
|
"../svg/emoji_u1faf7_1f3ff.svg",
|
||||||
|
"../svg/emoji_u1faf8.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fb.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fc.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fd.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3fe.svg",
|
||||||
|
"../svg/emoji_u1faf8_1f3ff.svg",
|
||||||
"../svg/emoji_u203c.svg",
|
"../svg/emoji_u203c.svg",
|
||||||
"../svg/emoji_u2049.svg",
|
"../svg/emoji_u2049.svg",
|
||||||
"../svg/emoji_u20e3.svg",
|
"../svg/emoji_u20e3.svg",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Post-nanoemoji processing of the Noto COLRv1 Emoji file.
|
Post-nanoemoji processing of the Noto COLRv1 Emoji files.
|
||||||
|
|
||||||
|
Adds additional sequences to properly support Safari, corrects 'name', etc.
|
||||||
|
|
||||||
For now substantially based on copying from a correct bitmap build.
|
For now substantially based on copying from a correct bitmap build.
|
||||||
"""
|
"""
|
||||||
|
@ -18,9 +20,10 @@ from pathlib import Path
|
||||||
from colrv1_add_soft_light_to_flags import add_soft_light_to_flags
|
from colrv1_add_soft_light_to_flags import add_soft_light_to_flags
|
||||||
|
|
||||||
|
|
||||||
_OUTPUT_FILE = {
|
_CBDT_FILE = Path("fonts/NotoColorEmoji.ttf")
|
||||||
"NotoColorEmoji-noflags.ttf": "fonts/Noto-COLRv1-noflags.ttf",
|
_COLR_FILES = {
|
||||||
"NotoColorEmoji.ttf": "fonts/Noto-COLRv1.ttf",
|
Path("fonts/Noto-COLRv1-noflags.ttf"),
|
||||||
|
Path("fonts/Noto-COLRv1.ttf"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,14 +35,6 @@ def _is_cbdt(font):
|
||||||
return "CBDT" in font
|
return "CBDT" in font
|
||||||
|
|
||||||
|
|
||||||
def _is_compat_font(font):
|
|
||||||
return "meta" in font and "Emji" in font["meta"].data
|
|
||||||
|
|
||||||
|
|
||||||
def _copy_emojicompat_data(colr_font, cbdt_font):
|
|
||||||
colr_font["meta"] = cbdt_font["meta"]
|
|
||||||
|
|
||||||
|
|
||||||
def _set_name(name_table, nameID):
|
def _set_name(name_table, nameID):
|
||||||
name_table.getName(value, nameID, 3, 1, 0x409)
|
name_table.getName(value, nameID, 3, 1, 0x409)
|
||||||
|
|
||||||
|
@ -94,7 +89,7 @@ def _add_cmap_entries(colr_font, codepoint, glyph_name):
|
||||||
if not _is_bmp(codepoint) and table.format == 4:
|
if not _is_bmp(codepoint) and table.format == 4:
|
||||||
continue
|
continue
|
||||||
table.cmap[codepoint] = glyph_name
|
table.cmap[codepoint] = glyph_name
|
||||||
print(f"Map 0x{codepoint:04x} to {glyph_name}, format {table.format}")
|
#print(f"Map 0x{codepoint:04x} to {glyph_name}, format {table.format}")
|
||||||
|
|
||||||
|
|
||||||
FLAG_TAGS = set(range(0xE0030, 0xE0039 + 1)) | set(range(0xE0061, 0xE007A + 1))
|
FLAG_TAGS = set(range(0xE0030, 0xE0039 + 1)) | set(range(0xE0061, 0xE007A + 1))
|
||||||
|
@ -113,7 +108,7 @@ def _map_missing_flag_tag_chars_to_empty_glyphs(colr_font):
|
||||||
hmtx_table = colr_font["hmtx"]
|
hmtx_table = colr_font["hmtx"]
|
||||||
glyph_order_size = len(glyf_table.glyphOrder)
|
glyph_order_size = len(glyf_table.glyphOrder)
|
||||||
for cp in tag_cps:
|
for cp in tag_cps:
|
||||||
print(f"Map 0x{cp:04x} to a blank glyf")
|
#print(f"Map 0x{cp:04x} to a blank glyf")
|
||||||
glyph_name = f"u{cp:04X}"
|
glyph_name = f"u{cp:04X}"
|
||||||
assert glyph_name not in glyf_table, f"{glyph_name} already in glyf"
|
assert glyph_name not in glyf_table, f"{glyph_name} already in glyf"
|
||||||
assert glyph_name not in hmtx_table.metrics, f"{glyph_name} already in hmtx"
|
assert glyph_name not in hmtx_table.metrics, f"{glyph_name} already in hmtx"
|
||||||
|
@ -288,47 +283,39 @@ def _add_fallback_subs_for_unknown_flags(colr_font):
|
||||||
font_data.delete_from_cmap(colr_font, [UNKNOWN_FLAG_PUA])
|
font_data.delete_from_cmap(colr_font, [UNKNOWN_FLAG_PUA])
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def _font(path, check_fn, check_fail_str):
|
||||||
if len(argv) != 3:
|
assert path.is_file(), path
|
||||||
raise ValueError(
|
font = ttLib.TTFont(path)
|
||||||
"Must have two args, a COLRv1 font and a CBDT emojicompat font"
|
if not check_fn(font):
|
||||||
)
|
raise ValueError(path + check_fail_str)
|
||||||
|
return font
|
||||||
|
|
||||||
colr_file = Path(argv[1])
|
|
||||||
assert colr_file.is_file()
|
|
||||||
assert colr_file.name in _OUTPUT_FILE
|
|
||||||
colr_font = ttLib.TTFont(colr_file)
|
|
||||||
if not _is_colrv1(colr_font):
|
|
||||||
raise ValueError("First arg must be a COLRv1 font")
|
|
||||||
|
|
||||||
cbdt_file = Path(argv[2])
|
def main(_):
|
||||||
assert cbdt_file.is_file()
|
cbdt_font = _font(_CBDT_FILE, _is_cbdt, " must be a CBDT font")
|
||||||
cbdt_font = ttLib.TTFont(cbdt_file)
|
|
||||||
if not _is_cbdt(cbdt_font) or not _is_compat_font(cbdt_font):
|
|
||||||
raise ValueError("Second arg must be a CBDT emojicompat font")
|
|
||||||
|
|
||||||
print(f"COLR {colr_file.absolute()}")
|
for colr_file in _COLR_FILES:
|
||||||
print(f"CBDT {cbdt_file.absolute()}")
|
colr_font = _font(colr_file, _is_colrv1, " must be a COLRv1 font")
|
||||||
|
|
||||||
_copy_emojicompat_data(colr_font, cbdt_font)
|
print(f"Updating {colr_file} from {_CBDT_FILE}")
|
||||||
_copy_names(colr_font, cbdt_font)
|
|
||||||
|
|
||||||
# CBDT build step: @$(PYTHON) $(PUA_ADDER) "$@" "$@-with-pua"
|
_copy_names(colr_font, cbdt_font)
|
||||||
map_pua_emoji.add_pua_cmap_to_font(colr_font)
|
|
||||||
|
|
||||||
_add_vs_cmap(colr_font)
|
# CBDT build step: @$(PYTHON) $(PUA_ADDER) "$@" "$@-with-pua"
|
||||||
|
map_pua_emoji.add_pua_cmap_to_font(colr_font)
|
||||||
|
|
||||||
_map_missing_flag_tag_chars_to_empty_glyphs(colr_font)
|
_add_vs_cmap(colr_font)
|
||||||
|
|
||||||
add_soft_light_to_flags(colr_font)
|
_map_missing_flag_tag_chars_to_empty_glyphs(colr_font)
|
||||||
|
|
||||||
_add_vertical_layout_tables(cbdt_font, colr_font)
|
add_soft_light_to_flags(colr_font)
|
||||||
|
|
||||||
_add_fallback_subs_for_unknown_flags(colr_font)
|
_add_vertical_layout_tables(cbdt_font, colr_font)
|
||||||
|
|
||||||
out_file = Path(_OUTPUT_FILE[colr_file.name]).absolute()
|
_add_fallback_subs_for_unknown_flags(colr_font)
|
||||||
print("Writing", out_file)
|
|
||||||
colr_font.save(out_file)
|
print("Writing", colr_file)
|
||||||
|
colr_font.save(colr_file)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.3 KiB |