Influence of font-weight seems not addressed #36
Answered by
michaeltaranto
Jun 9, 2021
Replies: 1 comment 1 reply
|
Hey 👋 Most fonts will have different metrics for the different weights, so you if you are after that precision for different weights you need to ensure you're using the correct metrics for the correct weight. However, if you are using heavier text alongside normal text you may want not want that precision as the heavy text may appear too high. In the case of artificial weight, where the browser has scaled the weight, you can adjust the font metrics manually to suit. Capsize is not designed to be a runtime solution, so rendering to canvas to compute values is not feasible. |
1 reply
Answer selected by
andriytyurnikov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hey 👋
Most fonts will have different metrics for the different weights, so you if you are after that precision for different weights you need to ensure you're using the correct metrics for the correct weight.
However, if you are using heavier text alongside normal text you may want not want that precision as the heavy text may appear too high.
In the case of artificial weight, where the browser has scaled the weight, you can adjust the font metrics manually to suit.
Capsize is not designed to be a runtime solution, so rendering to canvas to compute values is not feasible.