How do I set font hinting when using SkParagraph?

265 views
Skip to first unread message

Roman Petrenko

unread,
Sep 4, 2020, 2:29:16 AM9/4/20
to skia-discuss
There used to be a method to specify font hinting on SkPaint, but it was moved to SkFont. However, when using textlayout/SkParagraph, I don't seem to have a way to access SkFont structs to call methods on them, I can only provide SkTypeface via font manager. So is it possible to set font hinting when using SkParagraph with current Skia?

Devin Kerr

unread,
Jan 28, 2022, 5:29:56 PM1/28/22
to skia-discuss
Did you ever find a solution for this? We've patched the OneLineShaper to hardcode kSubpixelAntiAlias for now, but we'd also like to have the ability to set font hinting / edging dynamically in SkParagraph.

Roman Petrenko

unread,
Feb 9, 2022, 9:54:08 PM2/9/22
to skia-discuss
Sorry for the late response David, we ended up doing exactly what you described.

Devin Kerr

unread,
Feb 11, 2022, 3:17:05 PM2/11/22
to skia-discuss
Cheers. We ended up patching it to allow dynamic setting of the hinting, but we'd love to see this supported natively in Skia!
Reply all
Reply to author
Forward
0 new messages