http://sidneys77crlfslcr7zmj3msmxchgnxhrxlp3p3kbaswo7twchjnicid.onion/programming/tips/2024/12/02/html5-canvas-tips.html
If the browser knows that canvas text will
be rendered against a set color, it will use subpixel rendering (aka ClearType). To do this, we
need to use an opaque canvas, created by passing some options to the canvas’ getContext function. const canvas = document . getElementById ( ' cleartype-canvas ' ); const ctx = canvas . getContext ( ' 2d ' , { alpha : false } ); Browser-Rendered Text Hello, World!