Prabhashi Buddhima
Prabhashi Buddhima

Reputation: 1305

ionic 4 different language fonts

I want to add font-family to another language which I'm using in my ionic 4 app. 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. Can someone help me with this?

Upvotes: 0

Views: 314

Answers (2)

Prabhashi Buddhima
Prabhashi Buddhima

Reputation: 1305

Finally, I have solved the issue by referring https://www.w3.org/International/questions/qa-css-lang.en which mention by @marblewraith.

So basically I have to mention my words in utf and it will convert my fonts.

Upvotes: 1

Mangesh55
Mangesh55

Reputation: 31

@kavindhi

First thing first you should do to convert you .ttf font family into .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

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

  font-family: SolitaireMVBPro-Regular;

Upvotes: 1

Related Questions