You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,8 @@ This project is an implementation of the Web Canvas API and implements that API
78
78
*[createImageData()](#createimagedata)
79
79
*[loadImage()](#loadimage)
80
80
*[registerFont()](#registerfont)
81
+
*[deregisterAllFonts()](#deregisterAllFonts)
82
+
81
83
82
84
### Non-standard APIs
83
85
@@ -170,6 +172,35 @@ ctx.fillText('Everyone hates this font :(', 250, 10)
170
172
171
173
The second argument is an object with properties that resemble the CSS properties that are specified in `@font-face` rules. You must specify at least `family`. `weight`, and `style` are optional and default to `'normal'`.
172
174
175
+
### deregisterAllFonts()
176
+
177
+
> ```ts
178
+
>deregisterAllFonts() =>void
179
+
>```
180
+
181
+
Use `deregisterAllFonts` to unregister all fonts that have been previously registered. This method is useful when you want to remove all registered fonts, such as when using the canvas in tests
0 commit comments