Transformed fonts display badly in PDF
Categories
(Firefox :: PDF Viewer, defect, P3)
Tracking
()
People
(Reporter: mike, Unassigned, NeedInfo)
Details
(Whiteboard: [pdfjs-font-conversion])
Attachments
(1 file)
5.87 KB,
application/pdf
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Steps to reproduce:
View PDF file containing transformed font, prepared using ExtendFont in pdfTeX to condense the glyphs
Actual results:
The height as well as the width of characters is reduced
Expected results:
Reduction in width only, as seen when viewing the same file with Evince
![]() |
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Looks fine on MacOS, but I do see the issue on Linux.
Comment 2•2 years ago
|
||
FYI, I also see the issue on Linux with Debian's firefox 95.0.1-1 package.
Updated•2 years ago
|
Updated•1 year ago
|
Comment 3•10 months ago
|
||
The same issue applies to Thunderbird 102 and Firefox-109. Font display for transformed fonts in PDF is ugly.
Setting
browser.display.use_document_fonts = 0
fixes the problem, but other users report, that this caused font problems in HTML display.
Comment 5•4 months ago
|
||
Just for the record, this is still happening in Nightly 117.0a1, 20230725211415. The workaround with browser.display.use_document_fonts = 0
also works.
Comment 6•4 months ago
|
||
It's a bit strange, it wfm on Windows and Mac, I can reproduce the issue on Fedora.
The font used for the second sequence of "x" is a type 1 font and it starts with:
%!PS-AdobeFont-1.1: LucidaTypewriter 1.002
%%CreationDate: 1994 Nov 12 10:47:10
% Bigelow & Holmes, Inc. Pat. Des. 289,422
% Lucida is a registered trademark of Bigelow & Holmes Inc.
11 dict begin
/FontInfo 9 dict dup begin
/version (1.002) readonly def
/Notice (Copyright (c) 1993, 1994 Bigelow & Holmes and Y&Y, Inc. http://www.YandY.com All Rights Reserved.) readonly def
/FullName (Lucida Typewriter) readonly def
/FamilyName (LucidaTypewriter) readonly def
/Weight (Medium) readonly def
/ItalicAngle 0 def
/isFixedPitch true def
/UnderlinePosition -100 def
/UnderlineThickness 50 def
end readonly def
/FontName /URXDVG+LucidaTypewriter-Extend_850 def
/PaintType 0 def
/FontType 1 def
/FontMatrix [0.00085 0 0 0.001 0 0 ] readonly def
In pdf.js, the font is wrapped in a CFF font and we correctly set the matrix transformation:
https://github.com/mozilla/pdf.js/blob/a2eca47ed1882c0c5c59b1943ca1e9333397a49e/src/core/type1_font.js#L340
Out of curiosity, I changed 0.00085
to 0.000085
and on Windows I can see a thin "x" but the same height the first ones, but on Fedora nothing I can see is displayed.
Maybe the min of the x-scale and y-scale factors is taken to adjust the font size... I don't know but it's very likely an issue in FreeType.
:jfkthame, maybe you'd know what be could wrong here.
Description
•