@@ -59,7 +59,7 @@ <h1>LITECANVAS</h1>
59
59
60
60
< nav >
61
61
< a href ="https://github.com/litecanvas/game-engine "> Main Repository</ a >
62
- | < a href ="https://litecanvas.js.org/ "> Playground</ a > | |
62
+ | < a href ="https://litecanvas.js.org/ "> Playground</ a > |
63
63
< a href ="https://github.com/litecanvas/game-engine#basic-demos "
64
64
> Demos</ a
65
65
>
@@ -222,6 +222,9 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
222
222
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline
223
223
textalign(align = 'start', baseline = 'top'): void
224
224
225
+ // set the default font family
226
+ textfont(fontName: string): void
227
+
225
228
/**
226
229
* IMAGE DRAWING-RELATED FUNCTIONS
227
230
*/
@@ -402,10 +405,13 @@ <h2><a id="advanced">Advanced Features</a></h2>
402
405
// see: https://github.com/litecanvas/plugin-asset-loader
403
406
404
407
// Asynchronously load an image
405
- loadImage(url: string, callback: function)
408
+ loadImage(url: string, callback: function): void
406
409
407
410
// Asynchronously load an external JavaScript file
408
- loadScript(url: string, callback: function)
411
+ loadScript(url: string, callback: function): void
412
+
413
+ // Asynchronously load a font
414
+ loadFont(fontName:string, url: string, callback: function): void
409
415
</ code > </ pre >
410
416
</ main >
411
417
< script src ="prism/prism.js " defer > </ script >
0 commit comments