mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
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. |
||
---|---|---|
.. | ||
chromium | ||
font | ||
fuzz | ||
images | ||
integration | ||
pdfs | ||
resources | ||
stats | ||
types | ||
unit | ||
.eslintrc | ||
.gitignore | ||
add_test.mjs | ||
annotation_layer_builder_overrides.css | ||
downloadutils.mjs | ||
draw_layer_test.css | ||
driver.js | ||
integration-boot.mjs | ||
test.mjs | ||
test_manifest.json | ||
test_slave.html | ||
testutils.mjs | ||
text_layer_test.css | ||
webserver.mjs | ||
xfa_layer_builder_overrides.css |