pdf.js/test/integration
Nicolò Ribaudo 5b29e935e1
Overrride the minimum font size when rendering the text layer
Browsers have an accessibility option that allows user to enforce
a minimum font size for all text rendered in the page, regardless
of what the font-size CSS property says. For example, it can be
found in Firefox under `font.minimum-size.x-western`.

When rendering the <span>s in the text layer, this causes the
text layer to not be aligned anymore with the underlying canvas.
While normally accessibility features should not be worked around,
in this case it is *not* improving accessibility:
- the text is transparent, so making it bigger doesn't make it more
  readable
- the selection UX for users with that accessibility option enabled
  is worse than for other users (it's basically unusable).

While there is tecnically no way to ignore that minimum font size,
this commit does it by multiplying all the `font-size`s in the text
layer by minFontSize, and then scaling all the `<span>`s down by
1/minFontSize.
2024-06-25 14:58:08 +02:00
..
.eslintrc Implement a linting rule to discourage using waitForTimeout for new tests 2024-04-09 16:12:15 +02:00
accessibility_spec.mjs Avoid to aria-hide the structure tree (bug 1894849) 2024-05-03 14:39:43 +02:00
annotation_spec.mjs Use waitForSelector instead of waitForFunction for focus checks 2024-05-06 19:35:37 +02:00
caret_browsing_spec.mjs Introduce a getRect utility function for the integration tests 2024-05-23 18:40:03 +02:00
copy_paste_spec.mjs Simplify the copy & paste integration test 2024-03-19 22:29:59 +01:00
find_spec.mjs Fix the "must highlight text in the right position" integration test 2024-04-11 13:42:08 +02:00
freetext_editor_spec.mjs Simplify the integration test in adding a function to turn on/off an editing tool 2024-05-27 11:33:52 +02:00
highlight_editor_spec.mjs [Editor] Fix intermittent failure in integration test when highlighting with the keyboard 2024-06-18 18:29:25 +02:00
ink_editor_spec.mjs Simplify the integration test in adding a function to turn on/off an editing tool 2024-05-27 11:33:52 +02:00
scripting_spec.mjs Remove most waitForTimeout usage from the scripting integration tests 2024-05-21 18:36:05 +02:00
stamp_editor_spec.mjs Fix the "copy/paste from a tab to an other" stamp editor integration test 2024-06-23 19:08:58 +02:00
test_utils.mjs Close the page in the text layer caret selection integration test 2024-06-23 12:46:18 +02:00
text_field_spec.mjs Remove terminal white spaces when extracting text from annotation appearances 2024-01-09 10:42:53 +01:00
text_layer_spec.mjs Overrride the minimum font size when rendering the text layer 2024-06-25 14:58:08 +02:00
viewer_spec.mjs Merge pull request #18218 from nicolo-ribaudo/test-maxCanvasPixels 2024-06-19 16:47:09 +02:00