:feat: Font for eastAsia
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Size, SizeComplexScript } from "file/paragraph/run/formatting";
|
||||
import { RunProperties } from "file/paragraph/run/properties";
|
||||
import { RunFonts } from "file/paragraph/run/run-fonts";
|
||||
import { IFontAttributesProperties, RunFonts } from "file/paragraph/run/run-fonts";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
export class RunPropertiesDefaults extends XmlComponent {
|
||||
@ -18,8 +18,8 @@ export class RunPropertiesDefaults extends XmlComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
public font(fontName: string): RunPropertiesDefaults {
|
||||
this.properties.push(new RunFonts(fontName));
|
||||
public font(font: string | IFontAttributesProperties): RunPropertiesDefaults {
|
||||
this.properties.push(new RunFonts(font));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,11 @@
|
||||
import { AlignmentType, EmphasisMarkType, IIndentAttributesProperties, ISpacingProperties, UnderlineType } from "../paragraph";
|
||||
import {
|
||||
AlignmentType,
|
||||
EmphasisMarkType,
|
||||
IFontAttributesProperties,
|
||||
IIndentAttributesProperties,
|
||||
ISpacingProperties,
|
||||
UnderlineType,
|
||||
} from "../paragraph";
|
||||
import { ShadingType } from "../table";
|
||||
|
||||
export interface IRunStyleOptions {
|
||||
@ -19,7 +26,7 @@ export interface IRunStyleOptions {
|
||||
readonly type?: EmphasisMarkType;
|
||||
};
|
||||
readonly color?: string;
|
||||
readonly font?: string;
|
||||
readonly font?: string | IFontAttributesProperties;
|
||||
readonly characterSpacing?: number;
|
||||
readonly highlight?: string;
|
||||
readonly shadow?: {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark";
|
||||
import * as formatting from "file/paragraph/run/formatting";
|
||||
import { RunProperties } from "file/paragraph/run/properties";
|
||||
import { IFontAttributesProperties } from "file/paragraph/run/run-fonts";
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
|
||||
import { BasedOn, Link, SemiHidden, UiPriority, UnhideWhenUsed } from "./components";
|
||||
@ -28,7 +29,7 @@ export interface IBaseCharacterStyleOptions {
|
||||
readonly type?: EmphasisMarkType;
|
||||
};
|
||||
readonly color?: string;
|
||||
readonly font?: string;
|
||||
readonly font?: string | IFontAttributesProperties;
|
||||
readonly characterSpacing?: number;
|
||||
readonly highlight?: string;
|
||||
readonly shadow?: {
|
||||
|
Reference in New Issue
Block a user