Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Issue 2395883002: Use another vector for installed fonts in CFX_FontMapper (Closed)

Created:
4 years, 2 months ago by npm
Modified:
4 years, 2 months ago
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Split m_InstalledTTFonts into two vectors to avoid sketchy logic. Instead of relying on ' ' to determine whether the CFX_Bytestring is added on one place or another, use another vector. When trying to match fonts from the fontmapper, compare with both vectors. BUG=pdfium:510 Committed: https://pdfium.googlesource.com/pdfium/+/065c35006d96eaca324f49248d20d83709a25fbe

Patch Set 1 #

Total comments: 6

Patch Set 2 : Return to vectors #

Patch Set 3 : Fix win #

Patch Set 4 : Fix win 2 #

Total comments: 1

Patch Set 5 : Use std::pair #

Total comments: 3

Patch Set 6 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -17 lines) Patch
M core/fxge/cfx_fontmapper.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M core/fxge/ge/cfx_fontmapper.cpp View 1 2 3 4 5 2 chunks +10 lines, -11 lines 0 comments Download
M core/fxge/win32/fx_win32_device.cpp View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M fpdfsdk/cfx_systemhandler.cpp View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (24 generated)
npm
PTAL
4 years, 2 months ago (2016-10-05 21:04:17 UTC) #5
dsinclair
https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp File core/fxge/ge/cfx_fontmapper.cpp (left): https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp#oldcode373 core/fxge/ge/cfx_fontmapper.cpp:373: CFX_ByteString norm1 = TT_NormalizeName(m_InstalledTTFonts[i].c_str()); Previously if TT_NormalizeName(new_name) matched norm_name ...
4 years, 2 months ago (2016-10-05 21:12:07 UTC) #6
Tom Sepez
https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp File core/fxge/ge/cfx_fontmapper.cpp (left): https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp#oldcode372 core/fxge/ge/cfx_fontmapper.cpp:372: for (i = pdfium::CollectionSize<int>(m_InstalledTTFonts) - 1; i >= 0; ...
4 years, 2 months ago (2016-10-05 21:17:34 UTC) #7
npm
https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp File core/fxge/ge/cfx_fontmapper.cpp (left): https://codereview.chromium.org/2395883002/diff/1/core/fxge/ge/cfx_fontmapper.cpp#oldcode372 core/fxge/ge/cfx_fontmapper.cpp:372: for (i = pdfium::CollectionSize<int>(m_InstalledTTFonts) - 1; i >= 0; ...
4 years, 2 months ago (2016-10-05 21:21:47 UTC) #10
Tom Sepez
Isn't there some use of m_InstalledTTFonts in core/fxge/win32/fx_win32_device.cpp ?
4 years, 2 months ago (2016-10-05 21:27:36 UTC) #11
npm
On 2016/10/05 21:27:36, Tom Sepez wrote: > Isn't there some use of m_InstalledTTFonts in > ...
4 years, 2 months ago (2016-10-05 21:35:55 UTC) #12
npm
PTAL. Abandoned map and now using another vector.
4 years, 2 months ago (2016-10-05 22:30:35 UTC) #22
Tom Sepez
https://codereview.chromium.org/2395883002/diff/60001/core/fxge/cfx_fontmapper.h File core/fxge/cfx_fontmapper.h (right): https://codereview.chromium.org/2395883002/diff/60001/core/fxge/cfx_fontmapper.h#newcode48 core/fxge/cfx_fontmapper.h:48: std::vector<CFX_ByteString> m_LocalizedTTFonts; are we sure we don't just want ...
4 years, 2 months ago (2016-10-05 22:34:11 UTC) #25
npm
PTAL, using vector of pairs
4 years, 2 months ago (2016-10-06 14:34:32 UTC) #28
Tom Sepez
This is quite good. LGTM after fixing nits. https://codereview.chromium.org/2395883002/diff/80001/core/fxge/ge/cfx_fontmapper.cpp File core/fxge/ge/cfx_fontmapper.cpp (right): https://codereview.chromium.org/2395883002/diff/80001/core/fxge/ge/cfx_fontmapper.cpp#newcode350 core/fxge/ge/cfx_fontmapper.cpp:350: if ...
4 years, 2 months ago (2016-10-06 15:58:03 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2395883002/100001
4 years, 2 months ago (2016-10-06 18:37:33 UTC) #34
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 19:29:12 UTC) #36
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://pdfium.googlesource.com/pdfium/+/065c35006d96eaca324f49248d20d83709a2...

Powered by Google App Engine
This is Rietveld 408576698