asposefontnodejs

24.10.1 • Public • Published

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

  1. Run the AsposeFontGetInfo function.
  2. In case the json.errorCode is 0, you can get the result data. When the json.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 the json.errorText.
  3. The resulting json object contains records array. Each record contains fields NameId, PlatformId, PlatformSpecificId, LanguageId, Info with information from name 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

/asposefontnodejs/

    Package Sidebar

    Install

    npm i asposefontnodejs

    Weekly Downloads

    0

    Version

    24.10.1

    License

    See Licence in LICENCE.md

    Unpacked Size

    53.9 MB

    Total Files

    6

    Last publish

    Collaborators

    • asposefont