Introduce a rem unit in the type system

This allows specifying font sizes relative to the Window's
default-font-size, similar to CSS rem.
This commit is contained in:
Simon Hausmann 2022-11-03 20:00:55 +01:00 committed by Simon Hausmann
parent 75ccd897ed
commit d8a1f2cf01
22 changed files with 232 additions and 58 deletions

View file

@ -18,6 +18,7 @@ The follow table summarizes the entire mapping:
:code:`length` :code:`float` At run-time, logical lengths are automatically translated to physical pixels using the device pixel ratio.
:code:`duration` :code:`std::int64_t` At run-time, durations are always represented as signed 64-bit integers with millisecond precision.
:code:`angle` :code:`float` The value in degrees.
:code:`relative-font-size` :code:`float` Relative font size factor that is multiplied with the `Window.default-font-size` and can be converted to a `length`.
structure A :code:`class` of the same name The order of the data member are in the lexicographic order of their name
========================== ================================== =======================================================================================================================================
```