three-spritetext icon indicating copy to clipboard operation
three-spritetext copied to clipboard

Texts are not in the same position across browsers.

Open alper21 opened this issue 3 years ago • 1 comments

Texts that are created with this component, are not in the same position across browsers. Reason of this, CanvasRenderingContext2D instance's textBaseline property is set to 'bottom'. It must be left as it is default value that is 'alphabetic' to see texts at the same position across the browsers. Anyway, i tried to change it myself, but couldn't succeed. Here is ss from two browsers: Google Chrome: googleChromeSampleText Safari: safariSampleText

Black line is always in the middle of screen.

alper21 avatar May 07 '21 13:05 alper21

@alper21 it's not unexpected that different browsers draw text slightly differently, because they have different implementations of the Canvas api. This per se doesn't indicate an issue with this repo, it's just the way things are.

Further, having the text baseline as bottom is necessary for this module to compute the padding and border spacings correctly. So, it should not be changed to a different mode.

vasturiano avatar May 10 '21 22:05 vasturiano