different advances to compare with what is got by ios api

30 views
Skip to first unread message

Xinhua Chen

unread,
Sep 26, 2023, 4:11:29 AM9/26/23
to skia-discuss
Dear everyone,
we have developed a ios program with objective-c and ios system,  but skia is not called. Now we are develping a cross-platform program with skia and c++. 
I found a different advance with the same font and style in the two programs. For example, use arial regular font to render "REF". Debug the skia program, the advances.fx is 21.00, 19.00, 18.00.  Debug the iso program with same case, the advances.width is 20.79843 , 19.2093, 17.5921.
The different advances caused differnt wrapping line in the two programs. we hope that the warpping line is the same in different programs. I want to know why they are different?  how to fix the problem.
 Hoping for your help.Give my best regards for your help.

Xinhua Chen

unread,
Sep 26, 2023, 4:26:10 AM9/26/23
to skia-discuss

Mike Reed

unread,
Sep 26, 2023, 11:26:16 AM9/26/23
to skia-d...@googlegroups.com
If you're getting rounded values from Skia, you can try changing SkFont settings to ask for fractional ones.
- subpixel
- linearmetrics
- SkFontHinting::kSlight | kNone


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/057ee225-1191-41fa-b4f3-d9a353d81f27n%40googlegroups.com.


--
"I think I can safely say that nobody understands quantum mechanics." -- Richard Feynman
"It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so." -- Mark Twain
"I am pleased to see that we have differences" -- Surak

Reply all
Reply to author
Forward
0 new messages