File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,12 +441,14 @@ def handle_missing_glyphs(span, container):
441441 return
442442 get_glyph , _ = create_lig_kern (span , container )
443443 string = []
444+ has_missing_glyphs = False
444445 for char in span .text (container ):
445446 try :
446447 if char not in '\n \t \N{ZERO WIDTH SPACE} \N{NO-BREAK SPACE} ' :
447448 get_glyph (char )
448449 string .append (char )
449450 except MissingGlyphException :
451+ has_missing_glyphs = True
450452 if string :
451453 yield SingleStyledText ('' .join (string ), parent = span )
452454 string .clear ()
@@ -455,6 +457,9 @@ def handle_missing_glyphs(span, container):
455457 else :
456458 fallback_span = SingleStyledText (char , style = FALLBACK_STYLE , parent = span )
457459 yield from handle_missing_glyphs (fallback_span , container )
460+ if not has_missing_glyphs :
461+ yield span
462+ return
458463 if string :
459464 yield SingleStyledText ('' .join (string ), parent = span )
460465
You can’t perform that action at this time.
0 commit comments