This API is called using string wx.loadFont(string path).
This API is called using number wx.getTextLineHeight(Object object).
Property | Type | Default value | Required | Description |
fontStyle | string | normal | False | Font style. |
fontWeight | string | normal | False | Font weight. |
fontSize | number | 16 | False | Font size. |
fontFamily | string | | True | Font name. |
text | string | | True | Text content. |
success | function | | False | Callback function for successful API calls. |
fail | function | | False | Callback function for failed API calls. |
complete | function | | False | Callback function executed after API call ends (regardless of success or failure) |
Value | Description |
normal | Normal. |
italic | Italic. |
Value | Description |
normal | Normal. |
bold | Bold. |