Use glyph widths from FreeType rather than what the file says

pdf files contain lists of glyph widths even for fonts that are
not embedded.  This can lead to problems when the exact font does
not exist on the system, and FreeType substitutes another similar
one.  In that case poppler currently uses the glyph widths from
the pdf file, which however may not match the font that is
actually used.
7 jobs for ask-freetype-for-glyph-widths in 4 minutes and 34 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Build
failed #5695196
build

00:04:33

failed #5695201
build_android

00:00:37

failed #5695197
build_clang_libcpp

00:03:27

failed #5695200
build_clazy

00:04:26

failed #5695199
build_mingw64_fedora

00:01:59

failed #5695198
build_ubuntu_16_04

00:02:01

failed #5695195
clang_format

00:01:01

 
Name Stage Failure
failed
build Build
[37/76] Building CXX object qt5/src/CMakeFiles/poppler-qt5.dir/QPainterOutputDev.cc.o
[38/76] Building CXX object qt6/src/CMakeFiles/poppler-qt6.dir/QPainterOutputDev.cc.o
[39/76] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.o
[40/76] Building CXX object CMakeFiles/poppler.dir/poppler/PSOutputDev.cc.o
[41/76] Building CXX object CMakeFiles/poppler.dir/poppler/GfxState.cc.o
[42/76] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.o
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_clazy Build
[92/447] Building CXX object CMakeFiles/poppler.dir/poppler/TextOutputDev.cc.o
[93/447] Building CXX object CMakeFiles/poppler.dir/splash/Splash.cc.o
[94/447] Building CXX object CMakeFiles/poppler.dir/poppler/GfxState.cc.o
[95/447] Building CXX object CMakeFiles/poppler.dir/poppler/PSOutputDev.cc.o
[96/447] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.o
[97/447] Building CXX object CMakeFiles/poppler.dir/poppler/PDFDoc.cc.o
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_clang_libcpp Build
[67/447] Building CXX object CMakeFiles/poppler.dir/poppler/Stream.cc.o
[68/447] Building CXX object CMakeFiles/poppler.dir/poppler/StructElement.cc.o
[69/447] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.o
[70/447] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.o
[71/447] Building CXX object CMakeFiles/poppler.dir/poppler/GfxState.cc.o
[72/447] Building CXX object CMakeFiles/poppler.dir/poppler/PDFDoc.cc.o
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_ubuntu_16_04 Build
../poppler/GfxFont.cc:1441:9: error: 'cout' is not a member of 'std'
std::cout << "Use default fonts" << std::endl;
^
../poppler/GfxFont.cc:1441:45: error: 'endl' is not a member of 'std'
std::cout << "Use default fonts" << std::endl;
^
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_mingw64_fedora Build
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31/156] Building CXX object qt5/src/CMakeFiles/poppler-qt5.dir/QPainterOutputDev.cc.obj
[32/156] Building CXX object CMakeFiles/poppler.dir/poppler/GfxState.cc.obj
[33/156] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.obj
[34/156] Building CXX object CMakeFiles/poppler.dir/poppler/PSOutputDev.cc.obj
[35/156] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.obj
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
clang_format Build
-          ok = true;
- return;
+ ok = true;
+ return;
}

// Getting glyph widths from FreeType failed -- fall back to default values
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_android Build
[100/210] Building CXX object CMakeFiles/poppler.dir/splash/Splash.cc.o
[101/210] Building CXX object CMakeFiles/poppler.dir/poppler/SplashOutputDev.cc.o
[102/210] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.o
[103/210] Building CXX object CMakeFiles/poppler.dir/poppler/TextOutputDev.cc.o
[104/210] Building CXX object CMakeFiles/poppler.dir/poppler/PDFDoc.cc.o
[105/210] Building CXX object CMakeFiles/poppler.dir/poppler/PSOutputDev.cc.o
ninja: build stopped: subcommand failed.
Cleaning up file based variables
ERROR: Job failed: exit code 1