【问题标题】:Custom Gujarati font (GopikaTwo) is not supported on Android mobile browser and hybrid applicationAndroid 移动浏览器和混合应用程序不支持自定义古吉拉特语字体(Gopika Two)
【发布时间】:2018-11-06 01:34:42
【问题描述】:

我正在尝试在我的混合应用程序中使用自定义字体 GopikaTwo。我在我的 css 中添加了以下代码:-

@font-face {
    font-family: 'GopikaTwo' !important;
    src: url('GopikaTwo.eot') !important;
    src: url('GopikaTwo.eot?#iefix') format('embedded-opentype'),  url('GopikaTwo.woff2') format('woff2'), url('GopikaTwo.woff') format('woff'), url('GopikaTwo.ttf') format('truetype'), url('GopikaTwo.svg#GopikaTwo') format('svg') !important;
    font-weight: normal;
    font-style: normal;
}

.gopika-two {
    font-family: "GopikaTwo", "Roboto", "Helvetica Neue", sans-serif !important;
} 

这在桌面浏览器(如 Chrome、Firefox)上运行良好,但在 android 移动浏览器(如 chrome)上运行良好。我的最终目标是让它在 Android 的混合移动应用程序上运行。

有什么需要做的配置吗?

【问题讨论】:

标签: android css font-face android-browser custom-font


【解决方案1】:

这行得通。

变量.scss

@font-face {
  font-family: 'GopikaTwo';
  src: url('../assets/fonts/GopikaTwo.eot?#iefix') format('embedded-opentype'), url('../assets/fonts/GopikaTwo.woff') format('woff'), url('../assets/fonts/GopikaTwo.ttf') format('truetype'), url('../assets/fonts/GopikaTwo.svg#GopikaTwo') format('svg');
  font-weight: normal;
  font-style: normal;
}
 $font-family-base: "GopikaTwo";
 $font-family-ios-base: $font-family-base;
 $font-family-md-base: $font-family-base;
 $font-family-wp-base: $font-family-base;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 2014-02-23
    • 2012-09-14
    • 2023-03-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多