这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
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
9 changes: 6 additions & 3 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from __future__ import absolute_import, print_function, unicode_literals

# Change the script version when you edit this script:
script_version = "3.2.0"
script_version = "3.2.1"

version = "2.3.0-RC"
projectName = "Nerd Fonts"
Expand Down Expand Up @@ -925,8 +925,8 @@ class font_patcher:
else:
symbolFont.selection.select((str("ranges"), str("unicode")), symbolFontStart, symbolFontEnd)

# Get number of selected non-empty glyphs
symbolFontSelection = list(symbolFont.selection.byGlyphs)
# Get number of selected non-empty glyphs with codes >=0 (i.e. not -1 == notdef)
symbolFontSelection = [ x for x in symbolFont.selection.byGlyphs if x.unicode >= 0 ]
glyphSetLength = len(symbolFontSelection)

if self.args.quiet is False:
Expand All @@ -953,6 +953,9 @@ class font_patcher:
possible_codes += [ sym_glyph.unicode ]
if sym_glyph.altuni:
possible_codes += [ v for v, s, r in sym_glyph.altuni if v > currentSourceFontGlyph ]
if len(possible_codes) == 0:
print(" Can not determine codepoint of {:X}. Skipping...".format(sym_glyph.unicode))
continue
currentSourceFontGlyph = min(possible_codes)
else:
# use source font defined hex values based on passed in start (fills gaps; symbols are packed)
Expand Down