Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redesign: render thumbnails at a larger font size #2749

Merged

Conversation

marcelgerber
Copy link
Member

@sophiamersmann, if you could take a look at 0a31261 for a moment that would be great.

Basically, the rationale is that if a title spans two or more lines, then we benefit from the font size reduction even if that doesn't reduce the number of lines.
I also changed the font size reduction to a maximum of 20% rather than cap it at 2px. It's just another arbitrary number, so feel free to change.

In theory we could also make this behavior dependent on the isGeneratingThumbnail flag, so let me know what you think.

Here are some thumbnails rendered using the worker. The last three have a reduced title font size.
image
image
image
image

Copy link
Member

@sophiamersmann sophiamersmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

For "normal" static charts, the range would now be 24px -> ~20px which is perfectly fine, I think. Removing the additional check if reducing the font size didn't help also makes sense to me – I put it in with low confidence.

@marcelgerber marcelgerber merged commit 8295b42 into grapher-redesign Oct 12, 2023
15 of 17 checks passed
@marcelgerber marcelgerber deleted the grapher-optimize-for-thumbnail-generation branch October 12, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants