summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2023-06-08 04:03:53 +0300
committerRasmus Andersson <rasmus@notion.se>2023-06-08 04:03:53 +0300
commit6e73e7995002505dc4b7d3b1bb5e9d9356cbc225 (patch)
tree6e3655b5273de7c4b2d54529c00587e6106caff1 /misc
parent036a0373b249a76f523b5aee16440f70f6a4d273 (diff)
downloadinter-6e73e7995002505dc4b7d3b1bb5e9d9356cbc225.tar.xz
attempt at fixing names for Windows, re issue #519
Diffstat (limited to 'misc')
-rw-r--r--misc/dist/inter.css36
-rw-r--r--misc/makezip2.sh8
-rwxr-xr-xmisc/tools/gen-instance-ufo.sh26
-rw-r--r--misc/tools/postprocess-designspace.py15
-rw-r--r--misc/tools/postprocess_instance_ufo.py23
5 files changed, 54 insertions, 54 deletions
diff --git a/misc/dist/inter.css b/misc/dist/inter.css
index cf5f2f94f..315e633ae 100644
--- a/misc/dist/inter.css
+++ b/misc/dist/inter.css
@@ -40,21 +40,21 @@
@font-face { font-family: "Inter"; font-style: italic; font-weight: 780; font-display: swap; src: url("Inter-ExtraBoldItalic.woff2?v=3.19") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("Inter-Black.woff2?v=3.19") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 900; font-display: swap; src: url("Inter-BlackItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 100; font-display: swap; src: url("Inter-DisplayThin.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 100; font-display: swap; src: url("Inter-DisplayThinItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 200; font-display: swap; src: url("Inter-DisplayExtraLight.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 200; font-display: swap; src: url("Inter-DisplayExtraLightItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 300; font-display: swap; src: url("Inter-DisplayLight.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 300; font-display: swap; src: url("Inter-DisplayLightItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 400; font-display: swap; src: url("Inter-DisplayRegular.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 400; font-display: swap; src: url("Inter-DisplayItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 500; font-display: swap; src: url("Inter-DisplayMedium.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 500; font-display: swap; src: url("Inter-DisplayMediumItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 580; font-display: swap; src: url("Inter-DisplaySemiBold.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 580; font-display: swap; src: url("Inter-DisplaySemiBoldItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 660; font-display: swap; src: url("Inter-DisplayBold.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 660; font-display: swap; src: url("Inter-DisplayBoldItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 780; font-display: swap; src: url("Inter-DisplayExtraBold.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 780; font-display: swap; src: url("Inter-DisplayExtraBoldItalic.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 900; font-display: swap; src: url("Inter-DisplayBlack.woff2?v=3.19") format("woff2"); }
-@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 900; font-display: swap; src: url("Inter-DisplayBlackItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 100; font-display: swap; src: url("InterDisplay-Thin.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 100; font-display: swap; src: url("InterDisplay-ThinItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 200; font-display: swap; src: url("InterDisplay-ExtraLight.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 200; font-display: swap; src: url("InterDisplay-ExtraLightItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 300; font-display: swap; src: url("InterDisplay-Light.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 300; font-display: swap; src: url("InterDisplay-LightItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 400; font-display: swap; src: url("InterDisplay-Regular.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 400; font-display: swap; src: url("InterDisplay-Italic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 500; font-display: swap; src: url("InterDisplay-Medium.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 500; font-display: swap; src: url("InterDisplay-MediumItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 580; font-display: swap; src: url("InterDisplay-SemiBold.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 580; font-display: swap; src: url("InterDisplay-SemiBoldItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 660; font-display: swap; src: url("InterDisplay-Bold.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 660; font-display: swap; src: url("InterDisplay-BoldItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 780; font-display: swap; src: url("InterDisplay-ExtraBold.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 780; font-display: swap; src: url("InterDisplay-ExtraBoldItalic.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: normal; font-weight: 900; font-display: swap; src: url("InterDisplay-Black.woff2?v=3.19") format("woff2"); }
+@font-face { font-family: "InterDisplay"; font-style: italic; font-weight: 900; font-display: swap; src: url("InterDisplay-BlackItalic.woff2?v=3.19") format("woff2"); }
diff --git a/misc/makezip2.sh b/misc/makezip2.sh
index 938d42031..590b43d19 100644
--- a/misc/makezip2.sh
+++ b/misc/makezip2.sh
@@ -55,7 +55,7 @@ cp misc/dist/help.txt "$ZIPDIR/help.txt"
cp build/fonts/static-hinted/Inter.ttc "$ZIPDIR/Inter.ttc"
cp build/fonts/var/Inter-Variable.ttf "$ZIPDIR/Inter-Variable.ttf"
cp build/fonts/var/Inter-Variable-Italic.ttf "$ZIPDIR/Inter-Variable-Italic.ttf"
-cp build/fonts/static/Inter-*.woff2 "$ZIPDIR/web/" &
+cp build/fonts/static/Inter*.woff2 "$ZIPDIR/web/" &
cp build/fonts/var/Inter-Variable.woff2 "$ZIPDIR/web/InterVariable.woff2"
cp build/fonts/var/Inter-Variable-Italic.woff2 "$ZIPDIR/web/InterVariable-Italic.woff2"
cp misc/dist/inter.css "$ZIPDIR/web/"
@@ -67,9 +67,9 @@ mkdir -p "$ZIPDIR/extras/otf" \
"$ZIPDIR/extras/ttf" \
"$ZIPDIR/extras/woff-hinted"
-cp build/fonts/static/Inter-*.otf "$ZIPDIR/extras/otf/" &
-cp build/fonts/static-hinted/Inter-*.ttf "$ZIPDIR/extras/ttf/" &
-cp build/fonts/static-hinted/Inter-*.woff2 "$ZIPDIR/extras/woff-hinted/" &
+cp build/fonts/static/Inter*.otf "$ZIPDIR/extras/otf/" &
+cp build/fonts/static-hinted/Inter*.ttf "$ZIPDIR/extras/ttf/" &
+cp build/fonts/static-hinted/Inter*.woff2 "$ZIPDIR/extras/woff-hinted/" &
diff --git a/misc/tools/gen-instance-ufo.sh b/misc/tools/gen-instance-ufo.sh
index c3250af89..8e1041220 100755
--- a/misc/tools/gen-instance-ufo.sh
+++ b/misc/tools/gen-instance-ufo.sh
@@ -11,13 +11,6 @@ INSTANCE_SemiBold="Inter SemiBold"
INSTANCE_Bold="Inter Bold"
INSTANCE_ExtraBold="Inter ExtraBold"
-INSTANCE_DisplayLight="Inter Display Light"
-INSTANCE_DisplayExtraLight="Inter Display ExtraLight"
-INSTANCE_DisplayMedium="Inter Display Medium"
-INSTANCE_DisplaySemiBold="Inter Display SemiBold"
-INSTANCE_DisplayBold="Inter Display Bold"
-INSTANCE_DisplayExtraBold="Inter Display ExtraBold"
-
INSTANCE_LightItalic="Inter Light Italic"
INSTANCE_ExtraLightItalic="Inter ExtraLight Italic"
INSTANCE_MediumItalic="Inter Medium Italic"
@@ -25,12 +18,25 @@ INSTANCE_SemiBoldItalic="Inter SemiBold Italic"
INSTANCE_BoldItalic="Inter Bold Italic"
INSTANCE_ExtraBoldItalic="Inter ExtraBold Italic"
+INSTANCE_DisplayThin="Inter Display Thin"
+INSTANCE_DisplayLight="Inter Display Light"
+INSTANCE_DisplayExtraLight="Inter Display ExtraLight"
+INSTANCE_DisplayRegular="Inter Display Regular"
+INSTANCE_DisplayMedium="Inter Display Medium"
+INSTANCE_DisplaySemiBold="Inter Display SemiBold"
+INSTANCE_DisplayBold="Inter Display Bold"
+INSTANCE_DisplayExtraBold="Inter Display ExtraBold"
+INSTANCE_DisplayBlack="Inter Display Black"
+
+INSTANCE_DisplayThinItalic="Inter Display Thin Italic"
INSTANCE_DisplayLightItalic="Inter Display Light Italic"
INSTANCE_DisplayExtraLightItalic="Inter Display ExtraLight Italic"
+INSTANCE_DisplayItalic="Inter Display Italic"
INSTANCE_DisplayMediumItalic="Inter Display Medium Italic"
INSTANCE_DisplaySemiBoldItalic="Inter Display SemiBold Italic"
INSTANCE_DisplayBoldItalic="Inter Display Bold Italic"
INSTANCE_DisplayExtraBoldItalic="Inter Display ExtraBold Italic"
+INSTANCE_DisplayBlackItalic="Inter Display Black Italic"
MASTER_Thin=1
MASTER_Regular=1
@@ -49,7 +55,10 @@ _err() { echo "$PROG: $@" >&2; exit 1; }
# build/ufo/Inter-DisplayExtraBold.ufo -> DisplayExtraBold
UFO_NAME=$(basename "$UFO" .ufo)
-case "$UFO_NAME" in Inter-*) UFO_NAME=${UFO_NAME:6} ;; esac
+case "$UFO_NAME" in
+ Inter-*) UFO_NAME=${UFO_NAME:6} ;;
+ InterDisplay-*) UFO_NAME=Display${UFO_NAME:13} ;;
+esac
# DisplayExtraBold -> "Inter Display ExtraBold"
INSTANCE=INSTANCE_${UFO_NAME} ; INSTANCE=${!INSTANCE}
@@ -59,6 +68,7 @@ INSTANCE=INSTANCE_${UFO_NAME} ; INSTANCE=${!INSTANCE}
if [ -z "$INSTANCE" ]; then
MASTER=MASTER_${UFO_NAME}
[ -n "${!MASTER}" ] || _err "Failed to map UFO name \"$UFO_NAME\" to instance"
+ [ -d "$UFO" ] || _err "Cannot find master UFO: $UFO"
echo "touch $UFO"
touch "$UFO"
exit
diff --git a/misc/tools/postprocess-designspace.py b/misc/tools/postprocess-designspace.py
index fbe76a364..9157a57e4 100644
--- a/misc/tools/postprocess-designspace.py
+++ b/misc/tools/postprocess-designspace.py
@@ -7,7 +7,6 @@ from datetime import datetime
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'tools')))
from common import getGitHash, getVersion
-from postprocess_instance_ufo import ufo_set_wws
OPT_EDITABLE = False # --editable
@@ -45,6 +44,20 @@ def update_version(ufo):
ufo.info.openTypeHeadCreated = now.strftime("%Y/%m/%d %H:%M:%S")
+def ufo_set_wws(ufo):
+ # Fix missing WWS entries for Display fonts:
+ # See https://github.com/googlefonts/glyphsLib/issues/820
+ subfamily = ufo.info.styleName
+ if subfamily.find("Display") == -1:
+ return
+ subfamily = subfamily[len("Display"):].strip()
+ if subfamily == "":
+ # "Display" -> "Regular"
+ subfamily = "Regular"
+ ufo.info.openTypeNameWWSFamilyName = "Inter Display"
+ ufo.info.openTypeNameWWSSubfamilyName = subfamily
+
+
def fix_opsz_range(designspace):
opsz_min = 1000000
opsz_max = 0
diff --git a/misc/tools/postprocess_instance_ufo.py b/misc/tools/postprocess_instance_ufo.py
index 8b5b60970..b391503e9 100644
--- a/misc/tools/postprocess_instance_ufo.py
+++ b/misc/tools/postprocess_instance_ufo.py
@@ -1,19 +1,6 @@
import sys
import defcon
-def ufo_set_wws(ufo):
- # Fix missing WWS entries for Display fonts:
- # See https://github.com/googlefonts/glyphsLib/issues/820
- subfamily = ufo.info.styleName
- if subfamily.find("Display") == -1:
- return
- subfamily = subfamily[len("Display"):].strip()
- if subfamily == "":
- # "Display" -> "Regular"
- subfamily = "Regular"
- ufo.info.openTypeNameWWSFamilyName = "Inter Display"
- ufo.info.openTypeNameWWSSubfamilyName = subfamily
-
# See https://github.com/rsms/inter/issues/508
# TODO: Remove when https://github.com/googlefonts/glyphsLib/issues/821 is fixed
@@ -30,18 +17,8 @@ def fix_fractional_advance_width(ufo):
def main(argv):
ufo_file = argv[1]
-
- # TODO: Uncomment when https://github.com/googlefonts/glyphsLib/issues/821 is fixed
- # if ufo_file.find("Display") == -1:
- # return # skip fonts of "default" family
-
ufo = defcon.Font(ufo_file)
-
- if ufo_file.find("Display") != -1:
- ufo_set_wws(ufo)
-
fix_fractional_advance_width(ufo)
-
ufo.save(ufo_file)