Skip to content

[dev15-2][CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. - #1980

Merged
spouliot merged 1 commit into
dotnet:d15-2from
dalexsoto:coretext
Apr 10, 2017
Merged

[dev15-2][CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148.#1980
spouliot merged 1 commit into
dotnet:d15-2from
dalexsoto:coretext

Conversation

@dalexsoto

Copy link
Copy Markdown
Member
  • [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

…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 spouliot added this to the d15-2 milestone Apr 10, 2017
@monojenkins

Copy link
Copy Markdown
Contributor

Build success

@spouliot
spouliot merged commit 6bea7a5 into dotnet:d15-2 Apr 10, 2017
@dalexsoto
dalexsoto deleted the coretext branch April 10, 2017 20:14
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

Successfully merging this pull request may close these issues.

4 participants