From 58743b879043b761a555c0a161ac353f8cf33f04 Mon Sep 17 00:00:00 2001 From: Roman Karavia <47303530+romankaravia@users.noreply.github.com> Date: Tue, 5 Nov 2019 09:56:17 +0100 Subject: [PATCH] Fix font kerning Fix font kerning for headless Chromium in Linux. Tested with Chromium in docker container on macOS. See screenshots attached to PR. See also https://github.com/GoogleChrome/puppeteer/issues/661 https://github.com/GoogleChrome/puppeteer/issues/2410 https://stackoverflow.com/questions/52552573/kerning-issues-with-headless-chrome --- plugins/screenshot/helpers.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/screenshot/helpers.js b/plugins/screenshot/helpers.js index b9616ccd..b276e4c8 100644 --- a/plugins/screenshot/helpers.js +++ b/plugins/screenshot/helpers.js @@ -3,7 +3,11 @@ const fetch = require("node-fetch"); // start a chromium process here let browserPromise = puppeteer.launch({ - args: ["--no-sandbox", "--disable-dev-shm-usage"] + args: [ + "--no-sandbox", + "--disable-dev-shm-usage", + "--font-render-hinting=none" + ] }); // fetches assets and returns a concatenated string containing everything fetched