skia-python
skia-python copied to clipboard
Documentation: Font Construction
Documentation states:
Constructs Font with default values with Typeface and size in points.
I think that's wrong: It's pixels. And to be more precise: It's something like "preferred pixel-size". I think we can prove that: loop through all typeface's and calc "fDescent-fAscent" at the same font size (it differs)
Visually: All Baselines here were equidistant (50px). All Font's are also rendered with 50px. Some of them appear smaller etc.
Code: https://github.com/0lru/p3ui/blob/main/demos/canvas/text.py

@see https://github.com/mono/SkiaSharp/issues/1147