1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-23 11:43:47 +03:00

Initial version of Display family

This commit is contained in:
Rasmus Andersson 2020-01-31 23:51:58 -08:00
parent 06b166889e
commit a99473b591
4 changed files with 438360 additions and 22 deletions

View File

@ -48,7 +48,9 @@ all_const: all_otf all_ttf all_web
all_const_hinted: all_ttf_hinted all_web_hinted
var: \
$(FONTDIR)/var/Inter.var.woff2 \
$(FONTDIR)/var/Inter.var.otf
$(FONTDIR)/var/Inter.var.otf \
$(FONTDIR)/var/InterDisplay.var.woff2 \
$(FONTDIR)/var/InterDisplay.var.otf
all_var: \
$(FONTDIR)/var/Inter.var.otf \
$(FONTDIR)/var/Inter.var.woff2 \
@ -57,7 +59,15 @@ all_var: \
$(FONTDIR)/var/Inter-roman.var.otf \
$(FONTDIR)/var/Inter-roman.var.woff2 \
$(FONTDIR)/var/Inter-italic.var.otf \
$(FONTDIR)/var/Inter-italic.var.woff2
$(FONTDIR)/var/Inter-italic.var.woff2 \
$(FONTDIR)/var/InterDisplay.var.otf \
$(FONTDIR)/var/InterDisplay.var.woff2 \
$(FONTDIR)/var/InterDisplay-V.var.otf \
$(FONTDIR)/var/InterDisplay-V.var.woff2 \
$(FONTDIR)/var/InterDisplay-roman.var.otf \
$(FONTDIR)/var/InterDisplay-roman.var.woff2 \
$(FONTDIR)/var/InterDisplay-italic.var.otf \
$(FONTDIR)/var/InterDisplay-italic.var.woff2
# Hinted variable font disabled. See https://github.com/rsms/inter/issues/75
# all_var_hinted: $(FONTDIR)/var-hinted/Inter.var.otf $(FONTDIR)/var-hinted/Inter.var.woff2
@ -97,13 +107,23 @@ $(FONTDIR)/var/Inter-%.var.otf: build/ufo/Inter-%.designspace $(all_ufo_masters)
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
misc/tools/fix-vf-meta.py $@
$(FONTDIR)/var/InterDisplay.var.otf: $(all_display_ufo_masters) version.txt
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/InterDisplay.designspace
$(FONTDIR)/var/InterDisplay-V.var.otf: $(FONTDIR)/var/InterDisplay.var.otf
misc/fontbuild rename --family "Inter Display V" -o $@ $<
$(FONTDIR)/var/InterDisplay-%.var.otf: build/ufo/InterDisplay-%.designspace $(all_display_ufo_masters) version.txt
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
misc/tools/fix-vf-meta.py $@
# OTF/TTF from UFO
$(FONTDIR)/const/Inter-%.otf: build/ufo/Inter-%.ufo version.txt
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter-$*.ufo
$(FONTDIR)/const/Inter%.otf: build/ufo/Inter%.ufo version.txt
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
$(FONTDIR)/const/Inter-%.ttf: build/ufo/Inter-%.ufo version.txt
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter-$*.ufo
$(FONTDIR)/const/Inter%.ttf: build/ufo/Inter%.ufo version.txt
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
# DESIGNSPACE from GLYPHS
@ -112,16 +132,23 @@ build/ufo/Inter-italic.designspace: build/ufo/Inter.designspace
build/ufo/Inter.designspace: src/Inter.glyphs
@mkdir -p build/ufo
misc/fontbuild glyphsync -o build/ufo src/Inter.glyphs
build/ufo/InterDisplay-roman.designspace: build/ufo/InterDisplay.designspace
build/ufo/InterDisplay-italic.designspace: build/ufo/InterDisplay.designspace
build/ufo/InterDisplay.designspace: src/InterDisplay.glyphs
@mkdir -p build/ufo
misc/fontbuild glyphsync -o build/ufo src/InterDisplay.glyphs
# short-circuit Make for performance
src/Inter.glyphs:
@true
src/InterDisplay.glyphs:
@true
# make sure intermediate files are not gc'd by make
.PRECIOUS: build/ufo/Inter-*.designspace
.PRECIOUS: build/ufo/Inter-*.designspace build/ufo/InterDisplay-*.designspace
designspace: build/ufo/Inter.designspace
designspace: build/ufo/Inter.designspace build/ufo/InterDisplay.designspace
.PHONY: designspace
@ -224,6 +251,9 @@ build/tmp/a.zip:
$(FONTDIR)/var/Inter.var.woff2 \
$(FONTDIR)/var/Inter-italic.var.woff2 \
$(FONTDIR)/var/Inter-roman.var.woff2 \
$(FONTDIR)/var/InterDisplay.var.woff2 \
$(FONTDIR)/var/InterDisplay-italic.var.woff2 \
$(FONTDIR)/var/InterDisplay-roman.var.woff2 \
misc/dist/inter.css \
"$(ZD)/Inter (Web)/"
cp -a $(FONTDIR)/const-hinted/*.woff \
@ -233,11 +263,15 @@ build/tmp/a.zip:
"misc/dist/about hinted fonts.txt" \
"$(ZD)/Inter (Hinted, for Windows)/"
@#
cp -a $(FONTDIR)/var/Inter.var.otf "$(ZD)/Inter (Variable)/Inter.otf"
cp -a $(FONTDIR)/var/Inter-roman.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-roman.otf"
cp -a $(FONTDIR)/var/Inter-italic.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-italic.otf"
cp -a $(FONTDIR)/var/Inter.var.otf "$(ZD)/Inter (Variable)/Inter.otf"
cp -a $(FONTDIR)/var/Inter-roman.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-roman.otf"
cp -a $(FONTDIR)/var/Inter-italic.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-italic.otf"
cp -a $(FONTDIR)/var/InterDisplay.var.otf "$(ZD)/Inter Display (Variable)/InterDisplay.otf"
cp -a $(FONTDIR)/var/InterDisplay-roman.var.otf "$(ZD)/Inter Display (Variable, single axis)/InterDisplay-roman.otf"
cp -a $(FONTDIR)/var/InterDisplay-italic.var.otf "$(ZD)/Inter Display (Variable, single axis)/InterDisplay-italic.otf"
@#
cp -a $(FONTDIR)/var/Inter-V.var.otf "$(ZD)/Inter V (Variable)/Inter-V.otf"
cp -a $(FONTDIR)/var/Inter-V.var.otf "$(ZD)/Inter V (Variable)/Inter-V.otf"
cp -a $(FONTDIR)/var/InterDisplay-V.var.otf "$(ZD)/Inter V (Variable)/InterDisplay-V.otf"
@#
@# copy misc stuff
cp -a misc/dist/install*.txt "$(ZD)/"

57
init.sh
View File

@ -408,6 +408,11 @@ else
then
NEED_GENERATE=true
fi
if [[ ! -d "build/ufo/InterDisplay-${style}.ufo" ]] || \
has_newer "build/ufo/InterDisplay-${style}.ufo" "$GEN_MAKE_FILE"
then
NEED_GENERATE=true
fi
done
fi
@ -427,23 +432,32 @@ else
# master UFO targets
echo "# master UFOs" >> "$GEN_MAKE_FILE"
echo "# Note: build/ufo/Inter.designspace depends on src/Inter.glyphs" >> "$GEN_MAKE_FILE"
echo "# Note: build/ufo/InterDisplay.designspace depends on src/InterDisplay.glyphs" >> "$GEN_MAKE_FILE"
for style in "${master_styles[@]}"; do
echo -n "build/ufo/Inter-${style}.ufo:" >> "$GEN_MAKE_FILE"
# echo -n " build/ufo/Inter-${style}.ufo" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/Inter.designspace" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/features" >> "$GEN_MAKE_FILE"
echo -n " \$(wildcard" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/Inter-${style}.ufo/*.plist" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/Inter-${style}.ufo/*.fea" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/Inter-${style}.ufo/glyphs/*.plist" >> "$GEN_MAKE_FILE"
# echo -n " build/ufo/Inter-${style}.ufo/glyphs/*.glif" >> "$GEN_MAKE_FILE"
# echo -n " src/features/*" >> "$GEN_MAKE_FILE"
echo ")" >> "$GEN_MAKE_FILE"
echo -e "\ttouch \"\$@\"" >> "$GEN_MAKE_FILE"
echo -n "build/ufo/InterDisplay-${style}.ufo:" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/InterDisplay.designspace" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/features" >> "$GEN_MAKE_FILE"
echo -n " \$(wildcard" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/InterDisplay-${style}.ufo/*.plist" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/InterDisplay-${style}.ufo/*.fea" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/InterDisplay-${style}.ufo/glyphs/*.plist" >> "$GEN_MAKE_FILE"
echo ")" >> "$GEN_MAKE_FILE"
echo -e "\ttouch \"\$@\"" >> "$GEN_MAKE_FILE"
done
echo -n "all_ufo_masters :=" >> "$GEN_MAKE_FILE"
for style in "${master_styles[@]}"; do
echo -n " build/ufo/Inter-${style}.ufo" >> "$GEN_MAKE_FILE"
echo -n " build/ufo/InterDisplay-${style}.ufo" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
echo "" >> "$GEN_MAKE_FILE"
@ -461,9 +475,15 @@ else
for depstyle in $dependent_styles; do
echo -n " build/ufo/Inter-${depstyle}.ufo" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
echo -e "\tmisc/fontbuild instancegen build/ufo/Inter.designspace ${style}" >> "$GEN_MAKE_FILE"
echo -n "build/ufo/InterDisplay-${style}.ufo:" >> "$GEN_MAKE_FILE"
for depstyle in $dependent_styles; do
echo -n " build/ufo/InterDisplay-${depstyle}.ufo" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
echo -e "\tmisc/fontbuild instancegen build/ufo/InterDisplay.designspace ${style}" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -491,6 +511,27 @@ else
echo "${style}_check: ${DIST_DIR_TOK}const/Inter-${style}.otf ${DIST_DIR_TOK}const/Inter-${style}.ttf" >> "$GEN_MAKE_FILE"
echo -e "\tmisc/fontbuild checkfont $^" >> "$GEN_MAKE_FILE"
echo "display_${style}_ttf_hinted: ${DIST_DIR_TOK}const-hinted/InterDisplay-${style}.ttf" >> "$GEN_MAKE_FILE"
echo "display_${style}_ttf: ${DIST_DIR_TOK}const/InterDisplay-${style}.ttf" >> "$GEN_MAKE_FILE"
echo "display_${style}_otf: ${DIST_DIR_TOK}const/InterDisplay-${style}.otf" >> "$GEN_MAKE_FILE"
echo -n "display_${style}_web:" >> "$GEN_MAKE_FILE"
for format in "${web_formats[@]}"; do
echo -n " ${DIST_DIR_TOK}const/InterDisplay-${style}.${format}" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
echo -n "display_${style}_web_hinted:" >> "$GEN_MAKE_FILE"
for format in "${web_formats[@]}"; do
echo -n " ${DIST_DIR_TOK}const-hinted/InterDisplay-${style}.${format}" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
echo "display_${style}_check: ${DIST_DIR_TOK}const/InterDisplay-${style}.otf ${DIST_DIR_TOK}const/InterDisplay-${style}.ttf" >> "$GEN_MAKE_FILE"
echo -e "\tmisc/fontbuild checkfont $^" >> "$GEN_MAKE_FILE"
echo "" >> "$GEN_MAKE_FILE"
done
@ -498,6 +539,7 @@ else
echo -n "all_otf:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_otf" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_otf" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -505,6 +547,7 @@ else
echo -n "all_ttf:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_ttf" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_ttf" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -512,6 +555,7 @@ else
echo -n "all_ttf_hinted:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_ttf_hinted" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_ttf_hinted" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -519,6 +563,7 @@ else
echo -n "all_web:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_web" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_web" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -526,6 +571,7 @@ else
echo -n "all_web_hinted:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_web_hinted" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_web_hinted" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -533,6 +579,7 @@ else
echo -n "all_check_const:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " ${style}_check" >> "$GEN_MAKE_FILE"
echo -n " display_${style}_check" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -540,6 +587,7 @@ else
echo -n "all_samples_pdf:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " \$(FONTDIR)/samples/Inter-${style}.pdf" >> "$GEN_MAKE_FILE"
echo -n " \$(FONTDIR)/samples/InterDisplay-${style}.pdf" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"
@ -547,6 +595,7 @@ else
echo -n "all_samples_png:" >> "$GEN_MAKE_FILE"
for style in "${all_styles[@]}"; do
echo -n " \$(FONTDIR)/samples/Inter-${style}.png" >> "$GEN_MAKE_FILE"
echo -n " \$(FONTDIR)/samples/InterDisplay-${style}.png" >> "$GEN_MAKE_FILE"
done
echo "" >> "$GEN_MAKE_FILE"

View File

@ -353,7 +353,8 @@ class Main(object):
# files
master_dir = outdir
glyphsfile = args.glyphsfile
designspace_file = pjoin(outdir, 'Inter.designspace')
name = os.path.splitext(basename(glyphsfile))[0] # e.g. "Inter"
designspace_file = pjoin(outdir, name + '.designspace')
instance_dir = pjoin(BASEDIR, 'build', 'ufo')
# load glyphs project file
@ -392,17 +393,17 @@ class Main(object):
# Workaround for Glyphs limitation
# (Base italic master can't be called just Italic, so it's called
# "Italic Italic" which is converted here to just "Italic")
ufo_path = pjoin(master_dir, 'Inter-Italic.ufo')
ufo_path = pjoin(master_dir, name + '-Italic.ufo')
source.styleName = "Italic"
source.name = "italic"
source.font.info.styleName = source.styleName
elif source.styleName == "Black Italic Italic":
ufo_path = pjoin(master_dir, 'Inter-BlackItalic.ufo')
ufo_path = pjoin(master_dir, name + '-BlackItalic.ufo')
source.styleName = "Black Italic"
source.name = "blackitalic"
source.font.info.styleName = source.styleName
elif source.styleName == "Thin Italic Italic":
ufo_path = pjoin(master_dir, 'Inter-ThinItalic.ufo')
ufo_path = pjoin(master_dir, name + '-ThinItalic.ufo')
source.styleName = "Thin Italic"
source.name = "thinitalic"
source.font.info.styleName = source.styleName
@ -429,7 +430,7 @@ class Main(object):
designspace.write(designspace_file)
# roman designspace
roman_designspace_file = pjoin(outdir, 'Inter-roman.designspace')
roman_designspace_file = pjoin(outdir, name + '-roman.designspace')
p = Process(
target=self._genSubsetDesignSpace,
args=(designspace, 'roman', roman_designspace_file)
@ -438,7 +439,7 @@ class Main(object):
procs.append(p)
# italic designspace
italic_designspace_file = pjoin(outdir, 'Inter-italic.designspace')
italic_designspace_file = pjoin(outdir, name + '-italic.designspace')
p = Process(
target=self._genSubsetDesignSpace,
args=(designspace, 'italic', italic_designspace_file)

438254
src/InterDisplay.glyphs Normal file

File diff suppressed because one or more lines are too long