Fix load the font which the name contains unicode text#2146
Merged
Conversation
Contributor
Author
mattleibow
requested changes
Jul 8, 2022
mattleibow
left a comment
Collaborator
There was a problem hiding this comment.
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
approved these changes
Aug 8, 2022
mattleibow
left a comment
Collaborator
There was a problem hiding this comment.
Awesome! Ready to go!
mattleibow
added a commit
that referenced
this pull request
Aug 8, 2022
Co-authored-by: lindexi <lindexi_gd@163.com>
Collaborator
|
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 |
Contributor
Author
|
Thank you @mattleibow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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