[英]ionic 4 different language fonts
I want to add font-family to another language which I'm using in my ionic 4 app.我想将字体系列添加到我在 ionic 4 应用程序中使用的另一种语言。 I tried我试过
@font-face {
font-family: 'SINHA Sithumina 2012';
font-style: normal;
font-weight: normal;
src: url('./assets/font/SINHA Sithumina 2012.ttf');
}
and use it in html css class.并在 html css 类中使用它。 Can someone help me with this?有人可以帮我弄这个吗?
@kavindhi @kavindhi
First thing first you should do to convert you .ttf
font family into .otf
.首先,您应该将.ttf
字体系列转换为.otf
。 https://convertio.co/ttf-otf/ https://convertio.co/ttf-otf/
Then add your font's into assets folder.然后将您的字体添加到资产文件夹中。
Then you should add into into global.scss or add custom file like fonts.scss
然后你应该添加到 global.scss 或添加自定义文件,如fonts.scss
Then add this into your font file然后将其添加到您的字体文件中
@font-face {
font-family: "SolitaireMVBPro-Regular";
src: url("assets/fonts/SolitaireMVBPro-Regular.otf");
}
So it'll be available for you into your ionic 4 pages所以你可以在你的 ionic 4 页面中找到它
font-family: SolitaireMVBPro-Regular;
Finally, I have solved the issue by referring https://www.w3.org/International/questions/qa-css-lang.en which mention by @marblewraith.最后,我通过参考@marblewraith 提到的https://www.w3.org/International/questions/qa-css-lang.en解决了这个问题。
So basically I have to mention my words in utf and it will convert my fonts.所以基本上我必须在 utf 中提到我的话,它会转换我的字体。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.