updated all resource names separate from fontName, fontFamilyName.

This commit is contained in:
Peter Tang
2023-09-12 18:40:01 +08:00
parent 6049e93c07
commit 4d922a5638
2 changed files with 4 additions and 3 deletions

View File

@@ -244,7 +244,7 @@ internal struct MathTable {
// If no top accent is defined then it is the center of the advance width.
var advances = CGSize.zero
guard let ctFont = font.ctFont(withSize: fontSize) else {
fatalError("\(#function) unable to obtain ctFont \(font.rawValue) with size \(fontSize)")
fatalError("\(#function) unable to obtain ctFont resource name: \(font.rawValue) with size \(fontSize)")
}
CTFontGetAdvancesForGlyphs(ctFont, .horizontal, &glyph, &advances, 1)
return advances.width/2