What it does
LoadGoogleFont writes to a Font object: it loads rather than reads. It takes family (a string), and answers an integer. That is the first of 2 forms.
Syntax
1
LoadGoogleFont(family string) → integer2
LoadGoogleFont(fontID integer, family string)Parameters
| Name | Type | In forms |
|---|---|---|
| family | string | all |
| fontID | integer | 2 |
What each form returns
| 1 | googleFont = LoadGoogleFont("Inter") | integer |
| 2 | LoadGoogleFont(1, "Inter") | nothing |
Example · generated
Form 1, the command hands back the id
googleFont = LoadGoogleFont("Inter")DO Sync()LOOPForm 2, you choose the id yourself
LoadGoogleFont(1, "Inter")DO Sync()LOOPLoadGoogleFont is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.