Skip to content
Snippets Groups Projects
Commit d3feb26c authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] web: pdf.js courier font ok with chrome 92

In new version of chrome (92) or firefox when some fonts (eg. courier)
were used:

- either the page would never finish loading (odoo 13 and below)
- or the text would in this font would not be shown (odoo 14 and over)

This was solved in pdf.js whith this commit:

https://github.com/mozilla/pdf.js/commit/8805614a03



And this PR is backporting that commit in 12.0 version up to master.

opw-2621405 opw-2613412 opw-2620186 opw-2618225 opw-2616690 opw-2615502
opw-2616249 opw-2615144 opw-2613969 opw-2613793 opw-2618129 opw-2617736
opw-2622506 opw-2614508 opw-2620883 opw-2622105 opw-2620863 opw-2615326
opw-2622842 opw-2620220 opw-2622842 opw-2620220 opw-2615346 opw-2615026
opw-2618389 opw-2619382 opw-2613286 opw-2621730 opw-2613412 opw-2622029
opw-2620625 opw-2622311

closes #75020

closes odoo/odoo#75051

X-original-commit: eeff8c08
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 6e33a4a0
Branches
Tags
No related merge requests found
......@@ -32676,7 +32676,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
},
getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) {
var defaultWidth = 0;
var widths = [];
// Odoo: backport mozilla/pdf.js@8805614a03c for courier font bug with chrome 92
var widths = Object.create(null);
var monospace = false;
var stdFontMap = (0, _standard_fonts.getStdFontMap)();
var lookupName = stdFontMap[name] || name;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment