Skip to content

Commit

Permalink
1.006update4
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-212 committed Apr 14, 2024
1 parent cdff23e commit 7406fb4
Show file tree
Hide file tree
Showing 21 changed files with 500 additions and 212 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build_fonts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
- "misc/scripts/**"
- Makefile
- requirements.txt
- version.txt
tags:
- "v*"
pull_request:
Expand All @@ -26,7 +25,6 @@ on:
- "misc/scripts/**"
- Makefile
- requirements.txt
- version.txt
workflow_dispatch:

defaults:
Expand Down
32 changes: 32 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Build Process

```mermaid
%%{init:
{
"theme": "default",
"themeVariables": {
"fontFamily": "-apple-system, system-ui, sans-serif",
"fontSize": "16px"
}
}
}%%
flowchart TD;
id1("Glyphspackage source file") -- "fontmake" --> id2("Unmodified UFOs and Designspace")
subgraph "Local Build Process"
id2 -- "copy_kern.py \n stat.py" --> id3("UFOs and Designspace ready to be compiled")
id3 -- "fontmake" --> id4("Binary TTF font")
end
id1 -- "get_ver.py" --> id21("Version String")
subgraph "Upload"
id4 -- "make zip" --> id5("Fonts in Zip")
id5 & id21 -- "mv rename" --> id6("Renamed Zip")
id6 -- "Github Arifact Upload" --> id7("Actions Artifacts")
id6 -- "Release Upload" --> id8("Pre-release files")
end
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Inter Numeric is a variable font based on Inter, providing a versatile look for
- `cv02`: Flat Three
- `cv03`: Open Four
- `cv04`: Straight Six and Nine
- `cv05`: Square Zero
- `cv05`: Square Zero, Six and Nine
- `tnum`: Tabular Numbers
- `pnum`: Propotional Numbers (Default)
- `case`: Case-sensitive Form
Expand Down
7 changes: 7 additions & 0 deletions misc/scripts/copy_kern.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import shutil
import os

"""
Copy Inter's kerning data to Inter Numeric.
So there's no need to adjust kerning.
But that also means I will have little space for new glyphs, because
all the kernings I made will be overridden.
"""

# Original Inter Kerning
inter_dlight_kerning_path = "src/InterKernings/Inter-DLight-Kerning.plist"
inter_dregular_kerning_path = "src/InterKernings/Inter-DRegular-Kerning.plist"
Expand Down
9 changes: 6 additions & 3 deletions misc/scripts/gen_woff2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from fontTools.ttLib.woff2 import compress

# Usage example
"""
Compress TrueType font to WOFF2 format
"""

ttf_path = 'fonts/variable/InterNumeric[wght,RDNS].ttf'
woff2_path = 'fonts/variable/InterNumeric[wght,RDNS].woff2'

# Convert the variable font to WOFF2 format
compress(ttf_path, woff2_path)
if __name__ == "__main__":
compress(ttf_path, woff2_path)
12 changes: 6 additions & 6 deletions misc/scripts/get_ver.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import os
from glyphsLib import GSFont

"""
Get font version from Glyphspackage source file, store it in verion.txt
No need to keep track of version in a seperate file.
Only used in GitHub Workflows to give artifacts a file name.
"""

def get_font_version(glyphspackage_path):
font = GSFont(glyphspackage_path)

return f"{font.versionMajor}.{font.versionMinor:03}"

inter_numeric_src_path = "src/InterNumeric.glyphspackage"

try:
os.remove("version.txt")
except FileNotFoundError:
pass

with open("version.txt", "w") as version_file:
version_file.write(get_font_version(inter_numeric_src_path))
13 changes: 9 additions & 4 deletions misc/scripts/stat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from fontTools.designspaceLib import DesignSpaceDocument, LocationLabelDescriptor, AxisLabelDescriptor

"""
Add a STAT table to the Designspace document as a preprocessing before
using fontmake to compile the UFOs to the final binary font.
"""

path = "fonts-temp/master-ufo/InterNumeric.designspace"
dsfile = DesignSpaceDocument.fromfile(path)

Expand All @@ -8,10 +13,10 @@
AxisLabelDescriptor(name="ExtraLight", userValue=200, userMinimum=150, userMaximum=250),
AxisLabelDescriptor(name="Light", userValue=300, userMinimum=250, userMaximum=350),
AxisLabelDescriptor(name="Regular", userValue=400, userMinimum=350, userMaximum=450, elidable=True),
AxisLabelDescriptor(name="Medium", userValue=500, userMinimum=450, userMaximum=550),
AxisLabelDescriptor(name="SemiBold", userValue=600, userMinimum=550, userMaximum=650),
AxisLabelDescriptor(name="Bold", userValue=700, userMinimum=650, userMaximum=750),
AxisLabelDescriptor(name="ExtraBold", userValue=800, userMinimum=750, userMaximum=850),
AxisLabelDescriptor(name="Medium", userValue=490, userMinimum=450, userMaximum=550),
AxisLabelDescriptor(name="SemiBold", userValue=580, userMinimum=550, userMaximum=650),
AxisLabelDescriptor(name="Bold", userValue=670, userMinimum=650, userMaximum=750),
AxisLabelDescriptor(name="ExtraBold", userValue=780, userMinimum=750, userMaximum=850),
AxisLabelDescriptor(name="Black", userValue=900, userMinimum=850, userMaximum=900),
]
dsfile.getAxisByTag("wght").axisLabels = wghtAxisLabels
Expand Down
6 changes: 2 additions & 4 deletions src/InterNumeric.glyphspackage/UIState.plist
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
displayStrings = (
".",
"1/zero.cv05 23
34:20",
A,
"/zero.cv05/zero.slash.cv05/zero.tf.slash.cv05"
"/six.cv05 1",
"5"
);
}
Loading

0 comments on commit 7406fb4

Please sign in to comment.