Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to Nerd Fonts 3.2.1 #85

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Install configparser
run: pip3 install configparser
- name: Extract additional powerline glyphs
run: fontforge -lang=ff -script "`pwd`/extract-extra-glyphs" "`pwd`" `pwd`/src/**/octicons.ttf
run: fontforge -lang=ff -script "`pwd`/extract-extra-glyphs" "`pwd`" `pwd`/src/glyphs/octicons/octicons.ttf
- name: Build Powerline
run: |
./do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPL.ttf "Delugia PL"
Expand Down
8 changes: 5 additions & 3 deletions rename-font
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os.path
import fontforge
import sys, logging
from argparse import ArgumentParser

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

fname = os.path.splitext(os.path.basename(args.orig))[0]
n = FontnameParser(fname)
logger = logging.getLogger()
n = FontnameParser(fname, logger)
n.add_name_substitution_table(SIL_TABLE)
n.set_keep_regular_in_family(False)
if not n.parse_ok:
Expand All @@ -36,15 +38,15 @@ delugia=fontforge.open(args.input)
n.rename_font(delugia)

# Other information
delugia.appendSFNTName("English (US)", "UniqueID", "{};{}".format(args.version, n.ps_fontname()))
delugia.appendSFNTName("English (US)", "UniqueID", "{};{}".format(args.version, n.psname()))
delugia.appendSFNTName("English (US)", "Trademark", "")

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

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