|
@@ -2012,9 +2012,9 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
} else if tAnnotation is KMSelfSignAnnotationFreeText {
|
|
} else if tAnnotation is KMSelfSignAnnotationFreeText {
|
|
let newAnnotation = (tAnnotation as! KMSelfSignAnnotationFreeText)
|
|
let newAnnotation = (tAnnotation as! KMSelfSignAnnotationFreeText)
|
|
if let font = newAnnotation.font {
|
|
if let font = newAnnotation.font {
|
|
- if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? String {
|
|
|
|
|
|
+ if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? Int {
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
- if let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSize.stringToCGFloat()) {
|
|
|
|
|
|
+ if let newFont = NSFont(descriptor: attributeFontDescriptor, size: CGFloat(fontSize)) {
|
|
newAnnotation.font = newFont
|
|
newAnnotation.font = newFont
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2105,11 +2105,11 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
if tAnnotation is CPDFFreeTextAnnotation {
|
|
if tAnnotation is CPDFFreeTextAnnotation {
|
|
let newAnnotation = (tAnnotation as! CPDFFreeTextAnnotation)
|
|
let newAnnotation = (tAnnotation as! CPDFFreeTextAnnotation)
|
|
if let font = newAnnotation.font {
|
|
if let font = newAnnotation.font {
|
|
- if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? String,
|
|
|
|
|
|
+ if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? Int,
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
|
|
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
- if let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSize.stringToCGFloat()) {
|
|
|
|
|
|
+ if let newFont = NSFont(descriptor: attributeFontDescriptor, size: CGFloat(fontSize)) {
|
|
newAnnotation.font = newFont
|
|
newAnnotation.font = newFont
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2117,11 +2117,11 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
} else if tAnnotation is KMSelfSignAnnotationFreeText {
|
|
} else if tAnnotation is KMSelfSignAnnotationFreeText {
|
|
let newAnnotation = (tAnnotation as! KMSelfSignAnnotationFreeText)
|
|
let newAnnotation = (tAnnotation as! KMSelfSignAnnotationFreeText)
|
|
if let font = newAnnotation.font {
|
|
if let font = newAnnotation.font {
|
|
- if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? String,
|
|
|
|
|
|
+ if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? Int,
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
|
|
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
- if let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSize.stringToCGFloat()) {
|
|
|
|
|
|
+ if let newFont = NSFont(descriptor: attributeFontDescriptor, size: CGFloat(fontSize)) {
|
|
newAnnotation.font = newFont
|
|
newAnnotation.font = newFont
|
|
}
|
|
}
|
|
newAnnotation.updateBounds()
|
|
newAnnotation.updateBounds()
|
|
@@ -2132,11 +2132,11 @@ let KMColorPickerViewHeight: CGFloat = 64
|
|
} else {
|
|
} else {
|
|
if annotationType == .freeText || annotationType == .signText || annotationType == .signDate {
|
|
if annotationType == .freeText || annotationType == .signText || annotationType == .signDate {
|
|
let font = NSFont(name: (annotationModel?.fontName())!, size: (annotationModel?.fontSize())!) ?? NSFont.systemFont(ofSize: 16)
|
|
let font = NSFont(name: (annotationModel?.fontName())!, size: (annotationModel?.fontSize())!) ?? NSFont.systemFont(ofSize: 16)
|
|
- if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? String,
|
|
|
|
|
|
+ if let fontSize = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.size) as? Int,
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
let familyString = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String {
|
|
|
|
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [NSFontDescriptor.AttributeName.family: familyString, NSFontDescriptor.AttributeName.face: styleString])
|
|
- if let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSize.stringToCGFloat()) {
|
|
|
|
|
|
+ if let newFont = NSFont(descriptor: attributeFontDescriptor, size: CGFloat(fontSize)) {
|
|
annotationModel?.setFontName(newFont.fontName)
|
|
annotationModel?.setFontName(newFont.fontName)
|
|
annotationModel?.setFontSize(newFont.pointSize)
|
|
annotationModel?.setFontSize(newFont.pointSize)
|
|
}
|
|
}
|