import Font from '@mobilizing/library/js/Mobilizing/text/Font.js'
Font
To be able to use both bitmap rendered font and 3D vector rendering, we use openType.js (https://nodebox.github.io/opentype.js/ big thanks to Frederik!) to load any web compilant font and the use it in other classes.
Constructor Summary
Public Constructor | ||
public | constructor(params: Object) |
Member Summary
Public Members | ||
public | base64String: * | |
public | font: * | |
public | fontFile: * |
Method Summary
Public Methods | ||
public | Return the underlying Font.js object to work with it outside of Mobilizing.Font () | |
public | getTextSize(text: String, fontSize: Number): Object.width, Object.height Calculates the size (in pixels) that should take the string with this font at the given fontSize. |
Public Constructors
Public Methods
public getFont(): Object source
Return the underlying Font.js object to work with it outside of Mobilizing.Font ()
Return:
Object | Font.js object |