Output Windows compatible font with glyf + loca table

pull/323/head
Roel Nieskens 2020-11-02 14:26:15 +01:00
parent aac7ccaa4d
commit d453af82c9
3 changed files with 742 additions and 5 deletions

View File

@ -13,7 +13,8 @@
# limitations under the License.
EMOJI = NotoColorEmoji
font: $(EMOJI).ttf
EMOJI_WINDOWS = NotoColorEmoji_WindowsCompatible
all: $(EMOJI).ttf $(EMOJI_WINDOWS).ttf
CFLAGS = -std=c99 -Wall -Wextra `pkg-config --cflags --libs cairo`
LDFLAGS = -lm `pkg-config --libs cairo`
@ -108,7 +109,7 @@ RESIZED_FLAG_FILES = $(addprefix $(RESIZED_FLAGS_DIR)/, $(FLAG_NAMES))
ifndef MISSING_PY_TOOLS
FLAG_GLYPH_NAMES = $(shell $(PYTHON) flag_glyph_name.py $(FLAGS))
else
FLAG_GLYPH_NAMES =
FLAG_GLYPH_NAMES =
endif
RENAMED_FLAG_NAMES = $(FLAG_GLYPH_NAMES:%=emoji_%.png)
RENAMED_FLAG_FILES = $(addprefix $(RENAMED_FLAGS_DIR)/, $(RENAMED_FLAG_NAMES))
@ -199,8 +200,11 @@ $(COMPRESSED_DIR)/%.png: $(QUANTIZED_DIR)/%.png | check_tools $(COMPRESSED_DIR)
# ...
# Run make without -j if this happens.
%.ttx: %.ttx.tmpl $(ADD_GLYPHS) $(ALL_COMPRESSED_FILES)
@$(PYTHON) $(ADD_GLYPHS) -f "$<" -o "$@" -d "$(COMPRESSED_DIR)" $(ADD_GLYPHS_FLAGS)
$(EMOJI).tmpl.ttx: $(EMOJI).tmpl.ttx.tmpl $(ADD_GLYPHS) $(ALL_COMPRESSED_FILES)
$(PYTHON) $(ADD_GLYPHS) -f "$<" -o "$@" -d "$(COMPRESSED_DIR)" $(ADD_GLYPHS_FLAGS)
$(EMOJI_WINDOWS).tmpl.ttx: $(EMOJI_WINDOWS).tmpl.ttx.tmpl $(ADD_GLYPHS) $(ALL_COMPRESSED_FILES)
$(PYTHON) $(ADD_GLYPHS) -f "$<" -o "$@" -d "$(COMPRESSED_DIR)" $(ADD_GLYPHS_FLAGS)
%.ttf: %.ttx
@rm -f "$@"
@ -215,6 +219,16 @@ $(EMOJI).ttf: check_sequence $(EMOJI).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) \
@mv "$@-with-pua-varsel" "$@"
@rm "$@-with-pua"
$(EMOJI_WINDOWS).ttf: check_sequence $(EMOJI_WINDOWS).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) \
$(ALL_COMPRESSED_FILES) | check_tools
@$(PYTHON) $(EMOJI_BUILDER) -O $(SMALL_METRICS) -V $(word 2,$^) "$@" "$(COMPRESSED_DIR)/emoji_u"
@$(PYTHON) $(PUA_ADDER) "$@" "$@-with-pua"
@$(VS_ADDER) -vs 2640 2642 2695 --dstdir '.' -o "$@-with-pua-varsel" "$@-with-pua"
@mv "$@-with-pua-varsel" "$@"
@rm "$@-with-pua"
check_sequence:
ifdef BYPASS_SEQUENCE_CHECK
@echo Bypassing the emoji sequence checks
@ -223,7 +237,7 @@ else
endif
clean:
rm -f $(EMOJI).ttf $(EMOJI).tmpl.ttf $(EMOJI).tmpl.ttx
rm -f $(EMOJI).ttf $(EMOJI_WINDOWS).ttf $(EMOJI).tmpl.ttf $(EMOJI_WINDOWS).tmpl.ttf $(EMOJI).tmpl.ttx $(EMOJI_WINDOWS).tmpl.ttx
rm -f waveflag
rm -rf $(BUILD_DIR)

