We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f362bd commit fd45bd6Copy full SHA for fd45bd6
1 file changed
tests/test_general.py
@@ -2241,5 +2241,14 @@ def test_4902():
2241
with pymupdf.open('pdf', data) as doc:
2242
page = doc[0]
2243
spans = page.get_texttrace()
2244
- for span in spans:
2245
- print(f'test_4902(): {span["linewidth"]=}, should be {bw*fontsize=}.')
+ for i, span in enumerate(spans):
+ cs = ''.join([chr(cc[0]) for cc in span['chars']])
2246
+ print(f'test_4902(): {i=} {span["linewidth"]=} {cs=}')
2247
+ assert len(spans) == 2
2248
+ if pymupdf.mupdf_version_tuple >= (1, 28):
2249
+ assert spans[0]['linewidth'] is None
2250
+ assert spans[1]['linewidth'] == 8.0
2251
+ else:
2252
+ # Expect incorrect values.
2253
+ assert spans[0]['linewidth'] == 1.0
2254
+ assert spans[1]['linewidth'] == 1.0
0 commit comments