|
@@ -1154,10 +1154,8 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
|
let centerYPercent: CGFloat = centerPoint.y / overlaySize.height
|
|
|
let covertCenter: CGPoint = CGPoint(x: centerXPercent * rect.size.width, y: centerYPercent * rect.size.height)
|
|
|
|
|
|
-// WSSSimpleLog("🥞🥞🥞: \(centerXPercent) + \(centerYPercent) + \(covertCenter) ++ \(rect)")
|
|
|
-
|
|
|
for subtitleModel in currentShowingSubtitleInfos {
|
|
|
- if let textModel = subtitleModel.fontViewModel {
|
|
|
+ if let textModel = subtitleModel.fontViewModel?.deepCopy() {
|
|
|
let tmpPasterView = WSSCoolVoicePasterView.createPasterView(withCenter: centerPoint, vm: textModel)
|
|
|
|
|
|
let sizeWidthPercent: CGFloat = tmpPasterView.size.width / overlaySize.width
|
|
@@ -1167,9 +1165,15 @@ fileprivate extension WSSCoolVoiceSubtitleController {
|
|
|
tmpPasterView.bounds = covertBounds
|
|
|
tmpPasterView.center = covertCenter
|
|
|
|
|
|
-// WSSSimpleLog("🥞🥞🥞aaa: \(sizeWidthPercent) + \(sizeHeightPercent) + \(covertBounds) ")
|
|
|
-
|
|
|
let vertex = calculateVertex(withPaster: tmpPasterView, targetView: placeholer).map({ NSNumber(value: Float($0)) })
|
|
|
+
|
|
|
+ // 为了提高小字体的字体清晰度
|
|
|
+ let needScaleFontSize: CGFloat = 24.0
|
|
|
+ if textModel.fontSize < needScaleFontSize {
|
|
|
+ let scale: CGFloat = needScaleFontSize / textModel.fontSize
|
|
|
+ tmpPasterView.scaleFontSize(needScaleFontSize, scale: scale)
|
|
|
+ }
|
|
|
+
|
|
|
if let image = tmpPasterView.subtitleLabel?.wss_screenShot() {
|
|
|
guard let input = setupInput(textImage: image, vertex: vertex) else { return }
|
|
|
let pasterData: (XunFeiSDKTool.MSCResultModel, OJAPasterFrameInput) = (subtitleModel, input)
|