Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
feat(text): optional text-stroke for hollow/outlined glyphs
sergioerm21b466d5f719
diff --git a/slides/src/model.ts b/slides/src/model.tsindex 54082973..3b9b4eb5 100644--- a/slides/src/model.ts+++ b/slides/src/model.ts@@ -117,6 +117,10 @@ export interface TextElement extends ElementBase {lineHeight: number/** px; optional tracking for letter-spaced caps labels */letterSpacing?: number+ /** Outline / hollow glyphs via -webkit-text-stroke. `fill:'none'` makes the+ * interior transparent (the classic hollow section-break word); default keeps+ * the solid `color` fill and just adds an outline. */+ textStroke?: { width: number; color: string; fill?: string }/*** Layout placeholder prompt ("Click to add title"). While the element's* html is empty: the editor shows this dimmed; present and print hide thediff --git a/slides/src/render.ts b/slides/src/render.tsindex 89610716..b3f02422 100644--- a/slides/src/render.ts+++ b/slides/src/render.ts@@ -412,6 +412,11 @@ export function renderElement(el: SlideElement, doc: BentoDoc, opts: RenderOptsinner.style.fontFamily = el.fontFamily || doc.theme.fontFamilyinner.style.fontWeight = String(el.fontWeight)inner.style.color = el.color+ const ts = el.textStroke+ if (ts && ts.width) {+ inner.style.setProperty('-webkit-text-stroke', `${ts.width}px ${ts.color}`)+ if (ts.fill === 'none') inner.style.color = 'transparent'+ }inner.style.textAlign = el.aligninner.style.lineHeight = String(el.lineHeight)if (el.letterSpacing) inner.style.letterSpacing = `${el.letterSpacing}px`