Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Microsoft.Maui.Graphics.Skia do not support Chinese text drawing #473

@lindexi

Description

@lindexi

I try to draw the Chinese text by Microsoft.Maui.Graphics.Skia as the code:

            var skiaCanvas = new SkiaCanvas();
            skiaCanvas.Canvas = skCanvas;

            ICanvas canvas = skiaCanvas;
            canvas.Font = new Font("微软雅黑"); // The Microsoft Yahei font
            canvas.FontSize = 100;
            canvas.DrawString("汉字", 100, 100, HorizontalAlignment.Left);

The output is the Unknow char:

The expect output is:

All the code: https://github.com/lindexi/lindexi_gd/tree/d73bac5f5fa1aa94503420d221d451b99a656d27/SkiaSharp/RulawnaloyerKairjemhemwemlayca

And I think it is the bug about loading the font.

Reference: mono/SkiaSharp#1914

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions