Investigate font family name escaping #1

Open
opened 8 years ago by joepie91 · 0 comments
Owner

Currently, the following code is used for setting the font:

context.font = `${fontSize}px '${fontFamily}'`;

This might break when a font family name contains a '. I need to figure out what the correct way is to escape such names when dealing with a Canvas context.

Currently, the following code is used for setting the `font`: ```js context.font = `${fontSize}px '${fontFamily}'`; ``` This might break when a font family name contains a `'`. I need to figure out what the correct way is to escape such names when dealing with a Canvas `context`.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joepie91/measure-font#1
Loading…
There is no content yet.