2017-03-08 20:32:30 +00:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
|
2016-05-21 00:02:46 +01:00
|
|
|
|
2017-03-08 17:08:44 +01:00
|
|
|
interface IRunFontAttributesProperties {
|
2016-05-26 15:08:34 +01:00
|
|
|
ascii: string;
|
|
|
|
hAnsi: string;
|
2017-03-08 19:48:32 +01:00
|
|
|
hint?: string;
|
2016-05-21 00:02:46 +01:00
|
|
|
}
|
|
|
|
|
2017-03-10 10:42:24 +01:00
|
|
|
class RunFontAttributes extends XmlAttributeComponent<IRunFontAttributesProperties> {
|
|
|
|
protected xmlKeys = {
|
|
|
|
ascii: "w:ascii",
|
|
|
|
hAnsi: "w:hAnsi",
|
|
|
|
hint: "w:hint",
|
|
|
|
};
|
2016-05-21 00:02:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export class RunFonts extends XmlComponent {
|
2016-05-26 15:08:34 +01:00
|
|
|
|
2017-03-08 19:48:32 +01:00
|
|
|
constructor(ascii: string, hint?: string) {
|
2017-03-08 17:08:44 +01:00
|
|
|
super("w:rFonts");
|
2016-05-21 00:02:46 +01:00
|
|
|
this.root.push(new RunFontAttributes({
|
|
|
|
ascii: ascii,
|
|
|
|
hAnsi: ascii,
|
2017-03-08 17:08:44 +01:00
|
|
|
hint: hint,
|
2016-05-21 00:02:46 +01:00
|
|
|
}));
|
|
|
|
}
|
2017-03-08 17:08:44 +01:00
|
|
|
}
|