-
Notifications
You must be signed in to change notification settings - Fork 601
Fix load the font which the name contains unicode text #2146
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
Conversation
mattleibow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR and catching those unicode issues!
The SkiaApi.generated.cs is generated by the tools, so these changes will get overwritten. You should rather edit the json file and then re-run the generator: https://github.com/mono/SkiaSharp/tree/main/utils#generate
mattleibow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Ready to go!
Co-authored-by: lindexi <lindexi_gd@163.com>
|
I absolutely butchered the merge, so the commit is not so great. Sorry about that - had to create a special merge commit on that: 6f8fc4d |
|
Thank you @mattleibow |
Description of Change
I change the string input argument from
stringto IntPtr. Thesk_fontmgr_match_family_styleshould input theutf8encoding string, but we will input the Unicode16 string to it. That is why we can not load the font which the font name contains the unicode text, such as the Chinese font.Bugs Fixed
API Changes
None.
Behavioral Changes
Now, we can load the font which the font name contains unicode text, such as the Chinese font.
Required skia PR
None.
PR Checklist