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

  • fancy_pants@reddthat.com
    link
    fedilink
    arrow-up
    1
    ·
    6 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.