mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-25 20:18:01 +02:00
font-patcher: Remove leftover code
[why] There is a bit of code that is not needed anymore (or was never needed). This makes things look more complicated than they are. [how] 1. It is plain wrong to write that we add one (1) glyph if we do not add any glyph. 2. One (1) is added to index later anyhow, so we do not need to distort the counting in the beginning (the code will run with index=1 for both the first and the second patched in glyph). Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
882e04271e
commit
de659388e9
@ -1127,7 +1127,6 @@ class font_patcher:
|
||||
""" Copies symbol glyphs into self.sourceFont """
|
||||
progressText = ''
|
||||
careful = False
|
||||
glyphSetLength = 0
|
||||
sourceFontCounter = 0
|
||||
|
||||
if self.args.careful:
|
||||
@ -1148,14 +1147,12 @@ class font_patcher:
|
||||
glyphSetLength = len(symbolFontSelection)
|
||||
|
||||
if not self.args.quiet:
|
||||
sys.stdout.write("Adding " + str(max(1, glyphSetLength)) + " Glyphs from " + setName + " Set \n")
|
||||
sys.stdout.write("Adding {} Glyphs from {} Set\n".format(glyphSetLength, setName))
|
||||
|
||||
currentSourceFontGlyph = -1 # initialize for the exactEncoding case
|
||||
width_warning = False
|
||||
|
||||
for index, sym_glyph in enumerate(symbolFontSelection):
|
||||
index = max(1, index)
|
||||
|
||||
sym_attr = attributes.get(sym_glyph.unicode)
|
||||
if sym_attr is None:
|
||||
sym_attr = attributes['default']
|
||||
|
Loading…
Reference in New Issue
Block a user