Implement textAlign and textBaseline in JavaScript.Canvas.