Skip to content
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

Add some minimal bindings for CTLine and CTRun #269

Merged
merged 1 commit into from Nov 14, 2018
Merged

Conversation

@jrmuizel
Copy link
Collaborator

jrmuizel commented Nov 2, 2018

This change is Reviewable

@jrmuizel jrmuizel force-pushed the jrmuizel:run branch 2 times, most recently from 64ab24c to 6208eb9 Nov 4, 2018
let mut vec = Vec::with_capacity(count as usize);
// "If the length of the range is set to 0, then the copy operation will continue
// from the start index of the range to the end of the run"
CTRunGetGlyphs(self.0, CFRange::init(0, 0), vec.as_mut_ptr());

This comment has been minimized.

@jdm

jdm Nov 7, 2018

Member

We need to call vec.set_len(count) to have a usable vector after this operation.

let mut vec = Vec::with_capacity(count as usize);
// "If the length of the range is set to 0, then the copy operation will continue
// from the start index of the range to the end of the run"
CTRunGetPositions(self.0, CFRange::init(0, 0), vec.as_mut_ptr());

This comment has been minimized.

@jdm

jdm Nov 7, 2018

Member

set_len

@jrmuizel jrmuizel force-pushed the jrmuizel:run branch from 6208eb9 to 4288963 Nov 8, 2018
@jdm
Copy link
Member

jdm commented Nov 14, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2018

📌 Commit 4288963 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2018

Testing commit 4288963 with merge 42a6014...

bors-servo added a commit that referenced this pull request Nov 14, 2018
Add some minimal bindings for CTLine and CTRun

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-foundation-rs/269)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2018

☀️ Test successful - status-travis
Approved by: jdm
Pushing 42a6014 to master...

@bors-servo bors-servo merged commit 4288963 into servo:master Nov 14, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Mar 28, 2019
Increase minor version for core-text to 13.2.0.

This includes changes from #293 and #269 which only add new public APIs.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-foundation-rs/294)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.