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

Issue 737103002: Attempt to fallback to some matching font in the GetMatchingDirectWriteFontForTypeface function in … (Closed)

Created:
6 years, 1 month ago by ananta
Modified:
6 years, 1 month ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Attempt to fallback to some matching font in the GetMatchingDirectWriteFontForTypeface function in case we fail to find a best match via IDWriteFontFamily::GetFirstMatchingFont. The IDWriteFontFamily::GetFirstMatchingFont call fails on some machines with E_FAIL with well known fonts like MS UI Gothic, Segoe UI, etc. It is not clear as to why a font would be accessible to GDI and not to DirectWrite. Added some debug alias variables to help track down these failures. We also attempt fallback to some font in the IDWriteFontList for the font family in question. If all fail, we CHECK as before. Next step would be to remove the CHECKS and fallback to GDI if CreateFontFromSkia fails. BUG=434425 Committed: https://crrev.com/ad29fae1fa8166c5755e9508c59297ddcc4ad198 Cr-Commit-Position: refs/heads/master@{#304981}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address scottmg review comments #

Total comments: 2

Patch Set 3 : Address sky review comments #

Patch Set 4 : Reverted debugging change #

Total comments: 6

Patch Set 5 : Add safety checks to FindFamilyName #

Patch Set 6 : Fixed alias #

Patch Set 7 : Removed unnecessary alias #

Total comments: 2

Patch Set 8 : Addressed sky review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -3 lines) Patch
M ui/gfx/platform_font_win.cc View 1 2 3 4 5 6 7 4 chunks +30 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
ananta
6 years, 1 month ago (2014-11-19 22:12:44 UTC) #2
scottmg
lgtm https://codereview.chromium.org/737103002/diff/1/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/1/ui/gfx/platform_font_win.cc#newcode141 ui/gfx/platform_font_win.cc:141: // GDI. add crbug link https://codereview.chromium.org/737103002/diff/1/ui/gfx/platform_font_win.cc#newcode149 ui/gfx/platform_font_win.cc:149: matching_font_count ...
6 years, 1 month ago (2014-11-19 22:15:36 UTC) #3
ananta
https://codereview.chromium.org/737103002/diff/1/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/1/ui/gfx/platform_font_win.cc#newcode141 ui/gfx/platform_font_win.cc:141: // GDI. On 2014/11/19 22:15:36, scottmg wrote: > add ...
6 years, 1 month ago (2014-11-19 22:21:31 UTC) #4
sky
https://codereview.chromium.org/737103002/diff/20001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/20001/ui/gfx/platform_font_win.cc#newcode163 ui/gfx/platform_font_win.cc:163: base::debug::Alias(&fallback_to_matching_font); Can you move the Alias calls to where ...
6 years, 1 month ago (2014-11-19 22:33:02 UTC) #5
ananta
https://codereview.chromium.org/737103002/diff/20001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/20001/ui/gfx/platform_font_win.cc#newcode163 ui/gfx/platform_font_win.cc:163: base::debug::Alias(&fallback_to_matching_font); On 2014/11/19 22:33:01, sky wrote: > Can you ...
6 years, 1 month ago (2014-11-19 22:35:02 UTC) #6
Shrikant Kelkar
https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode93 ui/gfx/platform_font_win.cc:93: hr = font_collection->FindFamilyName(face_name, &index, &exists); Besides FAILED(hr) can you ...
6 years, 1 month ago (2014-11-19 22:59:26 UTC) #8
Shrikant Kelkar
On 2014/11/19 22:59:26, Shrikant Kelkar wrote: > https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc > File ui/gfx/platform_font_win.cc (right): > > https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode93 ...
6 years, 1 month ago (2014-11-19 23:02:52 UTC) #9
ananta
https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode93 ui/gfx/platform_font_win.cc:93: hr = font_collection->FindFamilyName(face_name, &index, &exists); On 2014/11/19 22:59:25, Shrikant ...
6 years, 1 month ago (2014-11-19 23:19:28 UTC) #10
Shrikant Kelkar
https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode142 ui/gfx/platform_font_win.cc:142: // http://crbug.com/434425 If you want to look for specific ...
6 years, 1 month ago (2014-11-19 23:30:47 UTC) #11
ananta
https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode142 ui/gfx/platform_font_win.cc:142: // http://crbug.com/434425 On 2014/11/19 23:30:47, Shrikant Kelkar wrote: > ...
6 years, 1 month ago (2014-11-19 23:38:58 UTC) #12
Shrikant Kelkar
On 2014/11/19 23:38:58, ananta wrote: > https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc > File ui/gfx/platform_font_win.cc (right): > > https://codereview.chromium.org/737103002/diff/60001/ui/gfx/platform_font_win.cc#newcode142 > ...
6 years, 1 month ago (2014-11-19 23:49:28 UTC) #13
sky
LGTM https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc#newcode152 ui/gfx/platform_font_win.cc:152: if (FAILED(hr)) { nit: combine into a single ...
6 years, 1 month ago (2014-11-20 00:52:57 UTC) #16
ananta
https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc#newcode152 ui/gfx/platform_font_win.cc:152: if (FAILED(hr)) { On 2014/11/20 00:52:57, sky wrote: > ...
6 years, 1 month ago (2014-11-20 01:15:35 UTC) #17
ananta
https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/737103002/diff/120001/ui/gfx/platform_font_win.cc#newcode152 ui/gfx/platform_font_win.cc:152: if (FAILED(hr)) { On 2014/11/20 00:52:57, sky wrote: > ...
6 years, 1 month ago (2014-11-20 01:15:36 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/737103002/140001
6 years, 1 month ago (2014-11-20 01:17:22 UTC) #20
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years, 1 month ago (2014-11-20 05:00:29 UTC) #21
commit-bot: I haz the power
6 years, 1 month ago (2014-11-20 05:01:12 UTC) #22
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ad29fae1fa8166c5755e9508c59297ddcc4ad198
Cr-Commit-Position: refs/heads/master@{#304981}

Powered by Google App Engine
This is Rietveld 408576698