Skip to content

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

Merged
rolfbjarne merged 2 commits into
dotnet:masterfrom
dalexsoto:coretext
Apr 10, 2017
Merged

[CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. #1975
rolfbjarne merged 2 commits into
dotnet:masterfrom
dalexsoto:coretext

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

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

… 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
@monojenkins

Copy link
Copy Markdown
Contributor

Build success

@spouliot spouliot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but please add a comment to the weird Dispose call that points back to the PR (since it's the only place where it's explained). That will help git blame future questions. Thanks!

@dalexsoto

Copy link
Copy Markdown
Member Author

@spouliot added

@monojenkins

Copy link
Copy Markdown
Contributor

Build success

@rolfbjarne
rolfbjarne merged commit 3fe0d20 into dotnet:master Apr 10, 2017
@spouliot

Copy link
Copy Markdown
Contributor

@dalexsoto Looks safe to backport to d15-2

@dalexsoto
dalexsoto deleted the coretext branch April 10, 2017 16:03
dalexsoto added a commit to dalexsoto/xamarin-macios that referenced this pull request Apr 10, 2017
…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 pushed a commit that referenced this pull request Apr 10, 2017
…es bug 54148. (#1975) (#1980)

* [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
VincentDondain added a commit to VincentDondain/xamarin-macios that referenced this pull request Sep 18, 2019
New commits in xamarin/maccore:

* xamarin/maccore@486ad67875 [device-builds] Fix if condition typo (double `[`) (dotnet#1985)
* xamarin/maccore@fda32707a7 [tests] Update (and hopefully simplify)  submission tests documentation wrt cerficates/profiles expiration (dotnet#1972)
* xamarin/maccore@f23cd3a194 Merge pull request dotnet#1977 from xamarin/swift-o-matic-protocol-list-enum-factory
* xamarin/maccore@aaa2bec8da Enum factory test
* xamarin/maccore@d3c7890df2 Merge pull request dotnet#1974 from xamarin/swift-o-matic-protocol-list-enum
* xamarin/maccore@436a376ab4 [provisioning-profiles] Add 'Developer ID Application' and 'Developer ID Installer' certificates. (dotnet#1975)
* xamarin/maccore@ddc68fc899 Support for protocol list types in enum payloads.

Diff: https://github.com/xamarin/maccore/compare/4611683312fd8ad4eb2b2c093e43a5f71405bdee..486ad67875db90261f3c9818380b979db3094946
VincentDondain added a commit that referenced this pull request Sep 19, 2019
New commits in xamarin/maccore:

* xamarin/maccore@486ad67875 [device-builds] Fix if condition typo (double `[`) (#1985)
* xamarin/maccore@fda32707a7 [tests] Update (and hopefully simplify)  submission tests documentation wrt cerficates/profiles expiration (#1972)
* xamarin/maccore@f23cd3a194 Merge pull request #1977 from xamarin/swift-o-matic-protocol-list-enum-factory
* xamarin/maccore@aaa2bec8da Enum factory test
* xamarin/maccore@d3c7890df2 Merge pull request #1974 from xamarin/swift-o-matic-protocol-list-enum
* xamarin/maccore@436a376ab4 [provisioning-profiles] Add 'Developer ID Application' and 'Developer ID Installer' certificates. (#1975)
* xamarin/maccore@ddc68fc899 Support for protocol list types in enum payloads.

Diff: https://github.com/xamarin/maccore/compare/4611683312fd8ad4eb2b2c093e43a5f71405bdee..486ad67875db90261f3c9818380b979db3094946
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.

5 participants