Answer the question
In order to leave comments, you need to log in
How to calculate font to adjust for increase or decrease in page size?
Hello!
Tell me, is there some formula for proportionality of the main font size to all sizes?
For example, if my headings are 36px with a screen width of 1440, what should I do at 1920 and 1024 so that the width of the text blocks does not become smaller or too large?
Answer the question
In order to leave comments, you need to log in
The width of all characters is different (if the font is not monospaced).
The width of the character "0" (zero) in css is expressed by the unit 1ch
The width of the viewport (the visible part of the window) is expressed by the unit 1vw.
The dependence of the character width on its height (and on the font size is obtained) can only be viewed by opening the font in a special editor. This relationship will obviously be specific to any particular font family or style.
Go ahead, write formulas. Approximately, with an allowable error, probably, something will turn out to be sculpted.
You can not bother and go by the method of scientific poke.
Manually determine the desired dimensions at the minimum and maximum widths. And then use the method of adaptive fonts. In this article on Habré, the method is laid out in detail on the shelves "Responsive Font Size "
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question