|
5 | 5 | use peek_poke::PeekPoke;
|
6 | 6 | use std::cmp::Ordering;
|
7 | 7 | use std::hash::{Hash, Hasher};
|
| 8 | +#[cfg(not(any(target_os = "macos", target_os = "ios")))] |
| 9 | +use std::path::PathBuf; |
8 | 10 | use std::sync::Arc;
|
9 | 11 | // local imports
|
10 | 12 | use crate::IdNamespace;
|
@@ -50,19 +52,14 @@ impl FontSize {
|
50 | 52 | pub fn to_f64_px(&self) -> f64 { self.0 as f64 }
|
51 | 53 | }
|
52 | 54 |
|
53 |
| -/// Using Rust crate swash and font-index over native fonts |
54 |
| -#[cfg(feature = "font_backend_swash")] |
55 |
| -#[derive(Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)] |
56 |
| -pub struct NativeFontHandle(pub u32); |
57 |
| - |
58 |
| -#[cfg(not(any(feature = "font_backend_swash", target_os = "macos", target_os = "ios")))] |
| 55 | +#[cfg(not(any(target_os = "macos", target_os = "ios")))] |
59 | 56 | #[derive(Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
|
60 | 57 | pub struct NativeFontHandle {
|
61 |
| - pub path: std::path::PathBuf, |
| 58 | + pub path: PathBuf, |
62 | 59 | pub index: u32,
|
63 | 60 | }
|
64 | 61 |
|
65 |
| -#[cfg(all(not(feature = "font_backend_swash"), any(target_os = "macos", target_os = "ios")))] |
| 62 | +#[cfg(any(target_os = "macos", target_os = "ios"))] |
66 | 63 | #[derive(Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
|
67 | 64 | pub struct NativeFontHandle {
|
68 | 65 | pub name: String,
|
|
0 commit comments