View File

@ -0,0 +1,711 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.6">
<GlyphOrder>
<!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
<GlyphID id="0" name=".notdef"/>
<GlyphID id="1" name="null"/>
<GlyphID id="2" name="nonmarkingreturn"/>
<GlyphID id="3" name="space"/>
<GlyphID id="4" name="uni200D"/>
<GlyphID id="5" name="uE0030"/>
<GlyphID id="6" name="uE0031"/>
<GlyphID id="7" name="uE0032"/>
<GlyphID id="8" name="uE0033"/>
<GlyphID id="9" name="uE0034"/>
<GlyphID id="10" name="uE0035"/>
<GlyphID id="11" name="uE0036"/>
<GlyphID id="12" name="uE0037"/>
<GlyphID id="13" name="uE0038"/>
<GlyphID id="14" name="uE0039"/>
<GlyphID id="15" name="uE0061"/>
<GlyphID id="16" name="uE0062"/>
<GlyphID id="17" name="uE0063"/>
<GlyphID id="18" name="uE0064"/>
<GlyphID id="19" name="uE0065"/>
<GlyphID id="20" name="uE0066"/>
<GlyphID id="21" name="uE0067"/>
<GlyphID id="22" name="uE0068"/>
<GlyphID id="23" name="uE0069"/>
<GlyphID id="24" name="uE006A"/>
<GlyphID id="25" name="uE006B"/>
<GlyphID id="26" name="uE006C"/>
<GlyphID id="27" name="uE006D"/>
<GlyphID id="28" name="uE006E"/>
<GlyphID id="29" name="uE006F"/>
<GlyphID id="30" name="uE0070"/>
<GlyphID id="31" name="uE0071"/>
<GlyphID id="32" name="uE0072"/>
<GlyphID id="33" name="uE0073"/>
<GlyphID id="34" name="uE0074"/>
<GlyphID id="35" name="uE0075"/>
<GlyphID id="36" name="uE0076"/>
<GlyphID id="37" name="uE0077"/>
<GlyphID id="38" name="uE0078"/>
<GlyphID id="39" name="uE0079"/>
<GlyphID id="40" name="uE007A"/>
<GlyphID id="41" name="uE007F"/>
<GlyphID id="42" name="u1F3F4"/>
<GlyphID id="43" name="uFE82B"/>
<GlyphID id="44" name="u1F1E6"/>
<GlyphID id="45" name="u1F1E7"/>
<GlyphID id="46" name="u1F1E8"/>
<GlyphID id="47" name="u1F1E9"/>
<GlyphID id="48" name="u1F1EA"/>
<GlyphID id="49" name="u1F1EB"/>
<GlyphID id="50" name="u1F1EC"/>
<GlyphID id="51" name="u1F1ED"/>
<GlyphID id="52" name="u1F1EE"/>
<GlyphID id="53" name="u1F1EF"/>
<GlyphID id="54" name="u1F1F0"/>
<GlyphID id="55" name="u1F1F1"/>
<GlyphID id="56" name="u1F1F2"/>
<GlyphID id="57" name="u1F1F3"/>
<GlyphID id="58" name="u1F1F4"/>
<GlyphID id="59" name="u1F1F5"/>
<GlyphID id="60" name="u1F1F6"/>
<GlyphID id="61" name="u1F1F7"/>
<GlyphID id="62" name="u1F1F8"/>
<GlyphID id="63" name="u1F1F9"/>
<GlyphID id="64" name="u1F1FA"/>
<GlyphID id="65" name="u1F1FB"/>
<GlyphID id="66" name="u1F1FC"/>
<GlyphID id="67" name="u1F1FD"/>
<GlyphID id="68" name="u1F1FE"/>
<GlyphID id="69" name="u1F1FF"/>
</GlyphOrder>
<head>
<!-- Most of this table will be recalculated by the compiler -->
<tableVersion value="1.0"/>
<fontRevision value="2.020"/>
<checkSumAdjustment value="0x4d5a161a"/>
<magicNumber value="0x5f0f3cf5"/>
<flags value="00000000 00001011"/>
<unitsPerEm value="2048"/>
<created value="Wed May 22 20:00:43 2013"/>
<modified value="Wed May 22 20:00:43 2013"/>
<xMin value="0"/>
<yMin value="-500"/>
<xMax value="2550"/>
<yMax value="1900"/>
<macStyle value="00000000 00000000"/>
<lowestRecPPEM value="8"/>
<fontDirectionHint value="2"/>
<indexToLocFormat value="0"/>
<glyphDataFormat value="0"/>
</head>
<hhea>
<tableVersion value="0x00010000"/>
<ascent value="1900"/>
<descent value="-500"/>
<lineGap value="0"/>
<advanceWidthMax value="2550"/>
<minLeftSideBearing value="0"/>
<minRightSideBearing value="0"/>
<xMaxExtent value="2550"/>
<caretSlopeRise value="1"/>
<caretSlopeRun value="0"/>
<caretOffset value="0"/>
<reserved0 value="0"/>
<reserved1 value="0"/>
<reserved2 value="0"/>
<reserved3 value="0"/>
<metricDataFormat value="0"/>
<numberOfHMetrics value="4"/>
</hhea>
<maxp>
<!-- Most of this table will be recalculated by the compiler -->
<tableVersion value="0x10000"/>
<numGlyphs value="70"/>
<maxPoints value="8"/>
<maxContours value="2"/>
<maxCompositePoints value="0"/>
<maxCompositeContours value="0"/>
<maxZones value="2"/>
<maxTwilightPoints value="0"/>
<maxStorage value="1"/>
<maxFunctionDefs value="1"/>
<maxInstructionDefs value="0"/>
<maxStackElements value="64"/>
<maxSizeOfInstructions value="46"/>
<maxComponentElements value="0"/>
<maxComponentDepth value="0"/>
</maxp>
<OS_2>
<version value="4"/>
<xAvgCharWidth value="2550"/>
<usWeightClass value="400"/>
<usWidthClass value="5"/>
<fsType value="00000000 00000000"/>
<ySubscriptXSize value="1331"/>
<ySubscriptYSize value="1433"/>
<ySubscriptXOffset value="0"/>
<ySubscriptYOffset value="286"/>
<ySuperscriptXSize value="1331"/>
<ySuperscriptYSize value="1433"/>
<ySuperscriptXOffset value="0"/>
<ySuperscriptYOffset value="983"/>
<yStrikeoutSize value="102"/>
<yStrikeoutPosition value="530"/>
<sFamilyClass value="0"/>
<panose>
<bFamilyType value="2"/>
<bSerifStyle value="0"/>
<bWeight value="6"/>
<bProportion value="9"/>
<bContrast value="0"/>
<bStrokeVariation value="0"/>
<bArmStyle value="0"/>
<bLetterForm value="0"/>
<bMidline value="0"/>
<bXHeight value="0"/>
</panose>
<ulUnicodeRange1 value="00000000 00000000 00000000 00000001"/>
<ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
<ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
<ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
<achVendID value="GOOG"/>
<fsSelection value="00000000 01000000"/>
<usFirstCharIndex value="0"/>
<usLastCharIndex value="65535"/>
<sTypoAscender value="1900"/>
<sTypoDescender value="-500"/>
<sTypoLineGap value="0"/>
<usWinAscent value="1900"/>
<usWinDescent value="500"/>
<ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
<ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
<sxHeight value="0"/>
<sCapHeight value="1900"/>
<usDefaultChar value="0"/>
<usBreakChar value="32"/>
<usMaxContext value="1"/>
</OS_2>
<hmtx>
<mtx name=".notdef" width="2550" lsb="0"/>
<mtx name="null" width="0" lsb="0"/>
<mtx name="nonmarkingreturn" width="2550" lsb="0"/>
<mtx name="space" width="2550" lsb="0"/>
</hmtx>
<vhea>
<tableVersion value="0x00010000"/>
<ascent value="1275"/>
<descent value="-1275"/>
<lineGap value="0"/>
<advanceHeightMax value="2500"/>
<minTopSideBearing value="0"/>
<minBottomSideBearing value="0"/>
<yMaxExtent value="2400"/>
<caretSlopeRise value="0"/>
<caretSlopeRun value="1"/>
<caretOffset value="0"/>
<reserved1 value="0"/>
<reserved2 value="0"/>
<reserved3 value="0"/>
<reserved4 value="0"/>
<metricDataFormat value="0"/>
<numberOfVMetrics value="1"/>
</vhea>
<vmtx>
<mtx name=".notdef" height="2500" tsb="0"/>
<mtx name="null" height="0" tsb="0"/>
<mtx name="nonmarkingreturn" height="2500" tsb="0"/>
<mtx name="space" height="2500" tsb="0"/>
</vmtx>
<cmap>
<tableVersion version="0"/>
<cmap_format_12 platformID="3" platEncID="10" language="0" format="12" reserved="0" length="1" nGroups="1">
<map code="0x0" name="null"/><!-- &lt;control> -->
<map code="0xd" name="nonmarkingreturn"/>
<map code="0x20" name="space"/>
</cmap_format_12>
</cmap>
<loca>
<!-- The 'loca' table will be calculated by the compiler -->
</loca>
<glyf>
<TTGlyph name=".notdef"/>
<TTGlyph name="null"/>
<TTGlyph name="nonmarkingreturn"/>
<TTGlyph name="space"/>
<TTGlyph name="uni200D"/>
<TTGlyph name="uE0030"/>
<TTGlyph name="uE0031"/>
<TTGlyph name="uE0032"/>
<TTGlyph name="uE0033"/>
<TTGlyph name="uE0034"/>
<TTGlyph name="uE0035"/>
<TTGlyph name="uE0036"/>
<TTGlyph name="uE0037"/>
<TTGlyph name="uE0038"/>
<TTGlyph name="uE0039"/>
<TTGlyph name="uE0061"/>
<TTGlyph name="uE0062"/>
<TTGlyph name="uE0063"/>
<TTGlyph name="uE0064"/>
<TTGlyph name="uE0065"/>
<TTGlyph name="uE0066"/>
<TTGlyph name="uE0067"/>
<TTGlyph name="uE0068"/>
<TTGlyph name="uE0069"/>
<TTGlyph name="uE006A"/>
<TTGlyph name="uE006B"/>
<TTGlyph name="uE006C"/>
<TTGlyph name="uE006D"/>
<TTGlyph name="uE006E"/>
<TTGlyph name="uE006F"/>
<TTGlyph name="uE0070"/>
<TTGlyph name="uE0071"/>
<TTGlyph name="uE0072"/>
<TTGlyph name="uE0073"/>
<TTGlyph name="uE0074"/>
<TTGlyph name="uE0075"/>
<TTGlyph name="uE0076"/>
<TTGlyph name="uE0077"/>
<TTGlyph name="uE0078"/>
<TTGlyph name="uE0079"/>
<TTGlyph name="uE007A"/>
<TTGlyph name="uE007F"/>
<TTGlyph name="u1F3F4"/>
<TTGlyph name="uFE82B"/>
<TTGlyph name="u1F1E6"/>
<TTGlyph name="u1F1E7"/>
<TTGlyph name="u1F1E8"/>
<TTGlyph name="u1F1E9"/>
<TTGlyph name="u1F1EA"/>
<TTGlyph name="u1F1EB"/>
<TTGlyph name="u1F1EC"/>
<TTGlyph name="u1F1ED"/>
<TTGlyph name="u1F1EE"/>
<TTGlyph name="u1F1EF"/>
<TTGlyph name="u1F1F0"/>
<TTGlyph name="u1F1F1"/>
<TTGlyph name="u1F1F2"/>
<TTGlyph name="u1F1F3"/>
<TTGlyph name="u1F1F4"/>
<TTGlyph name="u1F1F5"/>
<TTGlyph name="u1F1F6"/>
<TTGlyph name="u1F1F7"/>
<TTGlyph name="u1F1F8"/>
<TTGlyph name="u1F1F9"/>
<TTGlyph name="u1F1FA"/>
<TTGlyph name="u1F1FB"/>
<TTGlyph name="u1F1FC"/>
<TTGlyph name="u1F1FD"/>
<TTGlyph name="u1F1FE"/>
<TTGlyph name="u1F1FF"/>
</glyf>
<name>
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
Copyright 2013 Google Inc.
</namerecord>
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
Noto Color Emoji
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Regular
</namerecord>
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
Noto Color Emoji
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
Noto Color Emoji
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Version 2.020;GOOG;noto-emoji:20200914:BETA
</namerecord>
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
NotoColorEmoji
</namerecord>
<namerecord nameID="7" platformID="3" platEncID="1" langID="0x409">
Noto is a trademark of Google Inc.
</namerecord>
<namerecord nameID="8" platformID="3" platEncID="1" langID="0x409">
Google, Inc.
</namerecord>
<namerecord nameID="9" platformID="3" platEncID="1" langID="0x409">
Google, Inc.
</namerecord>
<namerecord nameID="10" platformID="3" platEncID="1" langID="0x409">
Color emoji font using CBDT glyph data.
</namerecord>
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
http://www.google.com/get/noto/
</namerecord>
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
http://www.google.com/get/noto/
</namerecord>
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software.
</namerecord>
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
http://scripts.sil.org/OFL
</namerecord>
</name>
<post>
<formatType value="3.0"/>
<italicAngle value="0.0"/>
<underlinePosition value="-1244"/>
<underlineThickness value="131"/>
<isFixedPitch value="1"/>
<minMemType42 value="0"/>
<maxMemType42 value="0"/>
<minMemType1 value="0"/>
<maxMemType1 value="0"/>
</post>
<GSUB>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="ccmp"/>
<Feature>
<!-- LookupCount=4 -->
<LookupListIndex index="0" value="0"/>
<LookupListIndex index="1" value="2"/>
<LookupListIndex index="2" value="3"/>
<LookupListIndex index="3" value="4"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=5 -->
<Lookup index="0">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<LigatureSubst index="0" Format="1">
</LigatureSubst>
</Lookup>
<Lookup index="1">
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MultipleSubst index="0" Format="1">
<Substitution in="u1F1E6" out=""/>
<Substitution in="u1F1E7" out=""/>
<Substitution in="u1F1E8" out=""/>
<Substitution in="u1F1E9" out=""/>
<Substitution in="u1F1EA" out=""/>
<Substitution in="u1F1EB" out=""/>
<Substitution in="u1F1EC" out=""/>
<Substitution in="u1F1ED" out=""/>
<Substitution in="u1F1EE" out=""/>
<Substitution in="u1F1EF" out=""/>
<Substitution in="u1F1F0" out=""/>
<Substitution in="u1F1F1" out=""/>
<Substitution in="u1F1F2" out=""/>
<Substitution in="u1F1F3" out=""/>
<Substitution in="u1F1F4" out=""/>
<Substitution in="u1F1F5" out=""/>
<Substitution in="u1F1F6" out=""/>
<Substitution in="u1F1F7" out=""/>
<Substitution in="u1F1F8" out=""/>
<Substitution in="u1F1F9" out=""/>
<Substitution in="u1F1FA" out=""/>
<Substitution in="u1F1FB" out=""/>
<Substitution in="u1F1FC" out=""/>
<Substitution in="u1F1FD" out=""/>
<Substitution in="u1F1FE" out=""/>
<Substitution in="u1F1FF" out=""/>
<Substitution in="uE0030" out=""/>
<Substitution in="uE0031" out=""/>
<Substitution in="uE0032" out=""/>
<Substitution in="uE0033" out=""/>
<Substitution in="uE0034" out=""/>
<Substitution in="uE0035" out=""/>
<Substitution in="uE0036" out=""/>
<Substitution in="uE0037" out=""/>
<Substitution in="uE0038" out=""/>
<Substitution in="uE0039" out=""/>
<Substitution in="uE0061" out=""/>
<Substitution in="uE0062" out=""/>
<Substitution in="uE0063" out=""/>
<Substitution in="uE0064" out=""/>
<Substitution in="uE0065" out=""/>
<Substitution in="uE0066" out=""/>
<Substitution in="uE0067" out=""/>
<Substitution in="uE0068" out=""/>
<Substitution in="uE0069" out=""/>
<Substitution in="uE006A" out=""/>
<Substitution in="uE006B" out=""/>
<Substitution in="uE006C" out=""/>
<Substitution in="uE006D" out=""/>
<Substitution in="uE006E" out=""/>
<Substitution in="uE006F" out=""/>
<Substitution in="uE0070" out=""/>
<Substitution in="uE0071" out=""/>
<Substitution in="uE0072" out=""/>
<Substitution in="uE0073" out=""/>
<Substitution in="uE0074" out=""/>
<Substitution in="uE0075" out=""/>
<Substitution in="uE0076" out=""/>
<Substitution in="uE0077" out=""/>
<Substitution in="uE0078" out=""/>
<Substitution in="uE0079" out=""/>
<Substitution in="uE007A" out=""/>
</MultipleSubst>
</Lookup>
<Lookup index="2">
<LookupType value="6"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
<Coverage Format="2">
<Glyph value="uE0030"/>
<Glyph value="uE0031"/>
<Glyph value="uE0032"/>
<Glyph value="uE0033"/>
<Glyph value="uE0034"/>
<Glyph value="uE0035"/>
<Glyph value="uE0036"/>
<Glyph value="uE0037"/>
<Glyph value="uE0038"/>
<Glyph value="uE0039"/>
<Glyph value="uE0061"/>
<Glyph value="uE0062"/>
<Glyph value="uE0063"/>
<Glyph value="uE0064"/>
<Glyph value="uE0065"/>
<Glyph value="uE0066"/>
<Glyph value="uE0067"/>
<Glyph value="uE0068"/>
<Glyph value="uE0069"/>
<Glyph value="uE006A"/>
<Glyph value="uE006B"/>
<Glyph value="uE006C"/>
<Glyph value="uE006D"/>
<Glyph value="uE006E"/>
<Glyph value="uE006F"/>
<Glyph value="uE0070"/>
<Glyph value="uE0071"/>
<Glyph value="uE0072"/>
<Glyph value="uE0073"/>
<Glyph value="uE0074"/>
<Glyph value="uE0075"/>
<Glyph value="uE0076"/>
<Glyph value="uE0077"/>
<Glyph value="uE0078"/>
<Glyph value="uE0079"/>
<Glyph value="uE007A"/>
</Coverage>
<BacktrackClassDef Format="1">
<ClassDef glyph="u1F3F4" class="1"/>
<ClassDef glyph="uE007F" class="1"/>
</BacktrackClassDef>
<InputClassDef Format="2">
<ClassDef glyph="uE0030" class="2"/>
<ClassDef glyph="uE0031" class="2"/>
<ClassDef glyph="uE0032" class="2"/>
<ClassDef glyph="uE0033" class="2"/>
<ClassDef glyph="uE0034" class="2"/>
<ClassDef glyph="uE0035" class="2"/>
<ClassDef glyph="uE0036" class="2"/>
<ClassDef glyph="uE0037" class="2"/>
<ClassDef glyph="uE0038" class="2"/>
<ClassDef glyph="uE0039" class="2"/>
<ClassDef glyph="uE0061" class="2"/>
<ClassDef glyph="uE0062" class="2"/>
<ClassDef glyph="uE0063" class="2"/>
<ClassDef glyph="uE0064" class="2"/>
<ClassDef glyph="uE0065" class="2"/>
<ClassDef glyph="uE0066" class="2"/>
<ClassDef glyph="uE0067" class="2"/>
<ClassDef glyph="uE0068" class="2"/>
<ClassDef glyph="uE0069" class="2"/>
<ClassDef glyph="uE006A" class="2"/>
<ClassDef glyph="uE006B" class="2"/>
<ClassDef glyph="uE006C" class="2"/>
<ClassDef glyph="uE006D" class="2"/>
<ClassDef glyph="uE006E" class="2"/>
<ClassDef glyph="uE006F" class="2"/>
<ClassDef glyph="uE0070" class="2"/>
<ClassDef glyph="uE0071" class="2"/>
<ClassDef glyph="uE0072" class="2"/>
<ClassDef glyph="uE0073" class="2"/>
<ClassDef glyph="uE0074" class="2"/>
<ClassDef glyph="uE0075" class="2"/>
<ClassDef glyph="uE0076" class="2"/>
<ClassDef glyph="uE0077" class="2"/>
<ClassDef glyph="uE0078" class="2"/>
<ClassDef glyph="uE0079" class="2"/>
<ClassDef glyph="uE007A" class="2"/>
</InputClassDef>
<LookAheadClassDef Format="2">
</LookAheadClassDef>
<!-- ChainSubClassSetCount=3 -->
<ChainSubClassSet index="0" empty="1"/>
<ChainSubClassSet index="1" empty="1"/>
<ChainSubClassSet index="2">
<!-- ChainSubClassRuleCount=1 -->
<ChainSubClassRule index="0">
<!-- BacktrackGlyphCount=1 -->
<Backtrack index="0" value="1"/>
<!-- InputGlyphCount=1 -->
<!-- LookAheadGlyphCount=0 -->
<!-- SubstCount=1 -->
<SubstLookupRecord index="0">
<SequenceIndex value="0"/>
<LookupListIndex value="1"/>
</SubstLookupRecord>
</ChainSubClassRule>
</ChainSubClassSet>
</ChainContextSubst>
</Lookup>
<Lookup index="3">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<LigatureSubst index="0" Format="1">
<LigatureSet glyph="u1F3F4">
<Ligature components="uE007F" glyph="uFE82B"/>
</LigatureSet>
<LigatureSet glyph="uE007F">
<Ligature components="u1F3F4" glyph="uFE82B"/>
</LigatureSet>
</LigatureSubst>
</Lookup>
<Lookup index="4">
<LookupType value="5"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
<Coverage Format="2">
<Glyph value="u1F1E6"/>
<Glyph value="u1F1E7"/>
<Glyph value="u1F1E8"/>
<Glyph value="u1F1E9"/>
<Glyph value="u1F1EA"/>
<Glyph value="u1F1EB"/>
<Glyph value="u1F1EC"/>
<Glyph value="u1F1ED"/>
<Glyph value="u1F1EE"/>
<Glyph value="u1F1EF"/>
<Glyph value="u1F1F0"/>
<Glyph value="u1F1F1"/>
<Glyph value="u1F1F2"/>
<Glyph value="u1F1F3"/>
<Glyph value="u1F1F4"/>
<Glyph value="u1F1F5"/>
<Glyph value="u1F1F6"/>
<Glyph value="u1F1F7"/>
<Glyph value="u1F1F8"/>
<Glyph value="u1F1F9"/>
<Glyph value="u1F1FA"/>
<Glyph value="u1F1FB"/>
<Glyph value="u1F1FC"/>
<Glyph value="u1F1FD"/>
<Glyph value="u1F1FE"/>
<Glyph value="u1F1FF"/>
</Coverage>
<ClassDef Format="2">
<ClassDef glyph="u1F1E6" class="1"/>
<ClassDef glyph="u1F1E7" class="1"/>
<ClassDef glyph="u1F1E8" class="1"/>
<ClassDef glyph="u1F1E9" class="1"/>
<ClassDef glyph="u1F1EA" class="1"/>
<ClassDef glyph="u1F1EB" class="1"/>
<ClassDef glyph="u1F1EC" class="1"/>
<ClassDef glyph="u1F1ED" class="1"/>
<ClassDef glyph="u1F1EE" class="1"/>
<ClassDef glyph="u1F1EF" class="1"/>
<ClassDef glyph="u1F1F0" class="1"/>
<ClassDef glyph="u1F1F1" class="1"/>
<ClassDef glyph="u1F1F2" class="1"/>
<ClassDef glyph="u1F1F3" class="1"/>
<ClassDef glyph="u1F1F4" class="1"/>
<ClassDef glyph="u1F1F5" class="1"/>
<ClassDef glyph="u1F1F6" class="1"/>
<ClassDef glyph="u1F1F7" class="1"/>
<ClassDef glyph="u1F1F8" class="1"/>
<ClassDef glyph="u1F1F9" class="1"/>
<ClassDef glyph="u1F1FA" class="1"/>
<ClassDef glyph="u1F1FB" class="1"/>
<ClassDef glyph="u1F1FC" class="1"/>
<ClassDef glyph="u1F1FD" class="1"/>
<ClassDef glyph="u1F1FE" class="1"/>
<ClassDef glyph="u1F1FF" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
<SubClassSet index="0" empty="1"/>
<SubClassSet index="1">
<!-- SubClassRuleCount=1 -->
<SubClassRule index="0">
<!-- GlyphCount=2 -->
<!-- SubstCount=2 -->
<Class index="0" value="1"/>
<SubstLookupRecord index="0">
<SequenceIndex value="0"/>
<LookupListIndex value="5"/>
</SubstLookupRecord>
<SubstLookupRecord index="1">
<SequenceIndex value="1"/>
<LookupListIndex value="1"/>
</SubstLookupRecord>
</SubClassRule>
</SubClassSet>
</ContextSubst>
</Lookup>
<Lookup index="5">
<LookupType value="1"/>
<LookupFlag value="0"/>
<SingleSubst index="0" Format="1">
<Substitution in="u1F1E6" out="uFE82B"/>
<Substitution in="u1F1E7" out="uFE82B"/>
<Substitution in="u1F1E8" out="uFE82B"/>
<Substitution in="u1F1E9" out="uFE82B"/>
<Substitution in="u1F1EA" out="uFE82B"/>
<Substitution in="u1F1EB" out="uFE82B"/>
<Substitution in="u1F1EC" out="uFE82B"/>
<Substitution in="u1F1ED" out="uFE82B"/>
<Substitution in="u1F1EE" out="uFE82B"/>
<Substitution in="u1F1EF" out="uFE82B"/>
<Substitution in="u1F1F0" out="uFE82B"/>
<Substitution in="u1F1F1" out="uFE82B"/>
<Substitution in="u1F1F2" out="uFE82B"/>
<Substitution in="u1F1F3" out="uFE82B"/>
<Substitution in="u1F1F4" out="uFE82B"/>
<Substitution in="u1F1F5" out="uFE82B"/>
<Substitution in="u1F1F6" out="uFE82B"/>
<Substitution in="u1F1F7" out="uFE82B"/>
<Substitution in="u1F1F8" out="uFE82B"/>
<Substitution in="u1F1F9" out="uFE82B"/>
<Substitution in="u1F1FA" out="uFE82B"/>
<Substitution in="u1F1FB" out="uFE82B"/>
<Substitution in="u1F1FC" out="uFE82B"/>
<Substitution in="u1F1FD" out="uFE82B"/>
<Substitution in="u1F1FE" out="uFE82B"/>
<Substitution in="u1F1FF" out="uFE82B"/>
</SingleSubst>
</Lookup>
</LookupList>
</GSUB>
</ttFont>

