add #font method to Run

This commit is contained in:
felipe
2017-03-08 20:29:12 +01:00
parent 81e0d56918
commit 1a37242a3d
2 changed files with 24 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import {XmlComponent, Attributes} from "../xml-components";
import { RunFonts } from "./run-fonts";
import {RunProperties} from "./properties";
import {Bold, Italics} from "./formatting";
import {Tab} from "./tab";
@ -11,7 +12,6 @@ import {Underline} from "./underline"
export class Run extends XmlComponent {
private properties: RunProperties;
constructor() {
super("w:r");
this.properties = new RunProperties();
@ -72,4 +72,9 @@ export class Run extends XmlComponent {
this.properties.push(new SuperScript());
return this;
}
}
font(fontName: string): Run {
this.properties.push(new RunFonts(fontName));
return this;
}
}