We want to get the specific width of the text, so we calculate it through the API of measureText
, and we get the text width corresponding to the font size of 3px
in demo. https://www.w3schools.com/tag.
but when it comes to our page, the font size of 3px
does not get the same small data. Instead, it seems to be affected. The width of the text 12px
is calculated, corresponding to the minimum font size for browsing. This is rather difficult to understand. Will the font size in Canvas be affected in some cases?