We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf71b2 commit 283d88fCopy full SHA for 283d88f
1 file changed
src/PIL/ImageFont.py
@@ -675,8 +675,12 @@ def get_variation_names(self) -> list[bytes]:
675
:returns: A list of the named styles in a variation font.
676
:exception OSError: If the font is not a variation font.
677
"""
678
- names = self.font.getvarnames()
679
- return [name.replace(b"\x00", b"") for name in names]
+ names = []
+ for name in self.font.getvarnames():
680
+ name = name.replace(b"\x00", b"")
681
+ if name not in names:
682
+ names.append(name)
683
+ return names
684
685
def set_variation_by_name(self, name: str | bytes) -> None:
686
0 commit comments