three-spritetext
three-spritetext copied to clipboard
Texts are not in the same position across browsers.
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:
Safari:
Black line is always in the middle of screen.
@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.