Fix TV overscan clipping and re-center player names #2
Loading…
Reference in a new issue
No description provided.
Delete branch "tv-overscan-and-centering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two rendering bugs found on the actual TV, both fixed in style.css.
Overscan was clipping the bottom row
The page used a ~3% safe-area margin. Most TVs still overscan by roughly
5% (the old broadcast title-safe standard) and crop whatever sits past
it - so the bottom row and part of the title were being cut off by the
panel itself, not by anything wrong in the page. Padding is now a proper
5% (54px/96px) on all sides.
Names sat low in their boxes
align-items: centercorrectly centers each row's line boxes, but theglyph ink inside the name box wasn't centered within its own box. Pulled
Pricedown's own hhea table: ascent 1000, descent 200 per em. At
line-height: 1that puts the baseline 41.5px into a 46px line box, andsince names are all-caps (no true descenders to use up that ascent
space), the visible letters cluster 8px low. Confirmed with Canvas
measureTextrather than eyeballed - also checked scores/ranks (ArialBlack), whose box centers to within 0.1px, so they're untouched.
Corrected with a measured
translateY(-8px), documented in a comment soit isn't mistaken for a stray offset later.
Testing
Re-rendered at 1920x1080 against the live site's HTML/CSS/JS and confirmed
via
getBoundingClientRectthat the name box's ink now centers exactly onthe row's center line.