2

In css I have defined a custom font for a specific rage of characters:

@font-face {
    font-family: Sahel;
    src: url(../font/Sahel-FD.ttf);
    unicode-range: U+0600-06FF;
}

@font-face {
    font-family: Sahel;
    src: url(../font/Sahel-FD-Bold.ttf);
    unicode-range: U+0600-06FF;
    font-weight: bold;
}

I want to change line-height only for this font, but adding this property in a @font-face rule has no effect.

How can I do that?

Mahozad
  • 18,032
  • 13
  • 118
  • 133
  • 1
    You need to change it where you apply the font family – Temani Afif Jul 23 '18 at 12:05
  • @TemaniAfif I have not applied it anywhere explicitly but in the rule itself with `unicode-range` property. – Mahozad Jul 23 '18 at 12:08
  • I know, and as you can see here : https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face there is no way to define a default line-height – Temani Afif Jul 23 '18 at 12:11
  • @Mahozad What is the effect you are trying to achieve? Maybe y0ou can do something with vertical-align. – Mr Lister Jul 23 '18 at 16:26
  • @MrLister When a user changes the site language (therefor the above font will be applied) the height of the buttons are increased (it's because of the font). If I set `line-height` globally, then it affects the default language as well. – Mahozad Jul 23 '18 at 17:09

0 Answers0