rex_google_webfontloader
Usage
- Call actions under "Add" category to add web font
- Call "Action:Loading" to start loading web fonts
- "Condition:On active" will be triggered while all web fonts loaded completed.
Custom web font
Sample capx - CSS file , sample capx - font file
Call "Action:Custom" to load custom web font. Parameter "URL" could be
Sample capx - CSS file , sample capx - font file
Call "Action:Custom" to load custom web font. Parameter "URL" could be
- web URL of CSS file
- web URL of font file
Load all files at local
Sample capx - CSS file , sample capx - font file
Follow these step if designer want to run the app without network. ( API of this web font loader is loading in "Action:Loading" usually )
Sample capx - CSS file , sample capx - font file
Follow these step if designer want to run the app without network. ( API of this web font loader is loading in "Action:Loading" usually )
- Set property "API source" to "Local".
- Add file "webfont.js" into project. "webfont.js" could find in the folder of this plugin
- Call "Action:Custom" and "Action:Loading" described in previous section.
Events
Sample capx
When "Action:Loading" is invoked, these events will be triggered.
Loading start
Sample capx
When "Action:Loading" is invoked, these events will be triggered.
Loading start
- "Condition:On loading": triggered while loading fonts starting
- "Condition:On font loading": triggered while loading a font starting, get loading font family name by "Expression:LastFamilyName".
- "Condition:On font active": triggered while a font family loaded completed, get loaded font family name by "Expression:LastFamilyName".
- "Condition:On font inactive": triggered while a font family loaded failed, get loaded font family name by "Expression:LastFamilyName". Timeout is set in property "Timeout".
- "Condition:On inactive": triggered while all fonts loaded failed.
- "Condition:On active": triggered while all fonts loaded, success or timeout.