Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces are render as dots #8707

Closed
Kerumen opened this issue Jul 26, 2017 · 2 comments · Fixed by #8747
Closed

Spaces are render as dots #8707

Kerumen opened this issue Jul 26, 2017 · 2 comments · Fixed by #8747

Comments

@Kerumen
Copy link

Kerumen commented Jul 26, 2017

Link to PDF file (or attach file here): 07_2017_managery (21).pdf

Configuration:

  • Web browser and its version: Chrome 59.0.3071.115
  • Operating system and its version: macOS Sierra v10.2.5
  • PDF.js version: 1.8.579
  • Is an extension: No

Steps to reproduce the problem:

  1. Generate the PDF

What is the expected behavior? (add screenshot)

The PDF should render normally with all the spaces.
screen shot 2017-07-26 at 19 30 47

What went wrong? (add screenshot)

Every spaces are replaced by a dot.

screen shot 2017-07-26 at 18 11 34

I tested with an old version of PDF.js (1.7.235) and it works well. So I guess it's a regression.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jul 26, 2017

This regressed in PR #8580, and unfortunately PR #8681 did not help here.

brendandahl added a commit to brendandahl/pdf.js that referenced this issue Aug 4, 2017
In issue mozilla#8707, there's a char code mapped to a non-
existing glyph which shouldn't be drawn. However, we
saw it was missing and tried to then use the post table and
end up mapping it incorrectly.

This illuminated a problem with issue mozilla#5704 and bug
893730 where glyphs disappeared after above fix.  This was
from the cmap returning the wrong glyph id. Which in turn was
caused because the font had multiple of the same type of cmap
table and we were choosing the last one. Now, we instead
default to the first one. I'm unsure if we should instead be
merging the multiple cmaps, but using only the first one works.
@mikelweb
Copy link

This didn't solve my problem... :(

movsb pushed a commit to movsb/pdf.js that referenced this issue Jul 14, 2018
In issue mozilla#8707, there's a char code mapped to a non-
existing glyph which shouldn't be drawn. However, we
saw it was missing and tried to then use the post table and
end up mapping it incorrectly.

This illuminated a problem with issue mozilla#5704 and bug
893730 where glyphs disappeared after above fix.  This was
from the cmap returning the wrong glyph id. Which in turn was
caused because the font had multiple of the same type of cmap
table and we were choosing the last one. Now, we instead
default to the first one. I'm unsure if we should instead be
merging the multiple cmaps, but using only the first one works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants