Nope, prefer mopeds.

    @canvas-fonts/arial-narrow-italic

    1.0.4 • Public • Published

    @canvas-fonts/arial-narrow-italic

    Arial Narrow Italic package for canvas

    Usage

    const { registerFont, createCanvas } = require('canvas');
    registerFont(require("@canvas-fonts/arial-narrow-italic"), { family: "Arial Narrow Italic" });
    const canvas = createCanvas(400, 48);
    const ctx = canvas.getContext('2d');
    ctx.font = `24px "Arial Narrow Italic"`;
    ctx.fillText("Arial Narrow Italic", 5, 30);
    const png = canvas.toBuffer();

    Will create this image:

    preview

    Creating your own Fonts

    This font is part of the canvas-fonts collection. To use your own fonts, simply:

    1. Create a new npm package
    2. Add your font file to the same directory as the package.json created in step 1.
    3. Add the following index.js file in that same directory:
    // Replace "MyAwesomeFont.ttf" with the filename of your font!
    module.exports = require('path').join(__dirname, "MyAwesomeFont.ttf")
    1. Publish to npm!

    Install

    npm i @canvas-fonts/arial-narrow-italic

    DownloadsWeekly Downloads

    0

    Version

    1.0.4

    License

    none

    Unpacked Size

    187 kB

    Total Files

    4

    Last publish

    Collaborators

    • jacoblee93
    • retrohack3r