updates plug with all sorts of awesome improvements

This commit is contained in:
2026-11-09 13:09:09 +01:00
parent a92d6f8871
commit 3afdb6d67f
553 changed files with 22780 additions and 13155 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import CoreText
import Foundation
/// Registers the bundled OpenDyslexic and OpenDyslexic Mono faces for this process.
/// Registers the bundled IBM Plex faces for this process. CoreText reads WOFF2 directly.
public enum FontRegistry {
public static let resourceBundleName = "Plak_PlakUI.bundle"
@@ -38,7 +38,7 @@ public enum FontRegistry {
registered = names
return names
}
for url in files where ["otf", "ttf"].contains(url.pathExtension.lowercased()) {
for url in files where ["woff2", "woff", "ttf", "otf"].contains(url.pathExtension.lowercased()) {
var error: Unmanaged<CFError>?
let ok = CTFontManagerRegisterFontsForURL(url as CFURL, .process, &error)
let already = (error?.takeRetainedValue()).map { CFErrorGetCode($0) == CTFontManagerError.alreadyRegistered.rawValue } ?? false