diff --git a/package.json b/package.json index 221d1d61..95f3031b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wtfos-configurator", - "version": "2.4.0-dev", + "version": "2.3.1-dev", "homepage": "https://develop.fpv.wtf", "private": true, "dependencies": { diff --git a/src/osd-overlay/fonts.ts b/src/osd-overlay/fonts.ts index 09e55163..7980856c 100644 --- a/src/osd-overlay/fonts.ts +++ b/src/osd-overlay/fonts.ts @@ -35,7 +35,9 @@ export class Font { if (file && file.size > 0) { return [file.name, await file.arrayBuffer()]; } else { - const font_filename = `font_${reader.header.config.fontVariant.toLowerCase()}${isHd ? "_hd" : ""}.png`; + const font_variant = reader.header.config.fontVariant.toLowerCase(); + const font_name = font_variant.length !== 0 ? `font_${font_variant}` : "font"; + const font_filename = `${font_name}${isHd ? "_hd" : ""}.png`; return ["font_filename", await fetch(`https://raw.githubusercontent.com/fpv-wtf/msp-osd/main/fonts/${font_filename}`).then((response) => response.arrayBuffer())]; } })(file);