ilinxcode / deprecated-whale-beta

0 stars 5 forks source link

UI - Replace Explicit Font Sizes with Size Labels ("small", "medium", "large", e.t.c.) #5

Closed tsnl closed 5 years ago

tsnl commented 5 years ago

Text does not scale to fit inside tiles when we resize windows. While it is ideal that fonts are rendered at a constant size (in device-independent pixels), we cannot help if a user makes their window so small, the text would otherwise be unreadable. We need a better way to scale font-sizes.

An early implementation of this repo brute-forced a range of font-sizes to find one that would fit in the tile-rectangle specified in the layout. This looked very ugly because two Hp_TextTile instances with text of differing length that we expect to be of the same font-size would render at different sizes.

Thus, we need some way to ensure that:

Requirements:

Note:

richiesomething commented 5 years ago

If no one is working on this I can work on it. I don't know how to assign myself to it

richiesomething commented 5 years ago

it should be done using the vw/vh modern font sizes. See this mdn wiki for info https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Values_and_units

richiesomething commented 5 years ago

submitted pr