|
@@ -566,13 +566,13 @@ class KMFillSignTextPanel: KMPropertiesPanelSubViewController {
|
|
for fontDic in CPDFAnnotationModel.supportFonts() {
|
|
for fontDic in CPDFAnnotationModel.supportFonts() {
|
|
let fontName = (fontDic as! [String : [String]]).keys.first ?? "Helvetica"
|
|
let fontName = (fontDic as! [String : [String]]).keys.first ?? "Helvetica"
|
|
let font = NSFont(name: fontName, size: 12.0)
|
|
let font = NSFont(name: fontName, size: 12.0)
|
|
- let family = currentFont?.fontDescriptor.object(forKey: .family)
|
|
|
|
|
|
+ let family = currentFont?.fontDescriptor.object(forKey: .family) ?? ""
|
|
|
|
|
|
if family as! String == fontName {
|
|
if family as! String == fontName {
|
|
dic = (fontDic as! [String : [String]])
|
|
dic = (fontDic as! [String : [String]])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- let style = currentFont!.fontDescriptor.object(forKey: .face) as! String
|
|
|
|
|
|
+ let style = currentFont?.fontDescriptor.object(forKey: .face) as? String ?? ""
|
|
if dic != nil {
|
|
if dic != nil {
|
|
let selectedIndex = CPDFAnnotationModel.supportFonts().index(of: dic as Any)
|
|
let selectedIndex = CPDFAnnotationModel.supportFonts().index(of: dic as Any)
|
|
self.fontNameVC.selectItem(at: selectedIndex)
|
|
self.fontNameVC.selectItem(at: selectedIndex)
|