Skip to content

Commit

Permalink
Merge pull request #1232 from gitbrent/1158-feature-set-default-fontf…
Browse files Browse the repository at this point in the history
…ace-in-masters

add feature - set default fontface in masters
  • Loading branch information
gitbrent authored Mar 19, 2023
2 parents 56df4e6 + 86415bf commit d1fa21c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 38 deletions.
6 changes: 4 additions & 2 deletions demos/modules/demos.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* AUTH: Brent Ely (https://github.com/gitbrent/)
* DESC: Common test/demo slides for all library features
* DEPS: Used by various demos (./demos/browser, ./demos/node, etc.)
* VER.: 3.6.0
* BLD.: 20210403
* VER.: 3.12.0
* BLD.: 20230319
*/

import { COMPRESS, CUST_NAME } from "../modules/enums.mjs";
Expand Down Expand Up @@ -38,6 +38,8 @@ export function execGenSlidesFuncs(type, pptxgen) {
pptx.author = "Brent Ely";
pptx.company = CUST_NAME;
pptx.revision = "15";
// FYI: use `headFontFace` and/or `bodyFontFace` to set the default font for the entire presentation (including slide Masters)
// pptx.theme = { bodyFontFace: "Arial" };

// STEP 3: Set layout
pptx.layout = "LAYOUT_WIDE";
Expand Down
15 changes: 15 additions & 0 deletions src/core-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,20 @@ export interface ObjectNameProps {
*/
objectName?: string
}
export interface ThemeProps {
/**
* Headings font face name
* @example 'Arial Narrow'
* @default 'Calibri Light'
*/
headFontFace?: string
/**
* Body font face name
* @example 'Arial'
* @default 'Calibri'
*/
bodyFontFace?: string
}

// image / media ==================================================================================
export type MediaType = 'audio' | 'online' | 'video'
Expand Down Expand Up @@ -1835,6 +1849,7 @@ export interface PresentationProps {
*/
rtlMode: boolean
subject: string
theme: ThemeProps
title: string
}
// PRIVATE interface
Expand Down
Loading

0 comments on commit d1fa21c

Please sign in to comment.