1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-21 15:32:25 +03:00

tooling: adds editable-ufos target to makefile for generating unprocessed UFOs

This commit is contained in:
Rasmus Andersson 2023-04-20 13:47:14 -07:00
parent 2c6c82317c
commit dd61fb169b
2 changed files with 72 additions and 4 deletions

View File

@ -121,6 +121,22 @@ This font is stored and authored primarily in the [Glyphs](https://glyphsapp.com
`Inter.glyphspackage` directory (a macOS "bundle.")
#### Editing UFO sources
In some cases you might want to edit or inspect the fonts as UFOs.
Inter is compiled to UFO as an intermediary step.
The quickest path to UFOs is to run `make -j$(nproc) build/ufo/Inter-DisplayMedium.ufo`. Substitute "Inter-DisplayMedium.ufo" for any style.
The quickest path to a designspace is to run `make -j$(nproc) build/ufo/Inter-Roman.designspace`
However, if you indend to edit the fonts you probably want to use the `editable-ufos` make target instead:
make -j$(nproc) editable-ufos
This generates all designspaces and UFOs, suitable for editing, in `build/ufo-editable/`. The main difference between `editable-ufos` and the intermediary UFOs in `build/ufo/` is that the "editable" ones does not have any processing applied to them: all components, anchors and paths are represented as-is in the original Glyphs source.
### Interactive Lab
This project comes with a simple web-based application for debugging and previewing the font. It's a very useful tool to have when working on the font.

View File

@ -26,18 +26,70 @@ $(UFODIR)/features: src/features
@rm -f $(UFODIR)/features
@ln -s ../../src/features $(UFODIR)/features
# designspace
$(UFODIR)/%.designspace: $(UFODIR)/%.glyphs | venv
# designspace & master UFOs
$(UFODIR)/%.designspace: $(UFODIR)/%.glyphs $(UFODIR)/features | venv
. $(VENV) ; fontmake -o ufo -g $< --designspace-path $@ \
--master-dir $(UFODIR) --instance-dir $(UFODIR)
--master-dir $(UFODIR) --instance-dir $(UFODIR)
. $(VENV) ; python misc/tools/postprocess-designspace.py $@
# UFOs from designspace
# instance UFOs from designspace
$(UFODIR)/Inter-%Italic.ufo: $(UFODIR)/Inter-Italic.designspace $(UFODIR)/features | venv
. $(VENV) ; bash misc/tools/gen-instance-ufo.sh $< $@
$(UFODIR)/Inter-%.ufo: $(UFODIR)/Inter-Roman.designspace $(UFODIR)/features | venv
. $(VENV) ; bash misc/tools/gen-instance-ufo.sh $< $@
# designspace & master UFOs (for editing)
build/ufo-editable/%.designspace: $(UFODIR)/%.glyphs $(UFODIR)/features | venv
@mkdir -p $(dir $@)
. $(VENV) ; fontmake -o ufo -g $< --designspace-path $@ \
--master-dir $(dir $@) --instance-dir $(dir $@)
. $(VENV) ; python misc/tools/postprocess-designspace.py --editable $@
# instance UFOs from designspace (for editing)
build/ufo-editable/Inter-%Italic.ufo: build/ufo-editable/Inter-Italic.designspace build/ufo-editable/features | venv
. $(VENV) ; bash misc/tools/gen-instance-ufo.sh $< $@
build/ufo-editable/Inter-%.ufo: build/ufo-editable/Inter-Roman.designspace build/ufo-editable/features | venv
. $(VENV) ; bash misc/tools/gen-instance-ufo.sh $< $@
editable-ufos: build/ufo-editable/.ok
@echo "Editable designspace & UFOs can be found here:"
@echo " $(PWD)/build/ufo-editable"
build/ufo-editable/.ok: build/ufo-editable/Inter-Roman.designspace build/ufo-editable/Inter-Italic.designspace
@mkdir -p build/ufo-editable
@rm -f build/ufo-editable/features
@ln -s ../../src/features build/ufo-editable/features
$(MAKE) \
build/ufo-editable/Inter-Light.ufo \
build/ufo-editable/Inter-ExtraLight.ufo \
build/ufo-editable/Inter-Medium.ufo \
build/ufo-editable/Inter-SemiBold.ufo \
build/ufo-editable/Inter-Bold.ufo \
build/ufo-editable/Inter-ExtraBold.ufo \
\
build/ufo-editable/Inter-LightItalic.ufo \
build/ufo-editable/Inter-ExtraLightItalic.ufo \
build/ufo-editable/Inter-MediumItalic.ufo \
build/ufo-editable/Inter-SemiBoldItalic.ufo \
build/ufo-editable/Inter-BoldItalic.ufo \
build/ufo-editable/Inter-ExtraBoldItalic.ufo \
\
build/ufo-editable/Inter-DisplayLight.ufo \
build/ufo-editable/Inter-DisplayExtraLight.ufo \
build/ufo-editable/Inter-DisplayMedium.ufo \
build/ufo-editable/Inter-DisplaySemiBold.ufo \
build/ufo-editable/Inter-DisplayBold.ufo \
build/ufo-editable/Inter-DisplayExtraBold.ufo \
\
build/ufo-editable/Inter-DisplayLightItalic.ufo \
build/ufo-editable/Inter-DisplayExtraLightItalic.ufo \
build/ufo-editable/Inter-DisplayMediumItalic.ufo \
build/ufo-editable/Inter-DisplaySemiBoldItalic.ufo \
build/ufo-editable/Inter-DisplayBoldItalic.ufo \
build/ufo-editable/Inter-DisplayExtraBoldItalic.ufo
@touch $@
@echo ""
# make sure intermediate files are not rm'd by make
.PRECIOUS: \
$(UFODIR)/Inter-Black.ufo \