@gct-paas/word 0.1.74-beta.1 → 0.1.74-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/constants/paper.d.ts +2 -1
- package/dist/core/view/utils/TextUtil.d.ts +9 -4
- package/dist/index.es.js +1669 -42
- package/dist/runtime/designer/ribbon/constant/font.d.ts +5 -4
- package/dist/sdk/types/index.d.ts +10 -1
- package/dist/utils/fonts/cjk-font-catalog.d.ts +32 -0
- package/dist/utils/fonts/cjk-optical-offset.d.ts +12 -0
- package/dist/utils/fonts/ensure-document-fonts.d.ts +12 -0
- package/dist/utils/pdf/collect-page-draw-ops.d.ts +5 -0
- package/dist/utils/pdf/collect-widget-draw-ops.d.ts +12 -0
- package/dist/utils/pdf/export-vector-pdf.d.ts +11 -0
- package/dist/utils/pdf/load-cjk-font.d.ts +2 -0
- package/dist/utils/pdf/pdf-page-painter.d.ts +3 -0
- package/dist/utils/pdf/resolve-field-text-style.d.ts +12 -0
- package/dist/utils/pdf/resolve-paper-widget-value.d.ts +4 -0
- package/dist/utils/pdf/resolve-pdf-text-baseline.d.ts +12 -0
- package/dist/utils/pdf/types.d.ts +80 -0
- package/dist/word.css +12 -13
- package/package.json +3 -1
- package/vite/index.mjs +4 -0
|
@@ -26,9 +26,10 @@ export declare const DEFAULT_PAGE_SIZE: {
|
|
|
26
26
|
export declare const DEFAULT_PAGE_PADDING: [number, number, number, number];
|
|
27
27
|
export declare const DEFAULT_CELL_PADDING: [number, number, number, number];
|
|
28
28
|
export declare const DEFAULT_FONT_SIZE = 16;
|
|
29
|
+
/** 默认黑体 */
|
|
29
30
|
export declare const DEFAULT_LINE_HEIGHT = 1.6;
|
|
30
31
|
/** 图片 / 签名行高,略高于内容,避免贴行又不过松 */
|
|
31
32
|
export declare const IMAGE_LINE_HEIGHT = 1.1;
|
|
32
|
-
export declare const DEFAULT_FONT_FAMILY = "
|
|
33
|
+
export declare const DEFAULT_FONT_FAMILY = "\"Noto Sans SC\", \"NotoSansSC\", \"\u9ED1\u4F53\", \"SimHei\", sans-serif";
|
|
33
34
|
export declare const DEFAULT_TEXT_COLOR = "black";
|
|
34
35
|
export declare const ZERO_WIDTH_SPACE = "\u200B";
|
|
@@ -66,12 +66,17 @@ export declare class TextUtil {
|
|
|
66
66
|
* @returns
|
|
67
67
|
*/
|
|
68
68
|
private static getMeasureCacheKey;
|
|
69
|
+
/** 历史默认西文栈:仅黑体垂直定位参照,保持与旧版观感一致 */
|
|
70
|
+
private static readonly VERTICAL_METRICS_REF_FONT;
|
|
69
71
|
/**
|
|
70
|
-
*
|
|
71
|
-
|
|
72
|
+
* 是否为文档黑体(Noto Sans SC);宋体/楷体不走 Roboto 垂直参照
|
|
73
|
+
*/
|
|
74
|
+
private static isHeitiDocumentFontFamily;
|
|
75
|
+
/**
|
|
76
|
+
* 计算字体度量 ascent / descent
|
|
72
77
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
78
|
+
* 黑体:用 Roboto 栈的 'Hg' + actualBoundingBox 做垂直定位(接近旧默认观感)。
|
|
79
|
+
* 宋体/楷体/其它:用自身字体度量。
|
|
75
80
|
*/
|
|
76
81
|
static getFontMetrics(payload: Konva.TextConfig): {
|
|
77
82
|
ascent: number;
|