feat: updated the text reflow engine
This commit is contained in:
@@ -228,6 +228,9 @@ class ReflowRun(BaseModel):
|
||||
internalFontId: str
|
||||
fontSize: float
|
||||
color: str = "#000000"
|
||||
# Original per-character advance (PDF units) of UNCHANGED source text, for pixel-perfect
|
||||
# reflow spacing. Omitted for edited/new runs (engine re-measures those).
|
||||
advances: list[float] | None = None
|
||||
|
||||
|
||||
class ReflowParagraphData(BaseModel):
|
||||
@@ -241,6 +244,10 @@ class ReflowParagraphData(BaseModel):
|
||||
align: Literal["left", "justify"] = "left"
|
||||
pushColumnLeft: float | None = None
|
||||
lines: list[list[ReflowRun]] | None = None
|
||||
# Original per-line baseline + left anchor (parallel to `lines`), so unchanged lines reproduce
|
||||
# the source's exact vertical spacing and left edge instead of a uniform fallback.
|
||||
lineBaselineY: list[float] | None = None
|
||||
lineX: list[float] | None = None
|
||||
|
||||
|
||||
class ReflowParagraphOperation(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user