Why in my simple example textBaseline = 'middle' is not working? Why my text is shifted to the top?
const size = 100;
const canvas = document.getElementById('canvas');
canvas.width = size;
canvas.height = size;
const context = canvas.getContext('2d');
context.font = "bold " + (size * 0.95) + "px Arial";
context.fillStyle = 'blue';
context.textAlign = "center";
context.textBaseline = 'middle';
context.fillText('SO', size / 2, size / 2);
canvas {
border: 1px solid red;
}
<canvas id="canvas"></canvas>