From 289dda0fcab73ae94938e9a69ec599f2c7efb0cf Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Fri, 16 Aug 2024 15:17:05 +0700 Subject: [PATCH] change(ios): better early-exit if all font data found --- .../KMEI/KeymanEngine/Classes/Resource Data/FontManager.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/engine/KMEI/KeymanEngine/Classes/Resource Data/FontManager.swift b/ios/engine/KMEI/KeymanEngine/Classes/Resource Data/FontManager.swift index 6dd114d375c..9f0047d7f7b 100644 --- a/ios/engine/KMEI/KeymanEngine/Classes/Resource Data/FontManager.swift +++ b/ios/engine/KMEI/KeymanEngine/Classes/Resource Data/FontManager.swift @@ -199,6 +199,10 @@ public class FontManager { var fontsToFind = fontNames UIFont.familyNames.forEach { familyName in + if fontsToFind.count == 0 { + return + } + let familyFonts = UIFont.fontNames(forFamilyName: familyName) for font in familyFonts {