Files
antialgorithm/scripts
Vlad Lasky 6953bcdf91 check.py: render the backdrop only for text with opacity, not for thin text
The see-through text check rendered the design once more without the
text whenever the text never reached alpha 250. Thin opaque text
also stays below 250, so every 12-14 px label of a 1440x900 interface
at the default 800 px width got an extra render: 82 renders instead
of 42 for many40.svg, and the run took twice as long (3.7 s to 7.3 s),
in a check that visuals.md already says can take minutes.

Decide from the opacity and fill-opacity set on the text and its
ancestors (attribute or inline style) instead. For other text the
cover check compares only the pixels the text covers almost fully
(alpha above 200), as before the see-through change; comparing the
partly covered pixels of thin text without the backdrop called every
label of the 1440x900 test interface 53-100% covered. Contrast still
uses the letter mask scaled by the strongest alpha.

Text at opacity 0.6 (bad_covered_faint: 95% covered) and 0.1
(bad_faint: low contrast) is still checked against the blend, the
regression set gives the same output as before this commit, and
many40.svg is back to 42 renders. Opacity set from a <style> sheet is
not seen; such text is cover-checked as opaque, as it was upstream.
2026-11-26 14:40:39 +11:00
..