asposefontnodejs
v25.10.0
Published
Aspose.Font for Node.js via C++
Maintainers
Readme
Node.js API to Manipulate Font Files
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.
Font Processing via C++
- 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.
Read & Write Font Formats
TTF
Read Font Formats
TTC, OpenType, CFF, Type1
System Requirements
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)
Get Started with Aspose.Font for NodeJS via C++
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';Examples of getting metadata
- Run the AsposeFontGetInfo function.
- In case the
json.errorCodeis 0, you can get the result data. When thejson.errorCodeparameter 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
recordsarray. Each record contains fieldsNameId,PlatformId,PlatformSpecificId,LanguageId,Infowith information fromnametable 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
