Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fontHeight = 12;
- if (width && height) {
- // canvas setup removed for brevity
- hiddenContext.drawImage(video, 0, 0, width, height);
- outputContext.textBaseline = 'top';
- outputContext.font = `${fontHeight}px Consolas`;
- const text = outputContext.measureText('@');
- const fontWidth = parseInt(text.width);
- // more processing
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement