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

Issue 300490043: Issue 4876: Add fontname replacing function for CFF (OTF/OTC) fonts

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

Description

Issue 4876/5: Add direct parsing CFF for getting Postscript font name FreeType 2.6 and 2.6.1 cannot get PS name from pure-CFF. (FreeType 2.5.5 and earlier does not have this issue. FreeType 2.6.2+ has this bug fixed.) So we need direct parsing of the 'CFF' table, in this case. Issue 4876/4: Enable fontname replacing in TrueType functions This commit enables fontname replacing for CFF (OTF/OTC) fonts. Issue 4876/3: Enable fontname replacing in Pango_font class This commit enables fontname replacing for CFF (OTF/OTC) fonts. Issue 4876/2: Enable fontname replacing in Open_type_font class This commit enables fontname replacing for CFF (OTF/OTC) fonts. Issue 4876/1: Add fontname replacing function for CFF (OTF/OTC) fonts For CFF (OTF/OTC) fonts, FT_Get_Postscript_Name () in FreeType 2.6+ gets the name in 'name' table. However, we want the name in 'CFF' table instead of in 'name' table because output postscript file is embedded only 'CFF' table of the font. They are inconsistent for some OpenType/CFF Collection fonts (OTC). This function can get the name in 'CFF' table. TODO: Check conflicts between fonts which have same name in 'CFF' table but different name in 'name' table.

Patch Set 1 #

Patch Set 2 : Use warning instead of error #

Total comments: 2

Patch Set 3 : Fix comment #

Patch Set 4 : Add "Issue 4876/5: Add directly parsing CFF for getting Postscript font name" #

Total comments: 8

Patch Set 5 : Fix and add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -8 lines) Patch
M lily/include/open-type-font.hh View 2 chunks +2 lines, -0 lines 0 comments Download
M lily/open-type-font.cc View 1 2 3 4 4 chunks +125 lines, -1 line 0 comments Download
M lily/pango-font.cc View 1 2 3 4 chunks +5 lines, -4 lines 0 comments Download
M lily/ttf.cc View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 10
trueroad
Use warning instead of error
7 years, 10 months ago (2016-06-25 13:51:19 UTC) #1
lemzwerg
LGTM, thanks! https://codereview.appspot.com/300490043/diff/20001/lily/open-type-font.cc File lily/open-type-font.cc (right): https://codereview.appspot.com/300490043/diff/20001/lily/open-type-font.cc#newcode160 lily/open-type-font.cc:160: string cff_table = get_otf_table (face, "CFF "); ...
7 years, 10 months ago (2016-06-25 15:34:24 UTC) #2
trueroad
Fix comment
7 years, 10 months ago (2016-06-25 17:03:25 UTC) #3
trueroad
Thank you for your reviewing. https://codereview.appspot.com/300490043/diff/20001/lily/open-type-font.cc File lily/open-type-font.cc (right): https://codereview.appspot.com/300490043/diff/20001/lily/open-type-font.cc#newcode160 lily/open-type-font.cc:160: string cff_table = get_otf_table ...
7 years, 10 months ago (2016-06-25 17:05:18 UTC) #4
trueroad
Add "Issue 4876/5: Add directly parsing CFF for getting Postscript font name"
7 years, 9 months ago (2016-06-26 03:59:35 UTC) #5
lemzwerg
LGTM again, thanks! https://codereview.appspot.com/300490043/diff/60001/lily/open-type-font.cc File lily/open-type-font.cc (right): https://codereview.appspot.com/300490043/diff/60001/lily/open-type-font.cc#newcode185 lily/open-type-font.cc:185: // FreeType 2.6.2+ has been fixed ...
7 years, 9 months ago (2016-06-26 04:56:16 UTC) #6
trueroad
Fix and add comment
7 years, 9 months ago (2016-06-26 07:13:22 UTC) #7
trueroad
Thank you for your comments. https://codereview.appspot.com/300490043/diff/60001/lily/open-type-font.cc File lily/open-type-font.cc (right): https://codereview.appspot.com/300490043/diff/60001/lily/open-type-font.cc#newcode185 lily/open-type-font.cc:185: // FreeType 2.6.2+ has ...
7 years, 9 months ago (2016-06-26 07:17:08 UTC) #8
lemzwerg
> > This code always gets the first name in the CFF's name index. Is ...
7 years, 9 months ago (2016-06-26 08:05:50 UTC) #9
trueroad
7 years, 9 months ago (2016-07-04 12:58:00 UTC) #10
I've pushed to staging.

Issue 4876/5: Add direct parsing CFF for getting Postscript font name
commit ca9c7a2c28b32f6abe203979532946d557674891

Issue 4876/4: Enable fontname replacing in TrueType functions
commit 22559b0c3837f49762caa52a7b05f35a156c595f

Issue 4876/3: Enable fontname replacing in Pango_font class
commit de9831ffbac6592724492a21b084726e370bd362

Issue 4876/2: Enable fontname replacing in Open_type_font class
commit 3c2fbb63c2b588dc244197ab7de7f028807833bb

Issue 4876/1: Add fontname replacing function for CFF (OTF/OTC) fonts
commit fa2596b6ec273e7d82907f97acf0c65559b3c1b4
Sign in to reply to this message.

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