Skip to content

Commit afd3e45

Browse files
committed
Adapt to Nerd Fonts 3.2.1
[why] Some internals of the font-patcher changed since 2.3.3, that we use directly. Signed-off-by: Fini Jastrow <[email protected]>
1 parent 9837d7a commit afd3e45

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
- name: Install configparser
106106
run: pip3 install configparser
107107
- name: Extract additional powerline glyphs
108-
run: fontforge -lang=ff -script "`pwd`/extract-extra-glyphs" "`pwd`" `pwd`/src/**/octicons.ttf
108+
run: fontforge -lang=ff -script "`pwd`/extract-extra-glyphs" "`pwd`" `pwd`/src/glyphs/octicons/octicons.ttf
109109
- name: Build Powerline
110110
run: |
111111
./do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPL.ttf "Delugia PL"

rename-font

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import os.path
55
import fontforge
6+
import sys, logging
67
from argparse import ArgumentParser
78

89
sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0])) + '/bin/scripts/name_parser/')
@@ -23,7 +24,8 @@ SIL_TABLE = [('cascadia ?(code|mono)( ?pl)?', args.name), ]
2324
print("\nRenaming process\n {}\n as {}\n -> {}".format(args.input, args.orig, args.output))
2425

2526
fname = os.path.splitext(os.path.basename(args.orig))[0]
26-
n = FontnameParser(fname)
27+
logger = logging.getLogger()
28+
n = FontnameParser(fname, logger)
2729
n.add_name_substitution_table(SIL_TABLE)
2830
n.set_keep_regular_in_family(False)
2931
if not n.parse_ok:
@@ -36,15 +38,15 @@ delugia=fontforge.open(args.input)
3638
n.rename_font(delugia)
3739

3840
# Other information
39-
delugia.appendSFNTName("English (US)", "UniqueID", "{};{}".format(args.version, n.ps_fontname()))
41+
delugia.appendSFNTName("English (US)", "UniqueID", "{};{}".format(args.version, n.psname()))
4042
delugia.appendSFNTName("English (US)", "Trademark", "")
4143

4244
# Mix our version information in
4345
delugia.sfntRevision = None # Auto-set (refreshed) by fontforge
4446
delugia.appendSFNTName("English (US)", "Version", args.version)
4547
delugia.version = args.version
4648

47-
if n.ps_fontname().lower().find("mono"):
49+
if n.psname().lower().find("mono"):
4850
# For MS-Windows console apps
4951
panose = list(delugia.os2_panose)
5052
if panose[0] < 3: # https://forum.high-logic.com/postedfiles/Panose.pdf

0 commit comments

Comments
 (0)