[dev15-2][CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. - #1980
Merged
Merged
Conversation
…es bug 54148. (dotnet#1975) * [CoreText] Fix bug 54148 - CoreText.CTParagraphStyle does not pick up settings from CTParagraphStyleSettings https://bugzilla.xamarin.com/show_bug.cgi?id=54148 CTParagraphStyle float properties have the incorrect float return type, the headers state this API's returns CGFloats (aka nfloat) instead of floats this used to work ok fetching them due to there is no difference in size for 32 bits devices but once 64 bit devices appeared the API began to fail The actual method that fetches the values `CTParagraphStyleGetValueForSpecifier` asks for the size of the returned data and we used to give the size of a float which is incorrect in 64 bits devices and the API call just correctly returned false because it could not write back the value to us. Added tests for the full properties available on CTParagraphStyle * Add comment about the weird Dispose method implementation in CreateFromSettings
spouliot
approved these changes
Apr 10, 2017
Contributor
|
Build success |
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.
https://bugzilla.xamarin.com/show_bug.cgi?id=54148
CTParagraphStyle float properties have the incorrect float return type,
the headers state this API's returns CGFloats (aka nfloat) instead of floats
this used to work ok fetching them due to there is no difference in size
for 32 bits devices but once 64 bit devices appeared the API began to fail
The actual method that fetches the values
CTParagraphStyleGetValueForSpecifierasks for the size of the returned data and we used to give the size of a float
which is incorrect in 64 bits devices and the API call just correctly returned
false because it could not write back the value to us.
Added tests for the full properties available on CTParagraphStyle