字号对照表
标准字号表直接对应字体磅值。相关数值以实际为准,下表仅供参考。
初号 =42 磅 =1.482厘米
小初 =36 磅 =1.270厘米
一号 =26 磅 = 0.917厘米
小一 =24 磅 = 0.847厘米
二号 =22 磅 = 0.776厘米
小二 =18 磅 = 0.635厘米
三号 =16 磅 = 0.564厘米
小三 =15 磅 = 0.529厘米
四号 =14 磅 = 0.494厘米
小四 =12 磅 = 0.423厘米
五号 =10.5 磅 = 0.370厘米
小五 =9 磅 = 0.318厘米
六号 =7.5 磅 = 0.256厘米
小六 =6.5 磅 = 0.229厘米
七号 =5.5 磅 = 0.194厘米
八号 =5 磅 = 0.176厘米字体尺寸转换
编辑器可通过字号设置字体大小。
thinkEditor.SetFontSizeItem("小四")
or
thinkEditor.SetFontSizeItem(item.name)通过尺寸接口设置字体大小时,参数应为厘米cm。
thinkEditor.SetFontSize(0.423)
or
thinkEditor.SetFontSize(item.value)磅值与厘米转换关系
磅值使用如下公式转换为厘米值。
cm = pound / 28.35JavaScript代码如下
function pound2cm(pd /*float*/) {
return pd / 28.35; //1磅约等于0.03527厘米,1厘米约等于28.35磅
}
const fontSizeList = [
// 中文字号部分
{ name: "初号", pound: "42", value: pound2cm(42) },
{ name: "小初", pound: "36", value: pound2cm(36) },
{ name: "一号", pound: "26", value: pound2cm(26) },
{ name: "小一", pound: "24", value: pound2cm(24) },
{ name: "二号", pound: "22", value: pound2cm(22) },
{ name: "小二", pound: "18", value: pound2cm(18) },
{ name: "三号", pound: "16", value: pound2cm(16) },
{ name: "小三", pound: "15", value: pound2cm(15) },
{ name: "四号", pound: "14", value: pound2cm(14) },
{ name: "小四", pound: "12", value: pound2cm(12) },
{ name: "五号", pound: "10.5", value: pound2cm(10.5) },
{ name: "小五", pound: "9", value: pound2cm(9) },
{ name: "六号", pound: "7.5", value: pound2cm(7.5) },
{ name: "小六", pound: "6.5", value: pound2cm(6.5) },
{ name: "七号", pound: "5.5", value: pound2cm(5.5) },
{ name: "八号", pound: "5", value: pound2cm(5) },
// 磅值部分
{ name: "5", pound: "5", value: pound2cm(5) },
{ name: "5.5", pound: "5.5", value: pound2cm(5.5) },
{ name: "6.5", pound: "6.5", value: pound2cm(6.5) },
{ name: "7.5", pound: "7.5", value: pound2cm(7.5) },
{ name: "8", pound: "8", value: pound2cm(8) },
{ name: "9", pound: "9", value: pound2cm(9) },
{ name: "10", pound: "10", value: pound2cm(10) },
{ name: "10.5", pound: "10.5", value: pound2cm(10.5) },
{ name: "11", pound: "11", value: pound2cm(11) },
{ name: "12", pound: "12", value: pound2cm(12) },
{ name: "14", pound: "14", value: pound2cm(14) },
{ name: "16", pound: "16", value: pound2cm(16) },
{ name: "18", pound: "18", value: pound2cm(18) },
{ name: "20", pound: "20", value: pound2cm(20) },
{ name: "22", pound: "22", value: pound2cm(22) },
{ name: "26", pound: "26", value: pound2cm(26) },
{ name: "28", pound: "28", value: pound2cm(28) },
{ name: "36", pound: "36", value: pound2cm(36) },
{ name: "48", pound: "48", value: pound2cm(48) },
{ name: "56", pound: "56", value: pound2cm(56) },
{ name: "72", pound: "72", value: pound2cm(72) },
];文档更新时间: 2025-10-03 19:51 作者:admin