Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved issue with labels #25

Open
ststeiger opened this issue Sep 7, 2021 · 1 comment
Open

Solved issue with labels #25

ststeiger opened this issue Sep 7, 2021 · 1 comment

Comments

@ststeiger
Copy link

I've found a solution to the issues with labels with Arabic/Berber (Tifinagh) writing-systems (scripts).
Incidentially, it also works with Asian and other scripts.
Problem is, Skia DrawText doesn't handle multi-script text-lines very well.
So you need to tell Skia which font to use (and either clip the additional scripts or for-loop the DawText for each ScriptRun).

I've added google noto-fonts, and have written a font-manager, here:
https://github.com/ststeiger/VectorTileRenderer/tree/master/VectorTileRenderer2/FontManager
https://github.com/ststeiger/VectorTileRenderer/blob/master/VectorTileRenderer2/FontManager/FontManager.cs#L180

Then you need to make a few changes in SkiaCanvas.DrawText
https://github.com/ststeiger/VectorTileRenderer/blob/master/VectorTileRenderer2/SkiaCanvas.cs#L438

It's not perfect just yet, but it preliminary works.

@AliFlux
Copy link
Owner

AliFlux commented Sep 9, 2021

Hi.

That's an interesting solution. Can you make it more generic and test it thoroughly? I can incorporate your contribution into this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants