Commit Graph

21 Commits

Author SHA1 Message Date
Ryan Leckey 7ec49da393 Add CTFrame and CTFramesetter 2018-08-20 16:29:13 -07:00
Jeff Muizelaar eb8c53f8cd Comment out unused function 2018-08-07 17:28:17 -04:00
Patrick Walton d7b3893a2b Add a binding to CTFontGetGlyphCount() 2018-08-02 14:36:53 -07:00
Patrick Walton f89d2345de Make CTFontCollection::get_descriptors() return an Option.
It returns null if there are no matching fonts.
2018-07-27 15:09:47 -07:00
Patrick Walton 46f432ef1b Make get_advances_for_glyphs and get_vertical_translations_for_glyphs unsafe.
Closes #238.
2018-07-25 14:10:03 -07:00
Patrick Walton 243472042a Add several new functions to Core Graphics and Core Text for font-kit's use.
This bumps the major version of `core-text` since the previous version of
`get_glyphs_for_characters` was unsoundly marked safe before and is now marked
unsafe.
2018-07-25 08:50:35 -07:00
Jeff Muizelaar 645779912b Consistently use std::os::raw::c_void instead of libc::c_void
The major versions of cocoa and core-graphics are bumped as I believe
they are the only crates that meaningfully expose c_void.

Fixes #212
2018-05-06 19:00:37 -04:00
Jeff Muizelaar 5e77c85500 Expose CTFontCopyVariationAxes.
WebRender uses this function so it's probably useful to expose.
2018-05-03 17:01:26 -04:00
Josh Matthews e614c2df26 Only allow CFNumber font variations. 2018-05-02 16:56:27 -04:00
bors-servo 022d74218c Auto merge of #196 - jrmuizel:text-stronger-types, r=jdm
Use stronger types in the core-text CFDictionaries

<!-- 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/196)
<!-- Reviewable:end -->
2018-02-07 14:19:17 -05:00
Jeff Muizelaar b7f60a3c9d Use stronger types in the CFDictionaries 2018-02-07 14:11:21 -05:00
Jeff Muizelaar 97ec75c14d Redo the interface of CFDictionary and CFMutableDictionary
This is a pretty big change to take advantge of the type parameters.
It simplifies things and makes them more safe.
2018-02-07 10:58:33 -05:00
Birunthan Mohanathas c4344498ae Allow creating font descriptor with PostScript name 2018-02-06 17:49:05 -08:00
Lee Salzman 25ce729f76 allow creating a CTFont from a CGFont with variations 2018-02-06 07:42:06 -08:00
bors-servo 0cfc7f6b0a Auto merge of #191 - waywardmonkeys:fix-some-core-text-clippy-warnings, r=jdm
Fix some core text clippy warnings

<!-- 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/191)
<!-- Reviewable:end -->
2018-02-04 09:53:55 -05:00
Bruce Mitchener 2aae249d43 core-text: Fix some clippy warnings. 2018-02-04 21:38:13 +07:00
Bruce Mitchener ee2a3633df core-text: Remove unused imports.
This warning was introduced due to the changes made in
21f20e2f93.
2018-02-04 21:30:25 +07:00
bors-servo 16ddf909ac Auto merge of #188 - jrmuizel:font-path, r=jdm
Return a PathBuf instead of a String

This is just better.

<!-- 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/188)
<!-- Reviewable:end -->
2018-02-03 00:51:40 -05:00
Jeff Muizelaar 21f20e2f93 Return a PathBuf instead of a String
This is just better.
2018-02-02 21:23:11 -05:00
Jeff Muizelaar 5616935b56 Give CFDictionary type parameters for keys and values
There's more to be done to clean up the interface now that we have
type parameters but this is a good place to start.
2018-02-02 16:56:37 -05:00
Josh Matthews 52bc040a9a Import core-text. 2018-02-01 15:52:56 -05:00