feat: 完成 DOCX R4 元素级视觉门禁
建立 Chromium、Word 与 WPS 的可编辑内容、段落几何、页眉页脚、封面、媒体和逐页视觉比较链路。 支持封面独立分节、正文页码重启、主题页边距与横向纸张,并将自然分页差异降为诊断项。 修正代码块内边距和折叠表格单元格边框映射,14 套主题生产矩阵与六组布局视觉矩阵通过。
This commit is contained in:
@@ -525,6 +525,21 @@ export function pointsToHalfPoints(value: number) {
|
||||
return String(Math.round(value * 2));
|
||||
}
|
||||
|
||||
export function wordCharacterSpacingTwips(
|
||||
fontSizePt: number | undefined,
|
||||
letterSpacingPt = 0
|
||||
) {
|
||||
const quantizationCompensation =
|
||||
fontSizePt === undefined
|
||||
? 0
|
||||
: fontSizePt - Math.round(fontSizePt * 2) / 2;
|
||||
return String(
|
||||
Math.round(
|
||||
(letterSpacingPt + quantizationCompensation) * 20
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function pointsToTwips(value: number) {
|
||||
return String(Math.round(value * 20));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user