From f30e41b863ce4dc29b7b72e43308cb3c750921fa Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Thu, 30 Apr 2020 11:11:43 +0100 Subject: [PATCH] [ufoLib] Only write fontinfo.plist when there is content --- Lib/fontTools/ufoLib/__init__.py | 5 +++-- NEWS.rst | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/ufoLib/__init__.py b/Lib/fontTools/ufoLib/__init__.py index 4b864378a..88fd90405 100755 --- a/Lib/fontTools/ufoLib/__init__.py +++ b/Lib/fontTools/ufoLib/__init__.py @@ -1211,8 +1211,9 @@ class UFOWriter(UFOReader): if validate: infoData = validateInfoVersion2Data(infoData) infoData = _convertFontInfoDataVersion2ToVersion1(infoData) - # write file - self._writePlist(FONTINFO_FILENAME, infoData) + # write file if there is anything to write + if infoData: + self._writePlist(FONTINFO_FILENAME, infoData) # kerning.plist diff --git a/NEWS.rst b/NEWS.rst index 7c9e69c8d..cf8b0438d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,5 @@ +- [ufoLib] Only write fontinfo.plist when there is content to be had. + 4.9.0 (released 2020-04-29) ---------------------------