Skip to content

Commit a536694

Browse files
committed
Reset file pointer when saving to fileobject.
1 parent a90a7ab commit a536694

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fontbro/font.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ def _init_with_ttfont(
426426
) -> None:
427427
self._fileobject = BytesIO()
428428
ttfont.save(self._fileobject)
429+
self._fileobject.seek(0)
429430
self._ttfont = TTFont(self._fileobject, **kwargs)
430431
self._kwargs = kwargs
431432

@@ -1796,6 +1797,7 @@ def save_to_fileobject(
17961797
if fileobject is None:
17971798
fileobject = BytesIO()
17981799
font.save(fileobject)
1800+
fileobject.seek(0)
17991801
return fileobject
18001802

18011803
def save_variable_instances(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy