|
@@ -1022,10 +1022,13 @@ extension KMEditPDFTextPropertyViewController: KMSelectPopButtonDelegate {
|
|
|
|
|
|
func km_controlTextDidEndEditing(_ obj: KMDesignSelect) {
|
|
|
if obj == self.fontSizeVC {
|
|
|
- let size = CGFloat(Float((obj.stringValue.replacingOccurrences(of: "pt", with: ""))) ?? 1)
|
|
|
+ var string = obj.stringValue.replacingOccurrences(of: "pt", with: "")
|
|
|
+ string = string.replacingOccurrences(of: ",", with: "")
|
|
|
+
|
|
|
+ let size = Float(string) ?? 1
|
|
|
let sizeValue = max(size, 1)
|
|
|
self.fontSizeVC?.stringValue = String(format: "%.0fpt", sizeValue)
|
|
|
- self.updateFontSize(size: size)
|
|
|
+ self.updateFontSize(size: size.cgFloat)
|
|
|
}
|
|
|
}
|
|
|
|