mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-02-06 12:35:00 +02:00
Remove Hack postprocessing
[why] The special Hack postprocessing does this: * Add a dummy signature * Set fsType to zero * run ttfautohint on the font There once has been reason to do this (probably), but on currently supported fontforges this is not needed anymore. * Fonts run fine without the signature * fsType is anyhow zero, set by fontforge * the preexisting hinting is kept by fontforge (furthermore: We do not want hints for the symbols usually) Double-checked source and patched font with ttx, instructions (hints) are definitively existing and equal in the patched font. So we do not need any of this special postprocessing anymore. See also commit e9d84b6c0 Adds WIP scripts and logic for post processing patched fonts (WIP for fixing #70) Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
5922a6bab9
commit
f56f97d4e1
@ -1,21 +0,0 @@
|
||||
|
||||
# U+0021 exclam glyph ID 580
|
||||
exclam touch 22,23,24,25 y -0.5 @14
|
||||
|
||||
# U+0025 percent glyph ID 762
|
||||
percent touch 0,1,16 y 0.75 @10,11
|
||||
percent touch 23,24,25 y 0.25 @10,11
|
||||
percent touch 17,18,32,46,47,48 y 0.5 @10,11
|
||||
percent touch 57,58,71 y -0.25 @10,11
|
||||
percent touch 33,34,35,36 y 0.5 @10,11
|
||||
percent touch 63,64,65 y 0.75 @10,11
|
||||
|
||||
percent touch 23,24,25,63,64,65 y 0.5 @14
|
||||
percent touch 17,18,32,57,58,71 y -0.5 @14
|
||||
|
||||
# U+002B plus glyph ID 765
|
||||
plus touch 0,1,2,3,6,7,8,9 y 0.5 @10,11
|
||||
|
||||
# U+0038 eight glyph ID 556
|
||||
uni0038 touch 41,42,43 y 0.25 @12,13,14
|
||||
uni0038 touch 34,35,48 y -0.25 @12,13,14
|
@ -1,4 +0,0 @@
|
||||
|
||||
# U+002B plus glyph ID 751
|
||||
plus touch 0,1,2,3,6,7,8,9 y 0.5 @10,11
|
||||
|
@ -1,21 +0,0 @@
|
||||
# [ U+002B ] adjust the space in the vertical stroke of bar glyph
|
||||
# bar touch 4,7 y 0.5 @ 6
|
||||
# bar touch 4,7 y 0.25 @ 7
|
||||
# bar touch 4,7 y 1 @ 10,11,12,13,14
|
||||
# bar touch 0,3 y -0.25 @ 6
|
||||
# bar touch 0,3 y -0.5 @ 7
|
||||
# bar touch 0,3 y -1 @ 10,14
|
||||
|
||||
# # U+0025 percent glyph 750
|
||||
percent touch 0,1,21,22,23,39 y 0.5 @10
|
||||
percent touch 40 y 0.75 @10
|
||||
percent touch 41,42,43 y 0.5 @10
|
||||
percent touch 51,52,53,72,73,74 y 0.5 @10
|
||||
|
||||
percent touch 40,43 y -0.75 @11
|
||||
percent touch 41,42 y 0.75 @11
|
||||
|
||||
percent touch 0,1,21,22,23,39 y -0.25 @14
|
||||
percent touch 8,9,10,30,31,32 y 0.25 @14
|
||||
percent touch 51,52,53,72,73,74 y -0.5 @14
|
||||
percent touch 40,41,42,43 y -0.25 @14
|
@ -1,25 +0,0 @@
|
||||
|
||||
# U+0023 numbersign glyph ID 582
|
||||
numbersign touch 0,1,2,3,18,19,20,21,22,23,24,25,26,27,28,31 x 0.25 @ 13
|
||||
|
||||
# U+0025 percent glyph 761
|
||||
percent touch 0,1,21,22,23,39 y 0.5 @10
|
||||
percent touch 40 y 0.75 @10
|
||||
percent touch 41,42,43 y 0.5 @10
|
||||
percent touch 51,52,53,70,71,72 y 0.5 @10
|
||||
|
||||
percent touch 40,43 y -0.75 @11
|
||||
percent touch 41,42 y 0.75 @11
|
||||
|
||||
percent touch 0,1,21,22,23,39 y -0.25 @14
|
||||
percent touch 8,9,10,30,31,32 y 0.25 @14
|
||||
percent touch 51,52,53,70,71,72 y -0.5 @14
|
||||
percent touch 40,41,42,43 y -0.25 @14
|
||||
|
||||
# U+002B plus glyph ID 764
|
||||
plus touch 4,5,10,11 y 0.5 @12
|
||||
plus touch 4,5 y 1.0 @13
|
||||
|
||||
# U+0030 zero glyph ID 548
|
||||
uni0030 touch 35,36,45,46,47,56 y -0.5 @8
|
||||
uni0030 touch 35,36,56 y -1.0 @12,13,14
|
@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# ------------------------------------------------------------------
|
||||
#
|
||||
# autohint.sh
|
||||
# Copyright 2016 Christopher Simpkins
|
||||
# MIT license
|
||||
# Modified by Ryan L McIntyre
|
||||
# for Nerd Fonts (https://github.com/ryanoasis/nerd-fonts)
|
||||
# Nerd Fonts Version: 2.3.3
|
||||
# Script Version: 1.1.1
|
||||
#
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# DESCRIPTION
|
||||
# Applies hints to the Hack ttf font builds with ttfautohint
|
||||
# Executable: ttfautohint (http://www.freetype.org/ttfautohint/doc/ttfautohint.html)
|
||||
|
||||
fontfile=$1
|
||||
|
||||
echo "[Nerd Fonts] Autohinting Hack '$fontfile'"
|
||||
|
||||
command -v ttfautohint >/dev/null 2>&1 || {
|
||||
echo "[Nerd Fonts] 'ttfautohint' is required (not installed). Aborting." >&2; exit 1;
|
||||
}
|
||||
|
||||
nerdfonts_hack_scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# ttfautohint - Input and output file names must not be identical
|
||||
cp "$fontfile" "${fontfile}.tmp"
|
||||
|
||||
if [[ "$fontfile" == *"Regular"* ]]
|
||||
then
|
||||
echo "[Nerd Fonts] Hinting Hack Regular"
|
||||
ttfautohint -l 6 -r 50 -x 10 -H 181 -D latn -f latn -w G -W -t -X "" -I -m "${nerdfonts_hack_scripts_dir}/Hack-Regular-TA.txt" "${fontfile}.tmp" "$fontfile"
|
||||
elif [[ "$fontfile" == *"Bold"* ]]
|
||||
then
|
||||
echo "[Nerd Fonts] Hinting Hack Bold"
|
||||
ttfautohint -l 6 -r 50 -x 10 -H 260 -D latn -f latn -w G -W -t -X "" -I -m "${nerdfonts_hack_scripts_dir}/Hack-Bold-TA.txt" "${fontfile}.tmp" "$fontfile"
|
||||
elif [[ "$fontfile" == *"Italic"* ]]
|
||||
then
|
||||
echo "[Nerd Fonts] Hinting Hack Italic"
|
||||
ttfautohint -l 6 -r 50 -x 10 -H 145 -D latn -f latn -w G -W -t -X "" -I -m "${nerdfonts_hack_scripts_dir}/Hack-Italic-TA.txt" "${fontfile}.tmp" "$fontfile"
|
||||
elif [[ "$fontfile" == *"BoldItalic"* ]]
|
||||
then
|
||||
echo "[Nerd Fonts] Hinting Hack Bold Italic"
|
||||
ttfautohint -l 6 -r 50 -x 10 -H 265 -D latn -f latn -w G -W -t -X "" -I -m "${nerdfonts_hack_scripts_dir}/Hack-BoldItalic-TA.txt" "${fontfile}.tmp" "$fontfile"
|
||||
else
|
||||
echo "[Nerd Fonts] Could not find any Hack fonts to hint..."
|
||||
fi
|
||||
|
||||
# clean-up
|
||||
rm "${fontfile}.tmp"
|
||||
|
||||
echo "[Nerd Fonts] Completed Autohinting Hack '$fontfile'"
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2013,2016 The Font Bakery Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# See AUTHORS.txt for the list of Authors and LICENSE.txt for the License.
|
||||
|
||||
# Adapted for the Hack typeface build workflow by Chris Simpkins
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
import sys
|
||||
import os
|
||||
from fontTools import ttLib
|
||||
|
||||
|
||||
def set_empty_dsig(ttFont):
|
||||
newDSIG = ttLib.newTable("DSIG")
|
||||
newDSIG.ulVersion = 1
|
||||
newDSIG.usFlag = 0
|
||||
newDSIG.usNumSigs = 0
|
||||
newDSIG.signatureRecords = []
|
||||
ttFont.tables["DSIG"] = newDSIG
|
||||
|
||||
def main(argv):
|
||||
for path in argv:
|
||||
if not os.path.exists(path):
|
||||
sys.stderr.write("[fix-dsig.py] ERROR: " + path + " is not a valid path to a font file")
|
||||
sys.exit(1)
|
||||
else:
|
||||
font = ttLib.TTFont(path)
|
||||
set_empty_dsig(font)
|
||||
font.save(path)
|
||||
print(path + " - successful DSIG table fix")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016 The Fontbakery Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Adapted for the Hack typeface build workflow by Chris Simpkins
|
||||
|
||||
import os
|
||||
import sys
|
||||
from fontTools.ttLib import TTFont
|
||||
|
||||
def main(argv):
|
||||
for path in argv:
|
||||
if not os.path.exists(path):
|
||||
sys.stderr.write("[fix-fstype.py] ERROR: " + path + " is not a valid path to a font file")
|
||||
sys.exit(1)
|
||||
else:
|
||||
font = TTFont(path)
|
||||
font['OS/2'].fsType = 0
|
||||
font.save(path)
|
||||
print(path + " - successful fstype fix")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Nerd Fonts Version: 2.3.3
|
||||
# Script Version: 1.2.0
|
||||
|
||||
fontfile=$1
|
||||
dir=$(dirname "$0")
|
||||
|
||||
"${dir}/fix-dsig.py" "$fontfile"
|
||||
"${dir}/fix-fstype.py" "$fontfile"
|
||||
"${dir}/autohint.sh" "$fontfile"
|
||||
|
||||
printf "\\n"
|
||||
printf "[Nerd Fonts] Post Processed Hack '%s'\\n" "$fontfile"
|
||||
|
@ -241,6 +241,8 @@ function patch_font {
|
||||
|
||||
if [ "$post_process" ]
|
||||
then
|
||||
# There is no postprocess active anymore, see the commit that introduced
|
||||
# this comment for the Hack postprocess we once had. It called e.g. ttfautohint.
|
||||
post_process="--postprocess=${repo_root_dir}/${post_process}"
|
||||
else
|
||||
post_process=""
|
||||
|
@ -1,3 +1 @@
|
||||
config_has_powerline=1
|
||||
[font-patcher]
|
||||
post_process=bin/scripts/Hack/postprocess.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user