Skip to content

Commit

Permalink
fontique: Enable builds for iOS and other Apple targets.
Browse files Browse the repository at this point in the history
This uses `target_vendor` despite the future deprecation as there
will be a replacement (likely using `target_family`) as the
deprecation nears.
  • Loading branch information
waywardmonkeys committed Apr 29, 2024
1 parent 8664cca commit 51e0aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fontique/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ dwrote = "0.11.0"
winapi = { version = "0.3.9", features = ["dwrite", "dwrite_1", "dwrite_3", "winnt", "unknwnbase", "libloaderapi", "winnls"] }
wio = "0.2.2"

[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
[target.'cfg(target_vendor="apple")'.dependencies]
core-text = "20.1.0"
core-foundation = "0.9.4"

[target.'cfg(not(any(target_os="macos", target_os="ios", target_family="windows")))'.dependencies]
[target.'cfg(not(any(target_vendor="apple", target_family="windows")))'.dependencies]
fontconfig-cache-parser = "0.2.0"
roxmltree = "0.19.0"
5 changes: 4 additions & 1 deletion fontique/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
#[path = "dwrite.rs"]
mod system;

#[cfg(all(feature = "system", target_os = "macos"))]
#[cfg(all(
feature = "system",
target_vendor = "apple"
))]
#[path = "coretext.rs"]
mod system;

Expand Down

0 comments on commit 51e0aa7

Please sign in to comment.