From 37cc73ad9f47b69929123ebb54a7c7d276697e70 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 14 Oct 2025 18:51:37 +0100 Subject: [PATCH] FreeType: Avoid scanning pfb/pcf fonts Harfbuzz doesn't support these font formats, so attempting to shape text using these kinds of fonts will fail. I noticed this on Ubuntu 25.10 for Arm, which seems to include pfb and otf versions of some fonts. The FontsDemo would assert in cases where the pfb font was selected instead of the otf font. --- modules/juce_graphics/native/juce_Fonts_freetype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_graphics/native/juce_Fonts_freetype.cpp b/modules/juce_graphics/native/juce_Fonts_freetype.cpp index 21e36d14cf..a6448d1e72 100644 --- a/modules/juce_graphics/native/juce_Fonts_freetype.cpp +++ b/modules/juce_graphics/native/juce_Fonts_freetype.cpp @@ -260,7 +260,7 @@ public: { for (const auto& iter : RangedDirectoryIterator (File::getCurrentWorkingDirectory().getChildFile (path), true)) { - if (iter.getFile().hasFileExtension ("ttf;pfb;pcf;otf")) + if (iter.getFile().hasFileExtension ("ttf;otf")) scanFont (iter.getFile()); } }