Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Font Kerning in Webkit Reports

by
MoaHub, Graeme Gellatly
- 21/09/2017 11:57:20
Hi all,

I have a problem which I can work around that I'd prefer not to.

Certain fonts - e.g. Work Sans such as used in Odoo Documentation, but there are plenty of others produce poor output in wkhtmltopdf, at least under Debian variants.  The kerning is wrong and parts of glyphs are missing.  Work Sans is definitely the worst I've come across, especially as weight increases but even the standard websafe fonts aren't 100% perfect on close examination.

Now if I use otf, or eot instead of woff/woff2 fonts, I get perfect fonts in wkhtmltopdf, but replacement fonts in Chromium.

If I declare them all under the same font-face entry src, it uses the browser default, which ends up in the strange world where Internet Explorer 9 prints and displays perfectly (because it doesn't understand woff) , but any modern browser has issues as above.

The workaround I've got so far is simply declaring different classes and families for reports and screen to make everything nice and consistent.  It's not like it is really that big a deal having to double up half a dozen font-face less variables etc, but it would be nice not to.

Does anyone know a way to get the browser to use woff, but webkit to use the otf (or eot or ttf) font in a single css declaration?