Skip to content

Commit 78bf986

Browse files
src/__init__.py tests/test_font.py: address pymupdf#3933 with mupdf-1.24.11.
fz_enumerate_font_cmap2() is available in mupdf-1.24.11.
1 parent 1667ec0 commit 78bf986

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6508,7 +6508,7 @@ def valid_codepoints(self):
65086508
'''
65096509
Returns sorted list of valid unicodes of a fz_font.
65106510
'''
6511-
if mupdf_version_tuple < (1, 25):
6511+
if mupdf_version_tuple < (1, 24, 11):
65126512
# mupdf.fz_enumerate_font_cmap2() not available.
65136513
return []
65146514
ucs_gids = mupdf.fz_enumerate_font_cmap2(self.this)

tests/test_font.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def test_3933():
180180
font = pymupdf.Font(fontname=name, fontbuffer=content)
181181
supported_symbols = font.valid_codepoints()
182182
print(f'Font {name}: {len(supported_symbols)=}.', flush=1)
183-
if pymupdf.mupdf_version_tuple < (1, 25):
183+
if pymupdf.mupdf_version_tuple < (1, 24, 11):
184184
assert len(supported_symbols) == 0
185185
else:
186186
assert len(supported_symbols) == expected.get(name)

0 commit comments

Comments
 (0)