Using drawText to render both latin and cjk characters.

185 views
Skip to first unread message

Michael Ong

unread,
Dec 25, 2014, 1:40:45 PM12/25/14
to skia-d...@googlegroups.com
Hi!

I'm just wondering if drawText can support drawing latin alphabet at the same time with cjk (or other non-latin) alphabet.

I tried calling drawText with the input string (which is in wchar_t) "Hello World! こんいちは!" but only the english one is rendered. I also set setTextEncoding in my SkPaint to UTF32.

Should I have to do additional stuff like specifying a typeface that has all the necessary character glyphs or can I just supply multiple font files to skia?

Thanks,
Michael

Cary Clark

unread,
Dec 26, 2014, 6:31:40 AM12/26/14
to skia-d...@googlegroups.com
Skia is a low level graphics library that primarily supports drawing specific glyphs with specific fonts. Applications like Chrome that use Skia use a library like Harfbuzz to shape the text and choose the appropriate glyphs and fonts.

While it's technically possible to implement your own font manager with Skia to do what you want, using a text shaper library is the way to go.

Cary

--
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 post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Michael Ong

unread,
Dec 26, 2014, 8:16:26 AM12/26/14
to skia-d...@googlegroups.com
How do I integrate Harfbuzz with Skia?

breadson xue

unread,
Nov 19, 2015, 6:23:25 PM11/19/15
to skia-discuss
Could you please give a example how to use Harfbuzz work with Skia?

在 2014年12月26日星期五 UTC-8上午5:16:26,Michael Ong写道:

Hal Canary

unread,
May 3, 2016, 11:46:31 AM5/3/16
to skia-discuss
On Thursday, November 19, 2015 at 6:23:25 PM UTC-5, breadson xue wrote:
Could you please give a example how to use Harfbuzz work with Skia?

On Friday, December 26, 2014 at 8:16:26 AM UTC-5, Michael Ong wrote:
How do I integrate Harfbuzz with Skia?

This is a common question, so I'm glad we now have an answer:  https://github.com/aam/skiaex

Reply all
Reply to author
Forward
0 new messages