Skip to content

Commit

Permalink
enhance(thumbnail): only set fontSize when height is non-default
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed Jul 2, 2024
1 parent ac1dca2 commit 6214343
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion functions/_common/grapherRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 6214343

Please sign in to comment.