From 6e56c6e0d4e05cd2adf221439edd60835d31fe6a Mon Sep 17 00:00:00 2001 From: Blake Gentry Date: Mon, 30 Dec 2019 20:49:07 -0800 Subject: [PATCH] use --font-render-hinting=none to fix kerning When using font render hinting on Chrome headless on Linux, the kerning is inconsistent. Several issues cover this, including: * https://github.com/puppeteer/puppeteer/issues/661 * https://github.com/nzzdev/Q-server/pull/193 Disabling that render hinting entirely results in correct kerning. --- internal/pkg/chrome/chrome.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/pkg/chrome/chrome.go b/internal/pkg/chrome/chrome.go index b4ba06f5..9bd2ecc9 100644 --- a/internal/pkg/chrome/chrome.go +++ b/internal/pkg/chrome/chrome.go @@ -50,8 +50,9 @@ func cmd(logger xlog.Logger) (*exec.Cmd, error) { "--headless", // see https://github.com/thecodingmachine/gotenberg/issues/157. "--disable-dev-shm-usage", - // see https://github.com/GoogleChrome/puppeteer/issues/2410. - "--font-render-hinting=medium", + // See https://github.com/puppeteer/puppeteer/issues/661 + // and https://github.com/puppeteer/puppeteer/issues/2410. + "--font-render-hinting=none", "--remote-debugging-port=9222", "--disable-gpu", "--disable-translate",