Is it possible with CSS to specify a font from the list.


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
29 views
Let's say I'm using the @font-face connected, the nonstandard font SuperPuperFont. But the font is so non-standard that he needed to ask the large size of the font-size to make it look good. And he may have to "fix" the row height. Get this CSS:

h4 { font-size: 48px; line-height: 50px; font-family: 'SuperPuperFont'; }


but I want to err, and to add standard fonts to replace

h4 { font-size: 48px; line-height: 50px; font-family: 'SuperPuperFont', Georgia, serif; }


And then there is a problem, because if you upload Georgia or the default serif font, it will be huge and "close". Is it possible for each font from the list to set its size and other parameters?
by | 29 views

2 Answers

0 like 0 dislike
Can propose the following trick.

In the master file specify size, suitable for backup of font from "standard".
Converting the font to base64 and connect the separate file.
In the same file, overwrite the font-family property and font-size.
Thus, if the second file is loaded, the font is guaranteed to apply, and the font properties are described in it too.

An obvious disadvantage — increased size due to conversion to base64.

UPD
Here's another: https://developer.mozilla.org/en-US/docs/Web/API/C...
by
0 like 0 dislike
You fail to specify a size for policnik fonts separately.

It is best to make a custom font podruzhilsya most likely to the largest possible number of browsers with good font-face. For example:

@font-face { font-family: "ProximaNovaRegular"; src: url("../fonts/ProximaNova/ProximaNovaRegular.eot"); src: local('☺'), url("../fonts/ProximaNova/ProximaNovaRegular.woff2") format("woff2"), url("../fonts/ProximaNova/ProximaNovaRegular.woff") format("woff"), url("../fonts/ProximaNova/ProximaNovaRegular.ttf") format("truetype"), url("../fonts/ProximaNova/ProximaNovaRegular.svg") format("svg"); font-weight: normal; font-style: normal; }


UPD: IN principle it is possible through HPD to do with the help of crutches, for example to measure the height of the block with text.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked May 20, 2019 by Saberwalker
110,608 questions
257,187 answers
0 comments
40,796 users