Skip to content

Commit

Permalink
Remove test font generation script within test
Browse files Browse the repository at this point in the history
  • Loading branch information
spacegaori committed Jan 29, 2025
1 parent 8d8d946 commit 65af26f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Binary file not shown.
13 changes: 0 additions & 13 deletions test/fonts/test_add_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,6 @@ def test_add_font_uppercase():

def test_add_font_missing_notdef_glyph(caplog):
pdf = FPDF()

# use Roboto to create a test font missing .notdef glyph
pdf.add_font(fname=HERE / "Roboto-Regular.ttf")
font = TTFont(HERE / "Roboto-Regular.ttf")
glyphnames = font.getGlyphOrder()
glyphnames[0] = "dummy"
font = TTFont(HERE / "Roboto-Regular.ttf")
font.setGlyphOrder(glyphnames)
# Accessing the 'post' table triggers its lazy loading in fontTools.
# This ensures that changes to the table are applied and saved.
post = font["post"]
font.save(HERE / "Roboto-Regular-without-notdef.ttf")

pdf.add_font(family="Roboto", fname=HERE / "Roboto-Regular-without-notdef.ttf")
assert pdf.fonts is not None and len(pdf.fonts) != 0 # fonts add successful
assert (
Expand Down

0 comments on commit 65af26f

Please sign in to comment.