AsposeFontGetMetrics

FontGetFontMetrics function

Get glyph count of font.

function AsposeFontGetMetrics(
    fileBlob,
    fileName
)
ParameterTypeDescription
fileBlobBlob objectContent of source font for convert.
fileNamestringFile name.

Return Value

JSON object

FieldDescription
errorCodecode error (0 no error)
errorTexttext error ("" no error)
metricsJSON object
* ascent
* descent
* lineGap
* advanceWidthMax
* minLeftSideBearing
* minRightSideBearing
* xMaxExtent

Examples

Simple example*:

    const json = AsposeFontModule.AsposeFontGetMetrics(font_file);
    console.log("AsposeFontGetMetrics => %O",  json.errorCode == 0 ? JSON.parse(JSON.stringify(json).replace('"errorCode":0,"errorText":"",','')) : json.errorText);