Trying to customize the font style of canvas text with Press Start 2P
The URL has been imported into a CSS file as follows:
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
.canvasClass{
font-family: 'Press Start 2P';
}
<Box className='canvasClass'>
<Canvas2/>
</Box>
Attempting to draw text in this manner:
context.fillStyle = 'rgba(194,213,219,0.8)'
context.font = "42px Press Start 2P";
context.textAlign = 'center'
Confirmed font application on parent div but facing difficulty applying it to the canvas inside. Any reason for not being able to apply the desired font to the canvas despite working on other text components in the same div?
UPDATE:
Considering switching font to Roboto (assuming another Google font)