Created
October 16, 2017 17:33
-
-
Save xinhaoyuan/2acc46b0b4c7b08246fdedf4d247846c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Consolas family has been rendered weirdly on Linux. | |
# Use fontforge to modify vertical metric fix the issue, | |
# but I am not complete sure since it's my first time to do it. | |
# It requires fontforge to be installed. | |
for ttf in consola*; do | |
fontforge -lang=ff -script <<EOF | |
Open("$ttf") | |
SetOS2Value("HHeadAscent", 1621) | |
SetOS2Value("HHeadDescent", -427) | |
# SetOS2Value("TypoAscent", 1621) # Do we need these? Ignoring them looks fine ... | |
# SetOS2Value("TypoDescent", -427) | |
Generate("$ttf") | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment