Implement Math view

This commit is contained in:
Guille Gonzalez
2026-01-04 15:33:48 +01:00
parent 6e1a38ede7
commit baea9de415
9 changed files with 356 additions and 8 deletions

View File

@@ -4,14 +4,14 @@ import Foundation
extension Math {
final class FontRegistry: Sendable {
static let shared = FontRegistry()
private struct Cache {
var graphicsFonts: [Font.Name: CGFont] = [:]
var tables: [Font.Name: FontTable] = [:]
let fonts = NSCache<KeyBox<Font>, CTFont>()
}
static let shared = FontRegistry()
private let cache = ReadWriteLockIsolated<Cache>(Cache())
func graphicsFont(named name: Font.Name) -> CGFont? {