feat(epub): complete wxread parity scope

This commit is contained in:
shen
2026-05-26 09:19:37 +08:00
parent 23182e8b5a
commit 0e7d952fe5
31 changed files with 2619 additions and 1533 deletions
@@ -41,6 +41,10 @@ public struct RDEPUBPresentationStyle: Equatable {
public var fontSize: CGFloat
/// 1.0
public var lineHeightMultiple: CGFloat
/// WXRead
public var numberOfColumns: Int
/// WXRead columnGap
public var columnGap: CGFloat
/// CSS "#FFFFFF"
public var themeBackgroundColor: String?
/// CSS "#000000"
@@ -51,6 +55,8 @@ public struct RDEPUBPresentationStyle: Equatable {
contentInsets: UIEdgeInsets,
fontSize: CGFloat,
lineHeightMultiple: CGFloat,
numberOfColumns: Int = 1,
columnGap: CGFloat = 20,
themeBackgroundColor: String? = nil,
themeTextColor: String? = nil
) {
@@ -58,6 +64,8 @@ public struct RDEPUBPresentationStyle: Equatable {
self.contentInsets = contentInsets
self.fontSize = fontSize
self.lineHeightMultiple = lineHeightMultiple
self.numberOfColumns = max(1, numberOfColumns)
self.columnGap = max(0, columnGap)
self.themeBackgroundColor = themeBackgroundColor
self.themeTextColor = themeTextColor
}
@@ -170,4 +178,4 @@ public enum RDEPUBRenderRequest: Equatable {
return request.spread.primaryResource.href
}
}
}
}