Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup mark + mkmk GPOS features #109

Merged
merged 15 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fontbakery[googlefonts]==0.10.4
fontmake==3.6.1
gftools==0.9.38
fontbakery[googlefonts]==0.12.3
fontmake==3.9.0
gftools==0.9.54
nanoemoji==0.15.1
skia-pathops==0.8.0
skia-pathops==0.8.0.post1
11 changes: 10 additions & 1 deletion scripts/assembleSources.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def breakOutLayers(familyName, source, style, outputPath):
extraTracking = style.get("tracking", 0)
trackingOffset = style.get("trackingOffset", 0)
decomposeAllLayers = style.get("decompose", False)
deleteAnchors = style.get("deleteAnchors", False)

exceptionsSourcePath = style.get("exceptionsSource")
exceptionsFont = (
Expand All @@ -46,7 +47,10 @@ def breakOutLayers(familyName, source, style, outputPath):
sourceGlyph = sourceFont[glyph.name]
newFont[glyph.name] = sourceGlyph.copy()
newGlyph = newFont[glyph.name]
newGlyph.clear()
newGlyph.clearContours()
newGlyph.clearComponents()
newGlyph.clearGuidelines()

decomposeLayers = (
(decomposeAllLayers and len(sourceGlyph.components) > 1)
or bool(sourceGlyph.contours and sourceGlyph.components)
Expand Down Expand Up @@ -115,6 +119,10 @@ def breakOutLayers(familyName, source, style, outputPath):
sourceGlyph = exceptionsFont[glyph.name]
newFont[glyph.name] = sourceGlyph.copy()

if deleteAnchors:
for glyph in newFont:
glyph.clearAnchors()

computeWinAscentDescent(newFont)
newFont.save(outputPath, overwrite=True)

Expand Down Expand Up @@ -236,6 +244,7 @@ def moveGlyphHor(glyph, dx):
tracking=100,
trackingOffset=115,
decompose=True,
deleteAnchors=True,
exceptionsSource="sources/1-drawing/Bungee-Shade-Exceptions.ufo",
),
],
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="A" format="2">
<advance height="1000" width="730"/>
<unicode hex="0041"/>
<anchor x="365" y="747" name="top"/>
<outline>
<contour>
<point x="330" y="510" type="line"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="A.v" format="2">
<advance height="849" width="1000"/>
<unicode hex="FF21"/>
<unicode hex="FF41"/>
<outline>
<contour>
<point x="366" y="720" type="line"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_acute.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Aacute" format="2">
<advance height="1000" width="730"/>
<unicode hex="00C1"/>
<anchor x="365.0" y="969.0" name="top"/>
<outline>
<component base="A"/>
<component base="acute" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Aacute.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E102"/>
<anchor x="378.0" y="969.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="acute" xOffset="128"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Aacute.salt_v" format="2">
<advance height="1015" width="1000"/>
<unicode hex="E1EF"/>
<anchor x="500.0" y="929.0" name="top"/>
<outline>
<component base="acute" xOffset="250" yOffset="-40"/>
<component base="A.salt_s_v"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_acute.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Aacute.v" format="2">
<advance height="1015" width="1000"/>
<unicode hex="E18B"/>
<anchor x="501.0" y="929.0" name="top"/>
<outline>
<component base="A.s_v"/>
<component base="acute" xOffset="251" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_breve.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Abreve" format="2">
<advance height="1000" width="730"/>
<unicode hex="0102"/>
<anchor x="365.0" y="990.0" name="top"/>
<outline>
<component base="A"/>
<component base="breve" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Abreve.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E108"/>
<anchor x="368.0" y="990.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="breve" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Abreve.salt_v" format="2">
<advance height="1031" width="1000"/>
<unicode hex="E1F5"/>
<anchor x="500.0" y="950.0" name="top"/>
<outline>
<component base="A.salt_s_v"/>
<component base="breve" xOffset="250" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_breve.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Abreve.v" format="2">
<advance height="1031" width="1000"/>
<unicode hex="E191"/>
<anchor x="501.0" y="950.0" name="top"/>
<outline>
<component base="A.s_v"/>
<component base="breve" xOffset="251" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_caron.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acaron" format="2">
<advance height="1000" width="730"/>
<unicode hex="01CD"/>
<anchor x="365.0" y="987.0" name="top"/>
<outline>
<component base="A"/>
<component base="caron" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acircumflex" format="2">
<advance height="1000" width="730"/>
<unicode hex="00C2"/>
<anchor x="365.0" y="996.0" name="top"/>
<outline>
<component base="A"/>
<component base="circumflex" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acircumflex.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E103"/>
<anchor x="368.0" y="996.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="circumflex" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acircumflex.salt_v" format="2">
<advance height="1021" width="1000"/>
<unicode hex="E1F0"/>
<anchor x="500.0" y="956.0" name="top"/>
<outline>
<component base="A.salt_s_v"/>
<component base="circumflex" xOffset="250" yOffset="-40"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acircumflex.v" format="2">
<advance height="1021" width="1000"/>
<unicode hex="E18C"/>
<anchor x="501.0" y="956.0" name="top"/>
<outline>
<component base="circumflex" xOffset="251" yOffset="-40"/>
<component base="A.s_v"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Acircumflexdotbelow" format="2">
<advance height="1000" width="730"/>
<unicode hex="1EAC"/>
<anchor x="365.0" y="-28.0" name="top"/>
<outline>
<component base="Acircumflex"/>
<component base="dotaccent" xOffset="114" yOffset="-1000"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Adieresis" format="2">
<advance height="1000" width="730"/>
<unicode hex="00C4"/>
<anchor x="362.0" y="968.0" name="top"/>
<outline>
<component base="A"/>
<component base="dieresis" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Adieresis.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E105"/>
<anchor x="365.0" y="968.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="dieresis" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Adieresis.salt_v" format="2">
<advance height="1016" width="1000"/>
<unicode hex="E1F2"/>
<anchor x="497.0" y="928.0" name="top"/>
<outline>
<component base="A.salt_s_v"/>
<component base="dieresis" xOffset="250" yOffset="-40"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Adieresis.v" format="2">
<advance height="1016" width="1000"/>
<unicode hex="E18E"/>
<anchor x="498.0" y="928.0" name="top"/>
<outline>
<component base="dieresis" xOffset="251" yOffset="-40"/>
<component base="A.s_v"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_grave.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Agrave" format="2">
<advance height="1000" width="730"/>
<unicode hex="00C0"/>
<anchor x="365.0" y="966.0" name="top"/>
<outline>
<component base="A"/>
<component base="grave" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Agrave.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E101"/>
<anchor x="368.0" y="966.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="grave" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Agrave.salt_v" format="2">
<advance height="1015" width="1000"/>
<unicode hex="E1EE"/>
<anchor x="500.0" y="926.0" name="top"/>
<outline>
<component base="grave" xOffset="250" yOffset="-40"/>
<component base="A.salt_s_v"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_grave.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Agrave.v" format="2">
<advance height="1015" width="1000"/>
<unicode hex="E18A"/>
<anchor x="501.0" y="926.0" name="top"/>
<outline>
<component base="A.s_v"/>
<component base="grave" xOffset="251" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_macron.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Amacron" format="2">
<advance height="1000" width="730"/>
<unicode hex="0100"/>
<anchor x="365.0" y="953.0" name="top"/>
<outline>
<component base="A"/>
<component base="macron" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Amacron.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E107"/>
<anchor x="368.0" y="953.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="macron" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Amacron.salt_v" format="2">
<advance height="994" width="1000"/>
<unicode hex="E1F4"/>
<anchor x="500.0" y="913.0" name="top"/>
<outline>
<component base="A.salt_s_v"/>
<component base="macron" xOffset="250" yOffset="-40"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Amacron.v" format="2">
<advance height="994" width="1000"/>
<unicode hex="E190"/>
<anchor x="501.0" y="913.0" name="top"/>
<outline>
<component base="macron" xOffset="251" yOffset="-40"/>
<component base="A.s_v"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_tilde.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Atilde" format="2">
<advance height="1000" width="730"/>
<unicode hex="00C3"/>
<anchor x="364.0" y="953.0" name="top"/>
<outline>
<component base="A"/>
<component base="tilde" xOffset="115"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Atilde.salt" format="2">
<advance height="1000" width="736"/>
<unicode hex="E104"/>
<anchor x="367.0" y="953.0" name="top"/>
<outline>
<component base="A.salt"/>
<component base="tilde" xOffset="118"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Atilde.salt_v" format="2">
<advance height="1005" width="1000"/>
<unicode hex="E1F1"/>
<anchor x="499.0" y="913.0" name="top"/>
<outline>
<component base="A.salt_s_v"/>
<component base="tilde" xOffset="250" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/A_tilde.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Atilde.v" format="2">
<advance height="1005" width="1000"/>
<unicode hex="E18D"/>
<anchor x="500.0" y="913.0" name="top"/>
<outline>
<component base="A.s_v"/>
<component base="tilde" xOffset="251" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/B_.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="B" format="2">
<advance height="1000" width="725"/>
<unicode hex="0042"/>
<anchor x="337" y="747" name="top"/>
<outline>
<contour>
<point x="489" y="0" type="line" smooth="yes"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/B_.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="B.v" format="2">
<advance height="861" width="1000"/>
<unicode hex="FF22"/>
<unicode hex="FF42"/>
<outline>
<contour>
<point x="612" y="1" type="line" smooth="yes"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="C" format="2">
<advance height="1000" width="628"/>
<unicode hex="0043"/>
<anchor x="337" y="747" name="top"/>
<outline>
<contour>
<point x="548" y="0" type="line" smooth="yes"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="C.v" format="2">
<advance height="864" width="1000"/>
<unicode hex="FF23"/>
<unicode hex="FF43"/>
<outline>
<contour>
<point x="755" y="0" type="line" smooth="yes"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_acute.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Cacute" format="2">
<advance height="1000" width="628"/>
<unicode hex="0106"/>
<anchor x="375.0" y="969.0" name="top"/>
<outline>
<component base="C"/>
<component base="acute" xOffset="125"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_acute.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Cacute.v" format="2">
<advance height="1020" width="1000"/>
<unicode hex="E194"/>
<anchor x="510.0" y="929.0" name="top"/>
<outline>
<component base="C.s_v"/>
<component base="acute" xOffset="260" yOffset="-40"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_caron.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Ccaron" format="2">
<advance height="1000" width="628"/>
<unicode hex="010C"/>
<anchor x="345.0" y="987.0" name="top"/>
<outline>
<component base="C"/>
<component base="caron" xOffset="95"/>
Expand Down
1 change: 1 addition & 0 deletions sources/1-drawing/Bungee-Regular.ufo/glyphs/C_caron.v.glif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Ccaron.v" format="2">
<advance height="1036" width="1000"/>
<unicode hex="E197"/>
<anchor x="510.0" y="947.0" name="top"/>
<outline>
<component base="caron" xOffset="260" yOffset="-40"/>
<component base="C.s_v"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Ccircumflex" format="2">
<advance height="1000" width="628"/>
<unicode hex="0108"/>
<anchor x="345.0" y="996.0" name="top"/>
<outline>
<component base="C"/>
<component base="circumflex" xOffset="95"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Ccircumflex.v" format="2">
<advance height="1026" width="1000"/>
<unicode hex="E195"/>
<anchor x="510.0" y="956.0" name="top"/>
<outline>
<component base="circumflex" xOffset="260" yOffset="-40"/>
<component base="C.s_v"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<glyph name="Cdotaccent" format="2">
<advance height="1000" width="628"/>
<unicode hex="010A"/>
<anchor x="356.0" y="972.0" name="top"/>
<outline>
<component base="C"/>
<component base="dotaccent" xOffset="105"/>
Expand Down
Loading
Loading