Display Chinese text

Hi, all

Can VL Display Chinese Text in IOBOX??

vlIobxCH

Thanks.

I think this is a known bug:

the comments in the iobox are using “Lucida Sans Unicode” in italic. can you test the same in the Skia Renderer using a Text node? it should behave the same at least.

@joreg I tried with an string iobox where the font isn’t italic. It shows the same behaviour, when selected the character is displayed otherwise not.

ok but what about in the skia renderer?

Yes, Skia works.

ok, can you please attach a demo patch that shows that?

OK, sure.

Skia_ChineseTEXT.vl (4.4 KB)

Doesn’t work for me when using Lucida Sans Unicode. Even though it works in other programs so the font supports it.

LucidaSansUnicode_LO

Tested also with other fonts like Fira Sans, they work in other programs but do not in gamma/skia.
There are fonts that work though:

Some info:
“drawText does no glyph shaping, so if a character does not have a 1:1
glyph mapping in the cmap table you will see problems (usually
characters not showing up)”
sauce

“Canvas DrawText is almost unusable directly in real world. If you want to localize app to other languages, like arabic o hebrew, you have to use text shaping. Try to SkiaSharp HarfBuzz and use extension DrawShapedText if it helps”
Rendering multi character emoji in SkiaSharp

How to draw Japanese text with SkiaSharp on Xamarin

SKCanvas.DrawText does not render Unicode characters

@jzzxh what exactly does your patch demonstrate? it has font set to arial, and in the renderer i see:
grafik
so it doesn’t really work in the skia renderer, right? even if i change for to Lucida Sans Unicode

On a chinese system the default might not be Arial, maybe?

I have to set Chinese font Family

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.