Add font manipulation and conversion features to your Node.js applications.
Aspose.Font for Node.js via C++ allows convert ttf, otf, cff, type1 font files to ttf and svg formats, read and write truetype font metadata information.
- Load font files from disc as well as stream.
- Read font information and save updated font files to disc.
- Support for TrueType and OpenType Fonts.
- Work with CFF & Type1 fonts in your C++ Apps.
- Read Glyphs and Metrics information from Font files.
- Detect Latin Symbols in Fonts.
- Extract embedded licensing information from font files.
- Render text using font Glyphs.
TTF
TTC, OpenType, CFF, Type1
Aspose.Font for Node.js is developed to work in Node.js environment. It is recommended to use Node.js latest version (20.14 and above)
Are you ready to give Aspose.Font for C++ a try? Simply execute npm install asposefontnodejs
. If you already have Aspose.Font for C++ and want to upgrade the version, please execute npm update asposefontnodejs
to get the latest version.
Use AsposeFontforNode
- in your cjs:
const AsposeFont = require('asposefontnodejs');
- or mjs modules:
import AsposeFont from 'asposefontnodejs';
- Run the AsposeFontGetInfo function.
- In case the
json.errorCode
is 0, you can get the result data. When thejson.errorCode
parameter is not equal to 0 and, accordingly, you will receive an error in your file, then information about such an error will be contained in thejson.errorText
. - The resulting json object contains
records
array. Each record contains fieldsNameId
,PlatformId
,PlatformSpecificId
,LanguageId
,Info
with information fromname
table of font.
const AsposeFont = require('asposefontnodejs');
const font_file = "./fonts/12380_C0_0.cff";
console.log('Aspose.Font for Node.js via C++ example');
AsposeFont().then(AsposeFontModule => {
//AsposeFontGetInfo - get metadata information
const json = AsposeFontModule.AsposeFontGetInfo(font_file);
console.log("AsposeFontGetInfo => %O", json.errorCode == 0 ? json.records.reduce((ret, a) => ret +
"\nNameId : " + a.NameId
+ "; PlatformId : " + a.PlatformId
+ "; PlatformSpecificId : " + a.PlatformSpecificId
+ "; LanguageId : " + a.LanguageId
+ "; Info : " + a.Info,"") : json.errorText);
},
reason => {console.log(`The unknown error has occurred: ${reason}`);}
);
Home | Product Page | Docs | API Reference | Examples | Blog | Search | Free Support | Temporary License