Despite my extensive efforts, I have been unable to find a solution to a seemingly simple problem.
In JavaScript, I have generated dynamic text using the following code:
context.fillText('name', 10, 10, 20);
Now, I need this text to be oriented vertically. However, rotating the entire canvas is not an option as there are other objects within it that should remain unchanged.
An ideal solution for me would involve using CSS. This way, I can easily apply attributes like angle and color to multiple texts on the canvas. Unfortunately, my limited knowledge of CSS has left me struggling to create and reference such styling in-line with JavaScript.
I came across a link similar to what I'm looking for: CSS rotate text - complicated. However, this example assumes the text in HTML has a specific name tag for referencing, which mine does not. This constraint has left me feeling quite stuck in this situation.