mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-07 17:06:25 +02:00
Merge pull request #711 from ryanoasis/bufix/ligature-leftover
font-patcher: Remove obsolete metadata on glyph exchange
This commit is contained in:
commit
a457461cdd
12
font-patcher
12
font-patcher
@ -706,16 +706,20 @@ class font_patcher:
|
||||
sym_dim = get_glyph_dimensions(sym_glyph)
|
||||
|
||||
# check if a glyph already exists in this location
|
||||
if copiedToSlot.startswith("uni"):
|
||||
copiedToSlot = copiedToSlot[3:]
|
||||
codepoint = int("0x" + copiedToSlot, 16)
|
||||
if careful or 'careful' in sym_attr['params']:
|
||||
if copiedToSlot.startswith("uni"):
|
||||
copiedToSlot = copiedToSlot[3:]
|
||||
codepoint = int("0x" + copiedToSlot, 16)
|
||||
if codepoint in self.sourceFont:
|
||||
if self.args.quiet is False:
|
||||
print(" Found existing Glyph at {}. Skipping...".format(copiedToSlot))
|
||||
|
||||
# We don't want to touch anything so move to next Glyph
|
||||
continue
|
||||
else:
|
||||
# If we overwrite an existing glyph all subtable entries regarding it will be wrong
|
||||
# (Probably; at least if we add a symbol and do not substitude a ligature or such)
|
||||
if codepoint in self.sourceFont:
|
||||
self.sourceFont[codepoint].removePosSub("*")
|
||||
|
||||
# Select and copy symbol from its encoding point
|
||||
# We need to do this select after the careful check, this way we don't
|
||||
|
Loading…
Reference in New Issue
Block a user