Files
docx-js/ts/numbering/run-fonts.ts

29 lines
661 B
TypeScript
Raw Normal View History

2016-05-21 00:02:46 +01:00
import {XmlComponent, XmlAttributeComponent} from "../docx/xml-components";
interface RunFontAttributesProperties {
2016-05-26 15:08:34 +01:00
ascii: string;
hAnsi: string;
hint: string;
2016-05-21 00:02:46 +01:00
}
class RunFontAttributes extends XmlAttributeComponent {
2016-05-26 15:08:34 +01:00
2016-05-21 00:02:46 +01:00
constructor(properties: RunFontAttributesProperties) {
super({
left: "w:left",
hanging: "w:hanging"
}, properties);
}
}
export class RunFonts extends XmlComponent {
2016-05-26 15:08:34 +01:00
2016-05-21 00:02:46 +01:00
constructor(ascii: string, hint: string) {
super("w:ind");
this.root.push(new RunFontAttributes({
ascii: ascii,
hAnsi: ascii,
hint: hint
}));
}
}