@@ -7,12 +7,17 @@ license = "MPL-2.0"
77edition = " 2018"
88
99[features ]
10- default = [" static_freetype " ]
10+ default = [" backend_swash " ]
1111dynamic_freetype = []
1212static_freetype = [" freetype/freetype-sys" ]
1313capture = [" api/serialize" , " serde" , " smallvec/serde" ]
1414replay = [" api/deserialize" , " serde" , " smallvec/serde" ]
1515gecko = [" firefox-on-glean" , " glean" ]
16+ backend_swash = [" swash" , " zeno" , " font-index" , " api/font_backend_swash" ]
17+ backend_native = [
18+ " freetype" , " libc" ,
19+ " dwrote" ,
20+ " core-foundation" , " core-graphics" , " core-text" , " objc" ]
1621
1722[dependencies ]
1823api = { version = " 0.66.0" , path = " ../webrender_api" , package = " webrender_api" }
@@ -28,6 +33,17 @@ fxhash = "0.2.1"
2833glean = { workspace = true , optional = true }
2934firefox-on-glean = { version = " 0.1.0" , optional = true }
3035serde = { optional = true , version = " 1.0" , features = [" serde_derive" ] }
36+ parking_lot = { version = " 0.12" , optional = true }
37+ zeno = { version = " 0.2.2" , optional = true }
38+
39+ [dependencies .swash ]
40+ git = " https://github.com/declantsien/swash.git"
41+ branch = " webrender-fix"
42+ optional = true
43+
44+ [dependencies .font-index ]
45+ git = " https://github.com/declantsien/font-index.git"
46+ optional = true
3147
3248[dev-dependencies ]
3349env_logger = { version = " 0.10" , default-features = false }
@@ -38,14 +54,14 @@ rayon = "1"
3854winit = " 0.26"
3955
4056[target .'cfg(any(target_os = "android", all(unix, not(any(target_os = "macos", target_os = "ios")))))' .dependencies ]
41- freetype = { version = " 0.7" , default-features = false }
42- libc = " 0.2"
57+ freetype = { version = " 0.7" , default-features = false , optional = true }
58+ libc = { version = " 0.2" , optional = true }
4359
4460[target .'cfg(target_os = "windows")' .dependencies ]
45- dwrote = " 0.11"
61+ dwrote = { version = " 0.11" , optional = true }
4662
4763[target .'cfg(any(target_os = "macos", target_os = "ios"))' .dependencies ]
48- core-foundation = " 0.9.2"
49- core-graphics = " 0.23"
50- core-text = { version = " 20.1" , default-features = false }
51- objc = " 0.2"
64+ core-foundation = { version = " 0.9.2" , optional = true }
65+ core-graphics = { version = " 0.23" , optional = true }
66+ core-text = { version = " 20.1" , default-features = false , optional = true }
67+ objc = { version = " 0.2" , optional = true }
0 commit comments