12

been running puppeteer in docker for automated screenshots and the font rendering drives me nuts. same page looks completely different between my mac and the container because different font stacks.

installed google fonts in the dockerfile which helped but theres still subtle differences in kerning and hinting. antialiasing is different too depending on whether the container has fontconfig set up properly.

the really annoying part is screenshots of text-heavy pages where the line breaks end up in different places because of font metrics differences. a heading that fits on one line locally wraps to two lines in the container.

tried using web fonts exclusively (loading them via @font-face) which makes it more consistent but some sites use system fonts and you cant control that.

anyone found a solid approach for getting consistent font rendering across environments? or is this just one of those "works on my machine" problems that never fully goes away

you are viewing a single comment's thread
view the rest of the comments
[-] fancy_pants@reddthat.com 1 points 16 hours ago

I don't think this has been solved between actual desktop platforms, there have always been debates on how text is ugly in Linux / blurry in Mac, depending on what the commenter is used to.

That being said, try bashing your image on different distros.

this post was submitted on 16 Oct 2026
12 points (100.0% liked)

Programming

28853 readers
215 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS