Skip to content

Commit 18383c4

Browse files
fontique: Update to objc2 0.6 and new CoreFoundation bindings
The `objc2` family of crates now provides bindings for CoreFoundation and CoreText (and much more), so we can use these rather than the old `core-foundation` and `core-text` crates. This also simplifies some of the code. One simplification assumes that `CTFontCreateUIFontForLanguage` won't fail.
1 parent 0424d18 commit 18383c4

File tree

3 files changed

+170
-173
lines changed

3 files changed

+170
-173
lines changed

Cargo.lock

+128-66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fontique/Cargo.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ unicode_script = ["dep:unicode-script"]
2525
system = [
2626
"std",
2727
"dep:windows", "dep:windows-core",
28-
"dep:core-text", "dep:core-foundation", "dep:objc2", "dep:objc2-foundation",
28+
"dep:objc2-core-text", "dep:objc2-core-foundation", "dep:objc2-foundation",
2929
"dep:fontconfig-cache-parser", "dep:roxmltree",
3030
]
3131

@@ -46,10 +46,9 @@ windows = { version = "0.58.0", features = ["implement", "Win32_Graphics_DirectW
4646
windows-core = { version = "0.58", optional = true }
4747

4848
[target.'cfg(target_vendor = "apple")'.dependencies]
49-
core-text = { version = "20.1.0", optional = true }
50-
core-foundation = { version = "0.9.4", optional = true }
51-
objc2 = { version = "0.5.2", optional = true }
52-
objc2-foundation = { version = "0.2.2", features = ["NSArray", "NSEnumerator", "NSPathUtilities", "NSString"], optional = true }
49+
objc2-foundation = { version = "0.3.0", optional = true, default-features = false, features = ["alloc", "NSArray", "NSEnumerator", "NSPathUtilities", "NSString"] }
50+
objc2-core-foundation = { version = "0.3.0", optional = true, default-features = false, features = ["CFBase"] }
51+
objc2-core-text = { version = "0.3.0", optional = true }
5352

5453
[target.'cfg(target_os = "linux")'.dependencies]
5554
fontconfig-cache-parser = { version = "0.2.0", optional = true }

0 commit comments

Comments
 (0)