aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/mod.rs
diff options
context:
space:
mode:
authorJonathan Schwender <55576758+jschwe@users.noreply.github.com>2024-05-02 20:32:51 +0200
committerGitHub <noreply@github.com>2024-05-02 18:32:51 +0000
commitca064eaa518f407988751ce51834eff3d65b681c (patch)
treebec3b09c5992c7baffbde66f3ad01572b06d4f4f /components/gfx/platform/mod.rs
parent9acf2182cd440d4080bb0eb2a2fbc7238d71e953 (diff)
downloadservo-ca064eaa518f407988751ce51834eff3d65b681c.tar.gz
servo-ca064eaa518f407988751ce51834eff3d65b681c.zip
Add font-fallback on OpenHarmony and fix several compilation issues (#32141)
* Add OpenHarmony support for allocator / profile Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Build harfbuzz from source on OHOS Updates `freetype-sys` to v0.20.1, which includes a build fix for OpenHarmony. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Don't depend on fontconfig on OpenHarmony Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Add ohos font fallback Hardcode HarmonyOS_Sans_SC_Regular for Chinese Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * libservo: OHOS useragent, and explicitly opt out of sandboxing Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * libservo: Disable get_native_media_display_and_gl_context on ohos Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Diffstat (limited to 'components/gfx/platform/mod.rs')
-rw-r--r--components/gfx/platform/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/gfx/platform/mod.rs b/components/gfx/platform/mod.rs
index 5509c214531..7b2efa41671 100644
--- a/components/gfx/platform/mod.rs
+++ b/components/gfx/platform/mod.rs
@@ -26,7 +26,7 @@ mod freetype {
pub mod font;
- #[cfg(target_os = "linux")]
+ #[cfg(all(target_os = "linux", not(target_env = "ohos")))]
pub mod font_list;
#[cfg(target_os = "android")]
mod android {
@@ -35,6 +35,12 @@ mod freetype {
}
#[cfg(target_os = "android")]
pub use self::android::font_list;
+ #[cfg(target_env = "ohos")]
+ mod ohos {
+ pub mod font_list;
+ }
+ #[cfg(target_env = "ohos")]
+ pub use self::ohos::font_list;
pub mod library_handle;
}