Move away from using hinted fonts by default
This commit is contained in:
parent
c5efb03ca8
commit
84dfab8f06
6 changed files with 89 additions and 47 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -1,2 +1,3 @@
|
||||||
# Use CRLF for line endings in the Windows install "readme" file
|
# Use CRLF for line endings in the Windows install "readme" file
|
||||||
misc/doc/install-win.txt text eol=crlf
|
misc/doc/install-win.txt text eol=crlf
|
||||||
|
misc/doc/hinted[[:space:]]vs[[:space:]]unhinted.txt text eol=crlf
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,8 @@ You can also specify specific style + file format to `make` through `build/Inter
|
||||||
E.g.
|
E.g.
|
||||||
|
|
||||||
- `make build/dist-unhinted/InterUI-MediumItalic.otf`
|
- `make build/dist-unhinted/InterUI-MediumItalic.otf`
|
||||||
- `make build/dist/InterUI-Bold.woff2`
|
- `make build/dist-unhinted/InterUI-Bold.woff2`
|
||||||
- `make build/dist/InterUI-Regular.ttf`
|
- `make build/dist-hinted/InterUI-Regular.ttf`
|
||||||
- `...`
|
- `...`
|
||||||
|
|
||||||
All resulting font files are written to the `build` directory with `InterUI-` as the filename prefix.
|
All resulting font files are written to the `build` directory with `InterUI-` as the filename prefix.
|
||||||
|
|
@ -298,4 +298,4 @@ Run `./init.sh` to update the generated makefile.
|
||||||
Use the fontinfo.py tool which outputs JSON describing all properties of
|
Use the fontinfo.py tool which outputs JSON describing all properties of
|
||||||
one or more font files.
|
one or more font files.
|
||||||
See `misc/fontinfo.py -h` for details.
|
See `misc/fontinfo.py -h` for details.
|
||||||
Example use: `misc/fontinfo.py build/dist/InterUI-BoldItalic.ttf`
|
Example use: `misc/fontinfo.py -pretty build/dist-unhinted/Inter-UI-BoldItalic.ttf`
|
||||||
|
|
|
||||||
51
Makefile
51
Makefile
|
|
@ -1,11 +1,17 @@
|
||||||
# Targets:
|
# Targets:
|
||||||
# all Build all styles in all formats (default)
|
# all Build all styles in all formats (default)
|
||||||
# all_ttf Build all styles as TrueType
|
# all_ttf Build all styles as TrueType
|
||||||
|
# all_otf Build all styles as OpenType
|
||||||
|
# all_hinted Build all styles as autohinted TrueType
|
||||||
# STYLE Build STYLE in all formats (e.g. MediumItalic)
|
# STYLE Build STYLE in all formats (e.g. MediumItalic)
|
||||||
|
# STYLE_hinted Build STYLE in TTF and web formats with autohints
|
||||||
# STYLE_ttf Build STYLE as TrueType (e.g. MediumItalic_ttf)
|
# STYLE_ttf Build STYLE as TrueType (e.g. MediumItalic_ttf)
|
||||||
# zip Build all styles as TrueType and package into a zip archive
|
# zip Build all styles as TrueType and package into a zip archive
|
||||||
|
# install Build all (web, ttf and otf) and install. Mac-only for now.
|
||||||
|
# dist Create a new release distribution. Does everything.
|
||||||
#
|
#
|
||||||
all: all_web all_otf
|
all: all_web all_otf
|
||||||
|
all_hinted: all_web_hinted
|
||||||
|
|
||||||
VERSION := $(shell misc/version.py)
|
VERSION := $(shell misc/version.py)
|
||||||
|
|
||||||
|
|
@ -24,20 +30,13 @@ build/tmp/InterUIOTF/InterUI-%.otf: build/tmp/InterUITTF/InterUI-%.ttf $(res_fil
|
||||||
@true
|
@true
|
||||||
|
|
||||||
# build/tmp/ttf -> build (generated.make handles build/tmp/InterUITTF/InterUI-%.ttf)
|
# build/tmp/ttf -> build (generated.make handles build/tmp/InterUITTF/InterUI-%.ttf)
|
||||||
build/dist-unhinted/Inter-UI-%.ttf: build/tmp/InterUITTF/InterUI-%.ttf
|
build/dist-unhinted/Inter-UI-%: build/tmp/InterUITTF/InterUI-% build/dist-unhinted
|
||||||
@mkdir -p build/dist-unhinted
|
@mkdir -p build/dist-unhinted
|
||||||
cp -a "$<" "$@"
|
cp -a "$<" "$@"
|
||||||
|
|
||||||
# OTF
|
|
||||||
build/dist-unhinted/Inter-UI-%.otf: build/tmp/InterUIOTF/InterUI-%.otf
|
|
||||||
@mkdir -p build/dist-unhinted
|
|
||||||
cp -a "$<" "$@"
|
|
||||||
|
|
||||||
build/dist:
|
|
||||||
@mkdir -p build/dist
|
|
||||||
|
|
||||||
# autohint
|
# autohint
|
||||||
build/dist/Inter-UI-%.ttf: build/dist-unhinted/Inter-UI-%.ttf build/dist
|
build/dist-hinted/Inter-UI-%.ttf: build/dist-unhinted/Inter-UI-%.ttf
|
||||||
|
@mkdir -p build/dist-hinted
|
||||||
ttfautohint \
|
ttfautohint \
|
||||||
--hinting-limit=256 \
|
--hinting-limit=256 \
|
||||||
--hinting-range-min=8 \
|
--hinting-range-min=8 \
|
||||||
|
|
@ -64,19 +63,23 @@ ZIP_FILE_DIST := build/release/Inter-UI-${VERSION}.zip
|
||||||
ZIP_FILE_DEV := build/release/Inter-UI-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip
|
ZIP_FILE_DEV := build/release/Inter-UI-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip
|
||||||
|
|
||||||
# zip intermediate
|
# zip intermediate
|
||||||
build/.zip.zip: all
|
build/.zip.zip: all_otf all_web all_web_hinted
|
||||||
@rm -rf build/.zip
|
@rm -rf build/.zip
|
||||||
@rm -f build/.zip.zip
|
@rm -f build/.zip.zip
|
||||||
@mkdir -p \
|
@mkdir -p \
|
||||||
"build/.zip/Inter UI (web)" \
|
"build/.zip/Inter UI (web)" \
|
||||||
"build/.zip/Inter UI (hinted TTF)" \
|
"build/.zip/Inter UI (web hinted)" \
|
||||||
"build/.zip/Inter UI (TTF)" \
|
"build/.zip/Inter UI (TTF)" \
|
||||||
|
"build/.zip/Inter UI (TTF hinted)" \
|
||||||
"build/.zip/Inter UI (OTF)"
|
"build/.zip/Inter UI (OTF)"
|
||||||
@cp -a build/dist/*.woff build/dist/*.woff2 "build/.zip/Inter UI (web)/"
|
@cp -a build/dist-unhinted/*.woff build/dist-unhinted/*.woff2 \
|
||||||
@cp -a build/dist/*.ttf "build/.zip/Inter UI (hinted TTF)/"
|
"build/.zip/Inter UI (web)/"
|
||||||
|
@cp -a build/dist-hinted/*.woff build/dist-hinted/*.woff2 \
|
||||||
|
"build/.zip/Inter UI (web hinted)/"
|
||||||
@cp -a build/dist-unhinted/*.ttf "build/.zip/Inter UI (TTF)/"
|
@cp -a build/dist-unhinted/*.ttf "build/.zip/Inter UI (TTF)/"
|
||||||
|
@cp -a build/dist-hinted/*.ttf "build/.zip/Inter UI (TTF hinted)/"
|
||||||
@cp -a build/dist-unhinted/*.otf "build/.zip/Inter UI (OTF)/"
|
@cp -a build/dist-unhinted/*.otf "build/.zip/Inter UI (OTF)/"
|
||||||
@cp -a misc/doc/install-*.txt "build/.zip/"
|
@cp -a misc/doc/*.txt "build/.zip/"
|
||||||
@cp -a LICENSE.txt "build/.zip/"
|
@cp -a LICENSE.txt "build/.zip/"
|
||||||
cd build/.zip && zip -v -X -r "../../build/.zip.zip" * >/dev/null && cd ../..
|
cd build/.zip && zip -v -X -r "../../build/.zip.zip" * >/dev/null && cd ../..
|
||||||
@rm -rf build/.zip
|
@rm -rf build/.zip
|
||||||
|
|
@ -114,13 +117,19 @@ dist: pre_dist zip_dist glyphinfo copy_docs_fonts
|
||||||
copy_docs_fonts:
|
copy_docs_fonts:
|
||||||
rm -rf docs/font-files
|
rm -rf docs/font-files
|
||||||
mkdir docs/font-files
|
mkdir docs/font-files
|
||||||
cp -a build/dist/*.woff build/dist/*.woff2 build/dist-unhinted/*.otf docs/font-files/
|
cp -a build/dist-unhinted/*.woff build/dist-unhinted/*.woff2 build/dist-unhinted/*.otf docs/font-files/
|
||||||
|
|
||||||
install_ttf: all_ttf
|
install_ttf: all_ttf_unhinted
|
||||||
@echo "Installing TTF files locally at ~/Library/Fonts/Inter UI"
|
@echo "Installing TTF files locally at ~/Library/Fonts/Inter UI"
|
||||||
rm -rf ~/'Library/Fonts/Inter UI'
|
rm -rf ~/'Library/Fonts/Inter UI'
|
||||||
mkdir -p ~/'Library/Fonts/Inter UI'
|
mkdir -p ~/'Library/Fonts/Inter UI'
|
||||||
cp -va build/dist/*.ttf ~/'Library/Fonts/Inter UI'
|
cp -va build/dist-unhinted/*.ttf ~/'Library/Fonts/Inter UI'
|
||||||
|
|
||||||
|
install_ttf_hinted: all_ttf
|
||||||
|
@echo "Installing autohinted TTF files locally at ~/Library/Fonts/Inter UI"
|
||||||
|
rm -rf ~/'Library/Fonts/Inter UI'
|
||||||
|
mkdir -p ~/'Library/Fonts/Inter UI'
|
||||||
|
cp -va build/dist-hinted/*.ttf ~/'Library/Fonts/Inter UI'
|
||||||
|
|
||||||
install_otf: all_otf
|
install_otf: all_otf
|
||||||
@echo "Installing OTF files locally at ~/Library/Fonts/Inter UI"
|
@echo "Installing OTF files locally at ~/Library/Fonts/Inter UI"
|
||||||
|
|
@ -128,7 +137,7 @@ install_otf: all_otf
|
||||||
mkdir -p ~/'Library/Fonts/Inter UI'
|
mkdir -p ~/'Library/Fonts/Inter UI'
|
||||||
cp -va build/dist-unhinted/*.otf ~/'Library/Fonts/Inter UI'
|
cp -va build/dist-unhinted/*.otf ~/'Library/Fonts/Inter UI'
|
||||||
|
|
||||||
install: all install_otf
|
install: all_web install_otf
|
||||||
|
|
||||||
|
|
||||||
glyphinfo: docs/lab/glyphinfo.json docs/glyphs/metrics.json
|
glyphinfo: docs/lab/glyphinfo.json docs/glyphs/metrics.json
|
||||||
|
|
@ -151,6 +160,6 @@ _local/UnicodeData.txt:
|
||||||
http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
|
http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -vrf build/tmp/* build/dist/Inter-UI-*.*
|
rm -vrf build/tmp/* build/dist-hinted build/dist-unhinted
|
||||||
|
|
||||||
.PHONY: all web clean install install_otf install_ttf deploy zip zip_dist pre_dist dist glyphinfo copy_docs_fonts
|
.PHONY: all web clean install install_otf install_ttf deploy zip zip_dist pre_dist dist glyphinfo copy_docs_fonts all_hinted
|
||||||
|
|
|
||||||
26
init.sh
26
init.sh
|
|
@ -7,7 +7,7 @@ if [[ "${BUILD_DIR:0:2}" == "./" ]]; then
|
||||||
BUILD_DIR=${BUILD_DIR:2}
|
BUILD_DIR=${BUILD_DIR:2}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIST_DIR=$BUILD_DIR/dist
|
DIST_DIR=$BUILD_DIR/dist #-hinted|-unhinted
|
||||||
BUILD_TMP_DIR=$BUILD_DIR/tmp
|
BUILD_TMP_DIR=$BUILD_DIR/tmp
|
||||||
VENV_DIR=$BUILD_DIR/venv
|
VENV_DIR=$BUILD_DIR/venv
|
||||||
|
|
||||||
|
|
@ -255,19 +255,19 @@ else
|
||||||
|
|
||||||
# STYLE and STYLE_ttf targets
|
# STYLE and STYLE_ttf targets
|
||||||
for style in "${all_styles[@]}"; do
|
for style in "${all_styles[@]}"; do
|
||||||
echo "${style}_ttf: $DIST_DIR/Inter-UI-${style}.ttf" >> "$GEN_MAKE_FILE"
|
echo "${style}_ttf_hinted: $DIST_DIR-hinted/Inter-UI-${style}.ttf" >> "$GEN_MAKE_FILE"
|
||||||
|
echo "${style}_ttf: $DIST_DIR-unhinted/Inter-UI-${style}.ttf" >> "$GEN_MAKE_FILE"
|
||||||
echo "${style}_otf: $DIST_DIR-unhinted/Inter-UI-${style}.otf" >> "$GEN_MAKE_FILE"
|
echo "${style}_otf: $DIST_DIR-unhinted/Inter-UI-${style}.otf" >> "$GEN_MAKE_FILE"
|
||||||
echo "${style}_ttf_unhinted: $DIST_DIR-unhinted/Inter-UI-${style}.ttf" >> "$GEN_MAKE_FILE"
|
|
||||||
|
|
||||||
echo -n "${style}: ${style}_otf" >> "$GEN_MAKE_FILE"
|
echo -n "${style}: ${style}_otf" >> "$GEN_MAKE_FILE"
|
||||||
for format in "${web_formats[@]}"; do
|
for format in "${web_formats[@]}"; do
|
||||||
echo -n " $DIST_DIR/Inter-UI-${style}.${format}" >> "$GEN_MAKE_FILE"
|
echo -n " $DIST_DIR-unhinted/Inter-UI-${style}.${format}" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
|
|
||||||
echo -n "${style}_unhinted: ${style}_otf" >> "$GEN_MAKE_FILE"
|
echo -n "${style}_hinted: ${style}_ttf_hinted" >> "$GEN_MAKE_FILE"
|
||||||
for format in "${web_formats[@]}"; do
|
for format in "${web_formats[@]}"; do
|
||||||
echo -n " $DIST_DIR-unhinted/Inter-UI-${style}.${format}" >> "$GEN_MAKE_FILE"
|
echo -n " $DIST_DIR-hinted/Inter-UI-${style}.${format}" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
|
|
@ -286,9 +286,10 @@ else
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
|
|
||||||
echo -n "all_ttf_unhinted:" >> "$GEN_MAKE_FILE"
|
# all_ttf_hinted target
|
||||||
|
echo -n "all_ttf_hinted:" >> "$GEN_MAKE_FILE"
|
||||||
for style in "${all_styles[@]}"; do
|
for style in "${all_styles[@]}"; do
|
||||||
echo -n " ${style}_ttf_unhinted" >> "$GEN_MAKE_FILE"
|
echo -n " ${style}_ttf_hinted" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
|
|
||||||
|
|
@ -299,16 +300,17 @@ else
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
|
|
||||||
echo -n "all_web_unhinted:" >> "$GEN_MAKE_FILE"
|
# all_web_hinted target
|
||||||
|
echo -n "all_web_hinted:" >> "$GEN_MAKE_FILE"
|
||||||
for style in "${all_styles[@]}"; do
|
for style in "${all_styles[@]}"; do
|
||||||
echo -n " ${style}_unhinted" >> "$GEN_MAKE_FILE"
|
echo -n " ${style}_hinted" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
|
|
||||||
|
|
||||||
echo -n ".PHONY: all_ttf all_ttf_unhinted all_web all_web_unhinted all_otf all_ufo" >> "$GEN_MAKE_FILE"
|
echo -n ".PHONY: all_otf all_ttf_hinted all_ttf all_web all_web_hinted all_ufo" >> "$GEN_MAKE_FILE"
|
||||||
for style in "${all_styles[@]}"; do
|
for style in "${all_styles[@]}"; do
|
||||||
echo -n " ${style} ${style}_ttf ${style}_ttf_unhinted ${style}_otf" >> "$GEN_MAKE_FILE"
|
echo -n " ${style} ${style}_ttf ${style}_ttf_hinted ${style}_otf" >> "$GEN_MAKE_FILE"
|
||||||
done
|
done
|
||||||
echo "" >> "$GEN_MAKE_FILE"
|
echo "" >> "$GEN_MAKE_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
17
misc/doc/hinted vs unhinted.txt
Normal file
17
misc/doc/hinted vs unhinted.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
Inter UI font files comes in two versions:
|
||||||
|
|
||||||
|
1. Without TrueType hints (the default)
|
||||||
|
|
||||||
|
2. With TrueType hints (folder with "hinted" in their name)
|
||||||
|
|
||||||
|
|
||||||
|
The TrueType hints are used by ClearType on Windows machines where ClearType
|
||||||
|
is enabled. This usually changes the appearance of the fonts and can in some
|
||||||
|
cases increase the legibility of text.
|
||||||
|
|
||||||
|
However, the hints for Inter UI are automatically generated and are not always
|
||||||
|
a good thing. Additionally, hints are little computer programs that takes up
|
||||||
|
considerable disk space, meaning that font files with hints are larger than
|
||||||
|
those without hints. This might be a consideration when using web fonts.
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Installing on Windows 10:
|
Installing on Windows 10:
|
||||||
|
|
||||||
1. Open the "Inter UI (hinted TTF)" folder
|
1. Open the "Inter UI (OTF)" folder
|
||||||
2. Select all font files
|
2. Select all font files
|
||||||
3. Right-click the selected files and choose "Install"
|
3. Right-click the selected files and choose "Install"
|
||||||
|
|
||||||
|
|
@ -9,11 +9,24 @@ Installing on Windows 10:
|
||||||
Installing on Windows 10, manually:
|
Installing on Windows 10, manually:
|
||||||
|
|
||||||
1. Double-click the downloaded zip file
|
1. Double-click the downloaded zip file
|
||||||
2. Copy the "Inter UI (hinted TTF)" folder
|
2. Copy the "Inter UI (OTF)" folder
|
||||||
3. Press Win-Q on your keyboard, then type "fonts" and hit ENTER
|
3. Press Win-Q on your keyboard, then type "fonts" and hit ENTER
|
||||||
4. Paste the "Inter UI (hinted TTF)" folder.
|
4. Paste the "Inter UI (OTF)" folder.
|
||||||
|
|
||||||
If you have a previous installation of Inter UI, you should make sure
|
If you have a previous installation of Inter UI, you should make sure
|
||||||
to remove those fonts files before installing new ones.
|
to remove those fonts files before installing new ones.
|
||||||
|
|
||||||
|
|
||||||
|
ClearType-hinted fonts
|
||||||
|
|
||||||
|
Inter UI also comes with a version that has TrueType hints used by ClearType
|
||||||
|
on Windows. This changes the appearance of the fonts when rendered on a
|
||||||
|
system with ClearType enabled and can in some cases increase the legibility
|
||||||
|
of text. However, the hints for Inter UI are automatically generated and are
|
||||||
|
not always a good thing.
|
||||||
|
|
||||||
|
If you do prefer to use the version with hints, use the font files in the
|
||||||
|
folders with "hinted" in their name, like "Inter UI (TTF hinted)"
|
||||||
|
|
||||||
|
|
||||||
See https://github.com/rsms/inter for more information
|
See https://github.com/rsms/inter for more information
|
||||||
|
|
|
||||||
Reference in a new issue