docx_rs/documents/elements/
font_scheme.rs1use serde::Serialize;
2
3#[derive(Debug, Clone, PartialEq, Serialize)]
4#[cfg_attr(feature = "wasm", derive(ts_rs::TS))]
5#[cfg_attr(feature = "wasm", ts(export))]
6#[serde(rename_all = "camelCase")]
7pub struct FontSchemeFont {
8 pub script: String,
9 pub typeface: String,
10}
11
12#[derive(Debug, Clone, PartialEq, Serialize, Default)]
13#[cfg_attr(feature = "wasm", derive(ts_rs::TS))]
14#[cfg_attr(feature = "wasm", ts(export))]
15#[serde(rename_all = "camelCase")]
16pub struct FontGroup {
17 pub latin: String,
18 pub ea: String,
19 pub cs: String,
20 pub fonts: Vec<FontSchemeFont>,
21}
22
23#[derive(Debug, Clone, PartialEq, Serialize, Default)]
24#[cfg_attr(feature = "wasm", derive(ts_rs::TS))]
25#[cfg_attr(feature = "wasm", ts(export))]
26#[serde(rename_all = "camelCase")]
27pub struct FontScheme {
28 pub major_font: FontGroup,
29 pub minor_font: FontGroup,
30}
31
32impl FontScheme {
34 pub fn new() -> Self {
35 Self::default()
36 }
37}