Word.SelectionInsertSymbolOptions interface
表示 Selection.insertSymbol 方法的选项。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/55-selection/insert-symbol.yaml
// Inserts a Wingdings checkmark (ANSI character 252) at the selection.
// The font option selects the symbol font, unicode: false uses the ANSI code point,
// and bias: Word.FontBias.standard ensures the standard (non-East-Asian) glyph is used.
await Word.run(async (context) => {
const options: Word.SelectionInsertSymbolOptions = {
font: "Wingdings",
unicode: false,
bias: Word.FontBias.standard,
};
context.document.selection.insertSymbol(252, options);
await context.sync();
console.log("Inserted Wingdings checkmark (character 252).");
});
属性
| bias | 如果提供,则指定符号的字体偏差。 此参数可用于设置东亚字符正确的字体斜线。 默认值 |
| font | 如果提供,则指定包含符号的字体的名称。 |
| unicode | 如果提供,则指定字符是否为 Unicode。
|
属性详细信息
bias
如果提供,则指定符号的字体偏差。 此参数可用于设置东亚字符正确的字体斜线。 默认值 standard为 。
bias?: Word.FontBias | "Standard" | "FarEast" | "NoSpecified";
属性值
Word.FontBias | "Standard" | "FarEast" | "NoSpecified"
注解
font
unicode
如果提供,则指定字符是否为 Unicode。
true若要在调用 方法时Selection.insertSymbol插入由 属性指定的 characterNumber Unicode 字符,则为 ;false若要改为插入 由 属性指定的 ANSI 字符,characterNumber则为 。 默认值 false为 。
unicode?: boolean;
属性值
boolean