#1347·jimp

LoadFont dont work!

Author: AndreZila01Created Oct 3, 2024Updated Oct 16, 2025

Previously, i was use your code when Jimp has on version ^0.22.10. But when i update the library i received that warning: "Cannot read properties of undefined (reading 'slice')". I would like know what happend to the library. And where i can found documentation of JIMP to JavaScript!

const Jimp = require('jimp');

async function load() {

    let content = "Test"

    await Jimp.loadFont(Jimp.FONT_SANS_128_WHITE).then(async (font) => {
        let count = 0;
        await Jimp.read(`./FicheirosS/1.JPG`).then(async (fir_img) => {

            fir_img.print(
                font,
                250,
                2000,
                content,
            );

            fir_img.write(`./FicheirosC/${count++}.JPG`);
        });
    });


}

load();

Thanks for the support!