FontLoader - TypeError: Cannot read properties of undefined (reading 'yMax')

Hello, I’m trying to instantiate FontLoader, but the console retrieves me an error :

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'yMax')
    at createPaths (chunk-TVP32DZT.js?v=b2f8a5a7:46:41)
    at Font.generateShapes (chunk-TVP32DZT.js?v=b2f8a5a7:36:19)
    at new TextGeometry (three_addons_geometries_TextGeometry__js.js?v=b2f8a5a7:13:27)
    at main.js:115:20
    at Object.onLoad (chunk-TVP32DZT.js?v=b2f8a5a7:21:9)
    at chunk-YWEOQFMY.js?v=b2f8a5a7:23738:20

For your information, I’m using vite 4.0.0

Here’s my code :

import { FontLoader } from 'three/examples/jsm/loaders/FontLoader.js';

const loader = new FontLoader();
console.log(loader);

The code snippet is not sufficient since the error happens when the instance of TextGeometry is created. So you probably have to share a larger piece of code as well as the font so it becomes more clear what happens.

Hello, @Mugen87 here’s the rest of the snippet

loader.load('./assets/fonts/studio-feixen-sans-variable.typeface.json', function (font) {
  const geometry = new TextGeometry('Hello World', {
    font: font,
    size: 80,
    height: 12,
    curveSegments: 12,
    bevelEnabled: true,
    bevelThickness: 10,
    bevelSize: 8,
    bevelOffset: 0,
    bevelSegments: 15
  });

  const mesh = new THREE.Mesh(geometry, [
    new THREE.MeshPhongMaterial({ color: 0xad4000 }),
    new THREE.MeshPhongMaterial({ color: 0x5c2301 })
  ]);

  mesh.position.x = 20;
  mesh.position.y = 0;
  mesh.position.z = 20;

  scene.add(mesh);
});

Maybe the font makes issues. Do you mind sharing it here in this topic?

It is indeed my font that causes problem…

Here’s the json source code : [{ "version": "1.0", "image": { "name": "/home/videosdownloader/publi - Pastebin.com