- 实现EPUB阅读器搜索功能及选中注释功能 - 优化CFI模块,修复代码审查发现的11个问题 - 实现大书远距目录跳转与后台补全优化方案 - 优化设置面板与章节运行时联动 - 重构及大量改进优化
33 lines
662 B
Swift
33 lines
662 B
Swift
|
|
import Foundation
|
|
import UIKit
|
|
|
|
struct RDEPUBPageBreakDecision {
|
|
|
|
var range: NSRange
|
|
|
|
var reason: RDEPUBTextPageBreakReason
|
|
|
|
var diagnostics: [String]
|
|
}
|
|
|
|
protocol RDEPUBChapterPageCounting {
|
|
|
|
func pageRanges(
|
|
for attributedString: NSAttributedString,
|
|
pageSize: CGSize,
|
|
config: RDEPUBTextLayoutConfig,
|
|
fragmentOffsets: [String: Int]
|
|
) -> [RDEPUBPageBreakDecision]
|
|
}
|
|
|
|
protocol RDEPUBPageFrameBuilding {
|
|
|
|
func makeFrames(
|
|
attributedString: NSAttributedString,
|
|
pageSize: CGSize,
|
|
config: RDEPUBTextLayoutConfig,
|
|
fragmentOffsets: [String: Int]
|
|
) -> [RDEPUBTextLayoutFrame]
|
|
}
|