View File

@ -18,6 +18,9 @@ import sys
from fontTools import ttx
from fontTools.ttLib.tables import otTables
from fontTools.ttLib import newTable
from fontTools.pens.ttGlyphPen import TTGlyphPen
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
import add_emoji_gsub
import add_aliases
@ -158,10 +161,17 @@ def add_glyph_data(font, seqs, seq_to_advance, vadvance):
#
# The added codepoints have no advance information, so will get a zero
# advance.
#
# If a glyf table is present, empty glyphs will be added to ensure
# compatibility with systems requiring a glyf table, like Windows 10.
cmap = get_font_cmap(font)
hmtx = font['hmtx'].metrics
vmtx = font['vmtx'].metrics
if 'glyf' in font:
pen = TTGlyphPen(None)
empty_glyph = pen.glyph()
glyf = font['glyf']
# We don't expect sequences to be in the glyphOrder, since we removed all the
# single-cp sequences from it and don't expect it to already contain names
@ -186,6 +196,8 @@ def add_glyph_data(font, seqs, seq_to_advance, vadvance):
if name not in reverseGlyphMap:
font.glyphOrder.append(name)
updatedGlyphOrder=True
if 'glyf' in font:
glyf[name] = empty_glyph
if updatedGlyphOrder:
delattr(font, '_reverseGlyphOrderDict')