skia-python icon indicating copy to clipboard operation
skia-python copied to clipboard

Documentation: Font Construction

Open 0lru opened this issue 4 years ago • 1 comments

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 image

0lru avatar Dec 03 '21 22:12 0lru

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

0lru avatar Dec 03 '21 23:12 0lru