From 6214343032f629f3933891e09a0d3375f0de622d Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Tue, 2 Jul 2024 17:56:57 +0100 Subject: [PATCH] enhance(thumbnail): only set `fontSize` when height is non-default --- functions/_common/grapherRenderer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/_common/grapherRenderer.ts b/functions/_common/grapherRenderer.ts index 34fc801c20b..249488b75bf 100644 --- a/functions/_common/grapherRenderer.ts +++ b/functions/_common/grapherRenderer.ts @@ -119,7 +119,11 @@ const extractOptions = (params: URLSearchParams): ImageOptions => { options.pngHeight = options.svgHeight = DEFAULT_HEIGHT } - if (!options.fontSize && options.svgHeight) { + if ( + !options.fontSize && + options.svgHeight && + options.svgHeight !== DEFAULT_HEIGHT + ) { options.fontSize = Math.max(10, options.svgHeight / 25) }