@gct-paas/word 0.1.62-patch.1 → 0.1.62-patch.3
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/index.es.js +258 -197
- package/dist/utils/fonts/normalize-document-font.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -37466,7 +37466,8 @@ function toDictValue(field, value, row) {
|
|
|
37466
37466
|
function getSelectOptions(payload) {
|
|
37467
37467
|
const { value, multiple, options = [], key } = payload || {};
|
|
37468
37468
|
const values = (Array.isArray(value) ? value : multiple ? value?.split(",") ?? [] : [value]).filter((i) => !isNil(i));
|
|
37469
|
-
const
|
|
37469
|
+
const optionMap = new Map(options.map((item) => [item.value, item]));
|
|
37470
|
+
const selected = values.map((v) => optionMap.get(v)).filter((item) => item != null);
|
|
37470
37471
|
const labels = selected.map((item) => item[key]);
|
|
37471
37472
|
return {
|
|
37472
37473
|
selectOptions: selected,
|
|
@@ -38288,8 +38289,11 @@ async function readApiLabel(strategy, value, fieldBinding, loadFieldByKey) {
|
|
|
38288
38289
|
refModelKey: fieldInfo?.bindInfo
|
|
38289
38290
|
};
|
|
38290
38291
|
try {
|
|
38291
|
-
|
|
38292
|
-
const
|
|
38292
|
+
if (strategy.fetcher === "rdo2ref" || strategy.fetcher === "ref2lot2sn") return (await fetcher.getOptionById(String(value), params))?.label || strategy.fallback;
|
|
38293
|
+
const idList = getValue$1(value, true);
|
|
38294
|
+
const list = await fetcher.getOptionByIds(idList, params);
|
|
38295
|
+
const labelByValue = new Map(list.filter((item) => item?.value != null && item?.label != null).map((item) => [String(item.value), String(item.label)]));
|
|
38296
|
+
const labels = idList.map((id) => labelByValue.get(String(id))).filter(Boolean);
|
|
38293
38297
|
if (labels.length) return labels.join(",");
|
|
38294
38298
|
return strategy.fallback;
|
|
38295
38299
|
} catch {
|
|
@@ -123312,6 +123316,251 @@ var init_TextUtil = __esmMin((() => {
|
|
|
123312
123316
|
};
|
|
123313
123317
|
}));
|
|
123314
123318
|
//#endregion
|
|
123319
|
+
//#region src/runtime/designer/ribbon/constant/font.ts
|
|
123320
|
+
var FontFamilyEnum, FontFamilyOptions, FontSizeOptions;
|
|
123321
|
+
var init_font = __esmMin((() => {
|
|
123322
|
+
FontFamilyEnum = /* @__PURE__ */ function(FontFamilyEnum) {
|
|
123323
|
+
FontFamilyEnum["Serif"] = "Roboto,RobotoDraft,Helvetica,Arial,sans-serif";
|
|
123324
|
+
/** 宋体 */
|
|
123325
|
+
FontFamilyEnum["SimSun"] = "\"SimSun\", \"宋体\", \"华文宋体\", STSong, STSongti-SC-Light, sans-serif";
|
|
123326
|
+
/** 黑体 */
|
|
123327
|
+
FontFamilyEnum["SimHei"] = "\"SimHei\", \"黑体\", \"华文黑体\", STHeiti, sans-serif";
|
|
123328
|
+
/** 楷体 */
|
|
123329
|
+
FontFamilyEnum["KaiTi"] = "\"Kai\", \"STKai\", \"楷体\", \"KaiTi\", \"华文楷体\", sans-serif";
|
|
123330
|
+
return FontFamilyEnum;
|
|
123331
|
+
}({});
|
|
123332
|
+
FontFamilyOptions = [
|
|
123333
|
+
{
|
|
123334
|
+
label: "默认",
|
|
123335
|
+
value: "Roboto,RobotoDraft,Helvetica,Arial,sans-serif"
|
|
123336
|
+
},
|
|
123337
|
+
{
|
|
123338
|
+
label: "宋体",
|
|
123339
|
+
value: "\"SimSun\", \"宋体\", \"华文宋体\", STSong, STSongti-SC-Light, sans-serif"
|
|
123340
|
+
},
|
|
123341
|
+
{
|
|
123342
|
+
label: "黑体",
|
|
123343
|
+
value: "\"SimHei\", \"黑体\", \"华文黑体\", STHeiti, sans-serif"
|
|
123344
|
+
},
|
|
123345
|
+
{
|
|
123346
|
+
label: "楷体",
|
|
123347
|
+
value: "\"Kai\", \"STKai\", \"楷体\", \"KaiTi\", \"华文楷体\", sans-serif"
|
|
123348
|
+
}
|
|
123349
|
+
];
|
|
123350
|
+
FontSizeOptions = [
|
|
123351
|
+
{
|
|
123352
|
+
label: "初号",
|
|
123353
|
+
value: "42"
|
|
123354
|
+
},
|
|
123355
|
+
{
|
|
123356
|
+
label: "小初",
|
|
123357
|
+
value: "36"
|
|
123358
|
+
},
|
|
123359
|
+
{
|
|
123360
|
+
label: "一号",
|
|
123361
|
+
value: "26"
|
|
123362
|
+
},
|
|
123363
|
+
{
|
|
123364
|
+
label: "小一",
|
|
123365
|
+
value: "24"
|
|
123366
|
+
},
|
|
123367
|
+
{
|
|
123368
|
+
label: "二号",
|
|
123369
|
+
value: "22"
|
|
123370
|
+
},
|
|
123371
|
+
{
|
|
123372
|
+
label: "小二",
|
|
123373
|
+
value: "18"
|
|
123374
|
+
},
|
|
123375
|
+
{
|
|
123376
|
+
label: "三号",
|
|
123377
|
+
value: "16"
|
|
123378
|
+
},
|
|
123379
|
+
{
|
|
123380
|
+
label: "小三",
|
|
123381
|
+
value: "15"
|
|
123382
|
+
},
|
|
123383
|
+
{
|
|
123384
|
+
label: "四号",
|
|
123385
|
+
value: "14"
|
|
123386
|
+
},
|
|
123387
|
+
{
|
|
123388
|
+
label: "小四",
|
|
123389
|
+
value: "12"
|
|
123390
|
+
},
|
|
123391
|
+
{
|
|
123392
|
+
label: "五号",
|
|
123393
|
+
value: "10.5"
|
|
123394
|
+
},
|
|
123395
|
+
{
|
|
123396
|
+
label: "小五",
|
|
123397
|
+
value: "9"
|
|
123398
|
+
},
|
|
123399
|
+
{
|
|
123400
|
+
label: "六号",
|
|
123401
|
+
value: "7.5"
|
|
123402
|
+
},
|
|
123403
|
+
{
|
|
123404
|
+
label: "小六",
|
|
123405
|
+
value: "6.5"
|
|
123406
|
+
},
|
|
123407
|
+
{
|
|
123408
|
+
label: "七号",
|
|
123409
|
+
value: "5.5"
|
|
123410
|
+
},
|
|
123411
|
+
{
|
|
123412
|
+
label: "八号",
|
|
123413
|
+
value: "5"
|
|
123414
|
+
},
|
|
123415
|
+
{
|
|
123416
|
+
label: "5",
|
|
123417
|
+
value: 5
|
|
123418
|
+
},
|
|
123419
|
+
{
|
|
123420
|
+
label: "5.5",
|
|
123421
|
+
value: 5.5
|
|
123422
|
+
},
|
|
123423
|
+
{
|
|
123424
|
+
label: "6.5",
|
|
123425
|
+
value: 6.5
|
|
123426
|
+
},
|
|
123427
|
+
{
|
|
123428
|
+
label: "7.5",
|
|
123429
|
+
value: 7.5
|
|
123430
|
+
},
|
|
123431
|
+
{
|
|
123432
|
+
label: "8",
|
|
123433
|
+
value: 8
|
|
123434
|
+
},
|
|
123435
|
+
{
|
|
123436
|
+
label: "9",
|
|
123437
|
+
value: 9
|
|
123438
|
+
},
|
|
123439
|
+
{
|
|
123440
|
+
label: "10",
|
|
123441
|
+
value: 10
|
|
123442
|
+
},
|
|
123443
|
+
{
|
|
123444
|
+
label: "10.5",
|
|
123445
|
+
value: 10.5
|
|
123446
|
+
},
|
|
123447
|
+
{
|
|
123448
|
+
label: "11",
|
|
123449
|
+
value: 11
|
|
123450
|
+
},
|
|
123451
|
+
{
|
|
123452
|
+
label: "12",
|
|
123453
|
+
value: 12
|
|
123454
|
+
},
|
|
123455
|
+
{
|
|
123456
|
+
label: "14",
|
|
123457
|
+
value: 14
|
|
123458
|
+
},
|
|
123459
|
+
{
|
|
123460
|
+
label: "16",
|
|
123461
|
+
value: 16
|
|
123462
|
+
},
|
|
123463
|
+
{
|
|
123464
|
+
label: "18",
|
|
123465
|
+
value: 18
|
|
123466
|
+
},
|
|
123467
|
+
{
|
|
123468
|
+
label: "20",
|
|
123469
|
+
value: 20
|
|
123470
|
+
},
|
|
123471
|
+
{
|
|
123472
|
+
label: "22",
|
|
123473
|
+
value: 22
|
|
123474
|
+
},
|
|
123475
|
+
{
|
|
123476
|
+
label: "24",
|
|
123477
|
+
value: 24
|
|
123478
|
+
},
|
|
123479
|
+
{
|
|
123480
|
+
label: "26",
|
|
123481
|
+
value: 26
|
|
123482
|
+
},
|
|
123483
|
+
{
|
|
123484
|
+
label: "28",
|
|
123485
|
+
value: 28
|
|
123486
|
+
},
|
|
123487
|
+
{
|
|
123488
|
+
label: "30",
|
|
123489
|
+
value: 30
|
|
123490
|
+
},
|
|
123491
|
+
{
|
|
123492
|
+
label: "36",
|
|
123493
|
+
value: 36
|
|
123494
|
+
},
|
|
123495
|
+
{
|
|
123496
|
+
label: "48",
|
|
123497
|
+
value: 48
|
|
123498
|
+
},
|
|
123499
|
+
{
|
|
123500
|
+
label: "56",
|
|
123501
|
+
value: 56
|
|
123502
|
+
},
|
|
123503
|
+
{
|
|
123504
|
+
label: "72",
|
|
123505
|
+
value: 72
|
|
123506
|
+
},
|
|
123507
|
+
{
|
|
123508
|
+
label: "96",
|
|
123509
|
+
value: 96
|
|
123510
|
+
}
|
|
123511
|
+
];
|
|
123512
|
+
}));
|
|
123513
|
+
//#endregion
|
|
123514
|
+
//#region src/utils/fonts/normalize-document-font.ts
|
|
123515
|
+
/**
|
|
123516
|
+
* 从 OOXML rFonts 取展示用字体名。
|
|
123517
|
+
* 中文 Word 常把字体写在 eastAsia,优先于 ascii。
|
|
123518
|
+
*/
|
|
123519
|
+
function pickDocumentFontName(rFonts) {
|
|
123520
|
+
if (!rFonts) return void 0;
|
|
123521
|
+
return rFonts.eastAsia || rFonts.ascii || rFonts.hAnsi || rFonts.cs || void 0;
|
|
123522
|
+
}
|
|
123523
|
+
/**
|
|
123524
|
+
* 识别是否为产品支持的黑 / 宋 / 楷(含常见别名)。
|
|
123525
|
+
* 无法识别时返回 null(应回落默认字体)。
|
|
123526
|
+
* 注意:不能用裸 includes('serif'),否则会误伤 "sans-serif"。
|
|
123527
|
+
*/
|
|
123528
|
+
function detectSupportedCjkKind(fontFamily) {
|
|
123529
|
+
if (!fontFamily) return null;
|
|
123530
|
+
const name = fontFamily.toLowerCase();
|
|
123531
|
+
const isKai = /lxgw|wenkai|kaiti|楷/.test(name) || /(^|[,\"\s])kai([,\"\s]|$)/.test(name) || name.includes("stkai");
|
|
123532
|
+
const isSong = /noto\s*serif|notoserif|simsun|华文宋|stsong|songti|宋体/.test(name) || /(^|[,\"\s])song([,\"\s]|$)/.test(name);
|
|
123533
|
+
const isHei = /noto\s*sans|notosans|simhei|华文黑|stheiti|黑体/.test(name) || name.includes("heiti");
|
|
123534
|
+
if (isKai) return "kai";
|
|
123535
|
+
if (isSong && !isHei) return "song";
|
|
123536
|
+
if (isHei) return "hei";
|
|
123537
|
+
return null;
|
|
123538
|
+
}
|
|
123539
|
+
/**
|
|
123540
|
+
* 将任意字体名归一到产品支持的黑 / 宋 / 楷。
|
|
123541
|
+
* 无法识别(如 Arial、微软雅黑)时回落默认字体。
|
|
123542
|
+
*/
|
|
123543
|
+
function normalizeSupportedFontFamily(fontFamily) {
|
|
123544
|
+
if (!fontFamily) return DEFAULT_FONT_FAMILY;
|
|
123545
|
+
if (fontFamily === "Roboto,RobotoDraft,Helvetica,Arial,sans-serif" || fontFamily === FontFamilyEnum.Serif) return fontFamily;
|
|
123546
|
+
for (const stack of SUPPORTED_DOCUMENT_FONT_FAMILIES) if (fontFamily === stack) return fontFamily;
|
|
123547
|
+
const kind = detectSupportedCjkKind(fontFamily);
|
|
123548
|
+
if (kind === "kai") return FontFamilyEnum.KaiTi;
|
|
123549
|
+
if (kind === "song") return FontFamilyEnum.SimSun;
|
|
123550
|
+
if (kind === "hei") return FontFamilyEnum.SimHei;
|
|
123551
|
+
return DEFAULT_FONT_FAMILY;
|
|
123552
|
+
}
|
|
123553
|
+
var SUPPORTED_DOCUMENT_FONT_FAMILIES;
|
|
123554
|
+
var init_normalize_document_font = __esmMin((() => {
|
|
123555
|
+
init_constants();
|
|
123556
|
+
init_font();
|
|
123557
|
+
SUPPORTED_DOCUMENT_FONT_FAMILIES = [
|
|
123558
|
+
FontFamilyEnum.SimHei,
|
|
123559
|
+
FontFamilyEnum.SimSun,
|
|
123560
|
+
FontFamilyEnum.KaiTi
|
|
123561
|
+
];
|
|
123562
|
+
}));
|
|
123563
|
+
//#endregion
|
|
123315
123564
|
//#region src/core/view/runs/TextRun.ts
|
|
123316
123565
|
var TextRun;
|
|
123317
123566
|
var init_TextRun = __esmMin((() => {
|
|
@@ -123319,6 +123568,7 @@ var init_TextRun = __esmMin((() => {
|
|
|
123319
123568
|
init_constants();
|
|
123320
123569
|
init_utils$2();
|
|
123321
123570
|
init_TextUtil();
|
|
123571
|
+
init_normalize_document_font();
|
|
123322
123572
|
TextRun = class TextRun extends LayoutNode {
|
|
123323
123573
|
component = BuiltinComponentTypeConst.Text;
|
|
123324
123574
|
/** 文本内容 */
|
|
@@ -123443,7 +123693,8 @@ var init_TextRun = __esmMin((() => {
|
|
|
123443
123693
|
if (!textStyle) return {};
|
|
123444
123694
|
const layoutStyle = {};
|
|
123445
123695
|
if (textStyle.sz !== void 0) layoutStyle.fontSize = textStyle.sz / 2 * 96 / 72;
|
|
123446
|
-
|
|
123696
|
+
const rawFontFamily = pickDocumentFontName(textStyle.rFonts);
|
|
123697
|
+
if (rawFontFamily) layoutStyle.fontFamily = normalizeSupportedFontFamily(rawFontFamily);
|
|
123447
123698
|
if (textStyle.highlight) layoutStyle.highlight = normalizeColor(textStyle.highlight, "none");
|
|
123448
123699
|
if (textStyle.color) layoutStyle.color = normalizeColor(textStyle.color, DEFAULT_TEXT_COLOR);
|
|
123449
123700
|
if (textStyle.b !== void 0) layoutStyle.bold = textStyle.b;
|
|
@@ -157745,204 +157996,12 @@ var table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_la
|
|
|
157745
157996
|
init__plugin_vue_export_helper();
|
|
157746
157997
|
var table_ribbon_group_default = /*#__PURE__*/ _plugin_vue_export_helper_default(table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_lang_default, [["__scopeId", "data-v-0fb21d1a"]]);
|
|
157747
157998
|
//#endregion
|
|
157748
|
-
//#region src/runtime/designer/ribbon/constant/font.ts
|
|
157749
|
-
/** 字重 */
|
|
157750
|
-
var FontFamilyEnum = /* @__PURE__ */ function(FontFamilyEnum) {
|
|
157751
|
-
FontFamilyEnum["Serif"] = "Roboto,RobotoDraft,Helvetica,Arial,sans-serif";
|
|
157752
|
-
/** 宋体 */
|
|
157753
|
-
FontFamilyEnum["SimSun"] = "\"SimSun\", \"宋体\", \"华文宋体\", STSong, STSongti-SC-Light, sans-serif";
|
|
157754
|
-
/** 黑体 */
|
|
157755
|
-
FontFamilyEnum["SimHei"] = "\"SimHei\", \"黑体\", \"华文黑体\", STHeiti, sans-serif";
|
|
157756
|
-
/** 楷体 */
|
|
157757
|
-
FontFamilyEnum["KaiTi"] = "\"Kai\", \"STKai\", \"楷体\", \"KaiTi\", \"华文楷体\", sans-serif";
|
|
157758
|
-
return FontFamilyEnum;
|
|
157759
|
-
}({});
|
|
157760
|
-
var FontFamilyOptions = [
|
|
157761
|
-
{
|
|
157762
|
-
label: "默认",
|
|
157763
|
-
value: "Roboto,RobotoDraft,Helvetica,Arial,sans-serif"
|
|
157764
|
-
},
|
|
157765
|
-
{
|
|
157766
|
-
label: "宋体",
|
|
157767
|
-
value: "\"SimSun\", \"宋体\", \"华文宋体\", STSong, STSongti-SC-Light, sans-serif"
|
|
157768
|
-
},
|
|
157769
|
-
{
|
|
157770
|
-
label: "黑体",
|
|
157771
|
-
value: "\"SimHei\", \"黑体\", \"华文黑体\", STHeiti, sans-serif"
|
|
157772
|
-
},
|
|
157773
|
-
{
|
|
157774
|
-
label: "楷体",
|
|
157775
|
-
value: "\"Kai\", \"STKai\", \"楷体\", \"KaiTi\", \"华文楷体\", sans-serif"
|
|
157776
|
-
}
|
|
157777
|
-
];
|
|
157778
|
-
var FontSizeOptions = [
|
|
157779
|
-
{
|
|
157780
|
-
label: "初号",
|
|
157781
|
-
value: "42"
|
|
157782
|
-
},
|
|
157783
|
-
{
|
|
157784
|
-
label: "小初",
|
|
157785
|
-
value: "36"
|
|
157786
|
-
},
|
|
157787
|
-
{
|
|
157788
|
-
label: "一号",
|
|
157789
|
-
value: "26"
|
|
157790
|
-
},
|
|
157791
|
-
{
|
|
157792
|
-
label: "小一",
|
|
157793
|
-
value: "24"
|
|
157794
|
-
},
|
|
157795
|
-
{
|
|
157796
|
-
label: "二号",
|
|
157797
|
-
value: "22"
|
|
157798
|
-
},
|
|
157799
|
-
{
|
|
157800
|
-
label: "小二",
|
|
157801
|
-
value: "18"
|
|
157802
|
-
},
|
|
157803
|
-
{
|
|
157804
|
-
label: "三号",
|
|
157805
|
-
value: "16"
|
|
157806
|
-
},
|
|
157807
|
-
{
|
|
157808
|
-
label: "小三",
|
|
157809
|
-
value: "15"
|
|
157810
|
-
},
|
|
157811
|
-
{
|
|
157812
|
-
label: "四号",
|
|
157813
|
-
value: "14"
|
|
157814
|
-
},
|
|
157815
|
-
{
|
|
157816
|
-
label: "小四",
|
|
157817
|
-
value: "12"
|
|
157818
|
-
},
|
|
157819
|
-
{
|
|
157820
|
-
label: "五号",
|
|
157821
|
-
value: "10.5"
|
|
157822
|
-
},
|
|
157823
|
-
{
|
|
157824
|
-
label: "小五",
|
|
157825
|
-
value: "9"
|
|
157826
|
-
},
|
|
157827
|
-
{
|
|
157828
|
-
label: "六号",
|
|
157829
|
-
value: "7.5"
|
|
157830
|
-
},
|
|
157831
|
-
{
|
|
157832
|
-
label: "小六",
|
|
157833
|
-
value: "6.5"
|
|
157834
|
-
},
|
|
157835
|
-
{
|
|
157836
|
-
label: "七号",
|
|
157837
|
-
value: "5.5"
|
|
157838
|
-
},
|
|
157839
|
-
{
|
|
157840
|
-
label: "八号",
|
|
157841
|
-
value: "5"
|
|
157842
|
-
},
|
|
157843
|
-
{
|
|
157844
|
-
label: "5",
|
|
157845
|
-
value: 5
|
|
157846
|
-
},
|
|
157847
|
-
{
|
|
157848
|
-
label: "5.5",
|
|
157849
|
-
value: 5.5
|
|
157850
|
-
},
|
|
157851
|
-
{
|
|
157852
|
-
label: "6.5",
|
|
157853
|
-
value: 6.5
|
|
157854
|
-
},
|
|
157855
|
-
{
|
|
157856
|
-
label: "7.5",
|
|
157857
|
-
value: 7.5
|
|
157858
|
-
},
|
|
157859
|
-
{
|
|
157860
|
-
label: "8",
|
|
157861
|
-
value: 8
|
|
157862
|
-
},
|
|
157863
|
-
{
|
|
157864
|
-
label: "9",
|
|
157865
|
-
value: 9
|
|
157866
|
-
},
|
|
157867
|
-
{
|
|
157868
|
-
label: "10",
|
|
157869
|
-
value: 10
|
|
157870
|
-
},
|
|
157871
|
-
{
|
|
157872
|
-
label: "10.5",
|
|
157873
|
-
value: 10.5
|
|
157874
|
-
},
|
|
157875
|
-
{
|
|
157876
|
-
label: "11",
|
|
157877
|
-
value: 11
|
|
157878
|
-
},
|
|
157879
|
-
{
|
|
157880
|
-
label: "12",
|
|
157881
|
-
value: 12
|
|
157882
|
-
},
|
|
157883
|
-
{
|
|
157884
|
-
label: "14",
|
|
157885
|
-
value: 14
|
|
157886
|
-
},
|
|
157887
|
-
{
|
|
157888
|
-
label: "16",
|
|
157889
|
-
value: 16
|
|
157890
|
-
},
|
|
157891
|
-
{
|
|
157892
|
-
label: "18",
|
|
157893
|
-
value: 18
|
|
157894
|
-
},
|
|
157895
|
-
{
|
|
157896
|
-
label: "20",
|
|
157897
|
-
value: 20
|
|
157898
|
-
},
|
|
157899
|
-
{
|
|
157900
|
-
label: "22",
|
|
157901
|
-
value: 22
|
|
157902
|
-
},
|
|
157903
|
-
{
|
|
157904
|
-
label: "24",
|
|
157905
|
-
value: 24
|
|
157906
|
-
},
|
|
157907
|
-
{
|
|
157908
|
-
label: "26",
|
|
157909
|
-
value: 26
|
|
157910
|
-
},
|
|
157911
|
-
{
|
|
157912
|
-
label: "28",
|
|
157913
|
-
value: 28
|
|
157914
|
-
},
|
|
157915
|
-
{
|
|
157916
|
-
label: "30",
|
|
157917
|
-
value: 30
|
|
157918
|
-
},
|
|
157919
|
-
{
|
|
157920
|
-
label: "36",
|
|
157921
|
-
value: 36
|
|
157922
|
-
},
|
|
157923
|
-
{
|
|
157924
|
-
label: "48",
|
|
157925
|
-
value: 48
|
|
157926
|
-
},
|
|
157927
|
-
{
|
|
157928
|
-
label: "56",
|
|
157929
|
-
value: 56
|
|
157930
|
-
},
|
|
157931
|
-
{
|
|
157932
|
-
label: "72",
|
|
157933
|
-
value: 72
|
|
157934
|
-
},
|
|
157935
|
-
{
|
|
157936
|
-
label: "96",
|
|
157937
|
-
value: 96
|
|
157938
|
-
}
|
|
157939
|
-
];
|
|
157940
|
-
//#endregion
|
|
157941
157999
|
//#region src/runtime/designer/ribbon/tabs/word-tab.vue?vue&type=script&setup=true&name=home-tab&lang.ts
|
|
157942
158000
|
init_dist();
|
|
157943
158001
|
init_base$2();
|
|
157944
158002
|
init_core();
|
|
157945
158003
|
init_asset_helper_util();
|
|
158004
|
+
init_font();
|
|
157946
158005
|
init_logic$1();
|
|
157947
158006
|
init_lodash();
|
|
157948
158007
|
init_constants();
|
|
@@ -162778,6 +162837,7 @@ var manifest$7 = {
|
|
|
162778
162837
|
//#endregion
|
|
162779
162838
|
//#region src/suites/edhr/manifest/paper-widget/_common_/basic.ts
|
|
162780
162839
|
init_constants();
|
|
162840
|
+
init_font();
|
|
162781
162841
|
var DEFAULT_WIDGET_TEXT_STYLE = {
|
|
162782
162842
|
fontFamily: FontFamilyEnum.Serif,
|
|
162783
162843
|
fontSize: 13,
|
|
@@ -175037,6 +175097,7 @@ var widget_barcode_config_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
175037
175097
|
//#endregion
|
|
175038
175098
|
//#region src/suites/shared/panel/config/editor/font-editor/font-editor.vue?vue&type=script&setup=true&lang.ts
|
|
175039
175099
|
init_base$2();
|
|
175100
|
+
init_font();
|
|
175040
175101
|
var _hoisted_1$8 = { class: "content" };
|
|
175041
175102
|
var _hoisted_2$4 = { class: "value" };
|
|
175042
175103
|
var font_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type DocRFonts = {
|
|
2
|
+
ascii?: string;
|
|
3
|
+
hAnsi?: string;
|
|
4
|
+
eastAsia?: string;
|
|
5
|
+
cs?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 从 OOXML rFonts 取展示用字体名。
|
|
9
|
+
* 中文 Word 常把字体写在 eastAsia,优先于 ascii。
|
|
10
|
+
*/
|
|
11
|
+
export declare function pickDocumentFontName(rFonts?: DocRFonts | null): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* 将任意字体名归一到产品支持的黑 / 宋 / 楷。
|
|
14
|
+
* 无法识别(如 Arial、微软雅黑)时回落默认字体。
|
|
15
|
+
*/
|
|
16
|
+
export declare function normalizeSupportedFontFamily(fontFamily?: string): string;
|