Mercurial > hgrepos > Python2 > PyMuPDF
comparison tests/test_font.py @ 39:a6bc019ac0b2 upstream
ADD: PyMuPDF v1.26.5: the original sdist.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 11 Oct 2025 11:19:58 +0200 |
| parents | 1d09e1dec1d9 |
| children |
comparison
equal
deleted
inserted
replaced
| 2:b50eed0cc0ef | 39:a6bc019ac0b2 |
|---|---|
| 81 print(f'test_2608(): {text.encode("utf8")=}') | 81 print(f'test_2608(): {text.encode("utf8")=}') |
| 82 print(f'test_2608(): {expected.encode("utf8")=}') | 82 print(f'test_2608(): {expected.encode("utf8")=}') |
| 83 assert text == expected | 83 assert text == expected |
| 84 | 84 |
| 85 def test_fontarchive(): | 85 def test_fontarchive(): |
| 86 if os.environ.get('PYODIDE_ROOT'): | |
| 87 print('test_fontarchive(): not running on Pyodide - we get ValueError: No font code \'notos\' found in pymupdf-fonts..') | |
| 88 return | |
| 89 | |
| 86 import subprocess | 90 import subprocess |
| 87 arch = pymupdf.Archive() | 91 arch = pymupdf.Archive() |
| 88 css = pymupdf.css_for_pymupdf_font("notos", archive=arch, name="sans-serif") | 92 css = pymupdf.css_for_pymupdf_font("notos", archive=arch, name="sans-serif") |
| 89 print(css) | 93 print(css) |
| 90 print(arch.entry_list) | 94 print(arch.entry_list) |
| 232 print(f'Have saved to: {path_pixmap=}') | 236 print(f'Have saved to: {path_pixmap=}') |
| 233 assert set(output)==set(text) | 237 assert set(output)==set(text) |
| 234 | 238 |
| 235 | 239 |
| 236 def test_4457(): | 240 def test_4457(): |
| 241 if os.environ.get('PYODIDE_ROOT'): | |
| 242 print('test_4457(): not running on Pyodide - cannot run child processes.') | |
| 243 return | |
| 244 | |
| 237 print() | 245 print() |
| 238 files = ( | 246 files = ( |
| 239 ('https://github.com/user-attachments/files/20862923/test_4457_a.pdf', 'test_4457_a.pdf', None, 4), | 247 ('https://github.com/user-attachments/files/20862923/test_4457_a.pdf', 'test_4457_a.pdf', None, 4), |
| 240 ('https://github.com/user-attachments/files/20862922/test_4457_b.pdf', 'test_4457_b.pdf', None, 9), | 248 ('https://github.com/user-attachments/files/20862922/test_4457_b.pdf', 'test_4457_b.pdf', None, 9), |
| 241 ) | 249 ) |
