Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport serialization to NativeFontHandle #1133
Conversation
|
The failure is due to it requires servo/core-graphics-rs#82. |
|
Thank you! |
| @@ -13,6 +13,7 @@ webgl = ["offscreen_gl_context"] | |||
| [dependencies] | |||
| app_units = "0.4" | |||
| byteorder = "1.0" | |||
| core-foundation = "0.3" | |||
This comment has been minimized.
This comment has been minimized.
kvark
Apr 18, 2017
Member
we could make it an OSX only dependency (via [target.'cfg(osx)'.dependencies])
| fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer { | ||
| let postscript_name: String = try!(Deserialize::deserialize(deserializer)); | ||
| CGFont::from_name(&CFString::new(&*postscript_name)) | ||
| .map(|font| NativeFontHandle(font)) |
This comment has been minimized.
This comment has been minimized.
|
hmm... |
|
Review status: 0 of 4 files reviewed at latest revision, 2 unresolved discussions. webrender_traits/Cargo.toml, line 16 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Fixed. webrender_traits/src/font.rs, line 32 at r1 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Fixed. Comments from Reviewable |
|
Thanks @alfredoyang ! Do you mind squashing the commits before we merge? |
|
Please squash them. Btw, I can |
|
@alfredoyang I think @kvark meant whether you mind squashing your own commits, before the PR is merged. |
68a66cf
to
e83ff76
|
Ok, it's done. |
|
Thank you! |
|
|
Support serialization to NativeFontHandle NativeFontHandle needs to implement serialization due to it is removed from ```CGFont``` in ```core-graphics```. servo/servo#15607 This PR depends on servo/core-graphics-rs#82. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1133) <!-- Reviewable:end -->
|
|
Use NativeFontHandle instead of CGFont <!-- Please describe your changes on the following line: --> ```serde``` is removed from ```core-graphics```, ```NativeFontHandle``` implements serialization and we should use ```NativeFontHandle``` instead of ```CGFont```. This PR depends on followings. servo/core-graphics-rs#82 servo/webrender#1133 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15607 (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests according to issue comment. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16512) <!-- Reviewable:end -->
alfredoyang commentedApr 18, 2017
•
edited
NativeFontHandle needs to implement serialization due to it is removed from
CGFontincore-graphics.servo/servo#15607
This PR depends on servo/core-graphics-rs#82.
This change is