2024-01-17 15:40:47 +02:00
|
|
|
import { LineSpacing, ParagraphProperty } from "./paragraph-property";
|
2020-12-14 08:01:23 +02:00
|
|
|
import { RunProperty, RunFonts } from "./run";
|
|
|
|
|
|
|
|
export class DocDefaults {
|
|
|
|
runProperty: RunProperty;
|
2024-01-17 15:40:47 +02:00
|
|
|
paragraphProperty: ParagraphProperty;
|
2020-12-14 08:01:23 +02:00
|
|
|
|
|
|
|
size(size: number) {
|
|
|
|
this.runProperty = { ...this.runProperty, size };
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
fonts(fonts: RunFonts) {
|
|
|
|
this.runProperty = { ...this.runProperty, fonts };
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2023-06-23 13:09:27 +03:00
|
|
|
characterSpacing(characterSpacing: number) {
|
|
|
|
this.runProperty = { ...this.runProperty, characterSpacing };
|
2020-12-14 08:01:23 +02:00
|
|
|
return this;
|
|
|
|
}
|
2024-01-17 15:40:47 +02:00
|
|
|
|
|
|
|
lineSpacing(lineSpacing: LineSpacing) {
|
|
|
|
this.paragraphProperty = { ...this.paragraphProperty, lineSpacing };
|
|
|
|
return this;
|
|
|
|
}
|
2020-12-14 08:01:23 +02:00
|
|
|
}
|