mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: fix Canvas warning
This commit is contained in:
parent
02f8f8461d
commit
0b5615c533
@ -14,7 +14,7 @@ export const isSupportFont = (fontName: string) => {
|
|||||||
const str = 'a'
|
const str = 'a'
|
||||||
|
|
||||||
const canvas = document.createElement('canvas')
|
const canvas = document.createElement('canvas')
|
||||||
const ctx = canvas.getContext('2d')
|
const ctx = canvas.getContext('2d', { willReadFrequently: true })
|
||||||
|
|
||||||
if (!ctx) return false
|
if (!ctx) return false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user