Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(332)

Issue 313930043: Fix Type1 (PFA and PFB) font embedding

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years ago by trueroad
Modified:
3 years ago
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 4989/3: Add a guard against invalid Type 1 (PFB) font This commit makes LilyPond can detect invalid Type1 (PFB) font. Issue 4989/2: Fix Type 1 (PFB) font embedding Type 1 PFA data which is converted from PFB files can contain '\0'. In order to avoid problems with '\0', this commit makes to use the file length instead of zero-terminated string. Issue 4989/1: Fix Type 1 (PFA) font embedding Type 1 (PFA) fonts can contain '\0'. e.g. URW++ June 2016 (Ghostscript 9.20) In order to avoid problems with '\0', this commit makes to use the file length instead of zero-terminated string.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use stringstream and add PFB error check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -34 lines) Patch
M lily/include/font-metric.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/pfb.cc View 1 2 chunks +36 lines, -27 lines 0 comments Download
M lily/pfb-scheme.cc View 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 6
lemzwerg
LGTM. https://codereview.appspot.com/313930043/diff/1/lily/pfb.cc File lily/pfb.cc (right): https://codereview.appspot.com/313930043/diff/1/lily/pfb.cc#newcode49 lily/pfb.cc:49: seglen |= (static_cast<Byte>(*p++) << 24); I suggest to ...
3 years ago (2016-10-26 13:07:16 UTC) #1
trueroad
Thank you for your reviewing. > https://codereview.appspot.com/313930043/diff/1/lily/pfb.cc > File lily/pfb.cc (right): > > https://codereview.appspot.com/313930043/diff/1/lily/pfb.cc#newcode49 > ...
3 years ago (2016-10-26 14:09:57 UTC) #2
lemzwerg
> How about stringstream? > > std::stringstream ss; > ss << std::hex << std::setw (2) ...
3 years ago (2016-10-26 15:08:50 UTC) #3
trueroad
Use stringstream and add PFB error check
3 years ago (2016-10-27 15:02:03 UTC) #4
lemzwerg
LGTM now, thanks!
3 years ago (2016-10-27 15:35:36 UTC) #5
trueroad
3 years ago (2016-11-04 11:29:18 UTC) #6
I've pushed.

Issue 4989/3: Add a guard against invalid Type 1 (PFB) font
commit 3ec0872f35d8ab79d07127c3e7be5f08977c2394

Issue 4989/2: Fix Type 1 (PFB) font embedding
commit 65a0059b69385985896a24f407b3a791d33aef0f

Issue 4989/1: Fix Type1 (PFA) font embedding
commit 1e0bc03d9e50ea4d69e08fdbb0a85e56203299f2
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b