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

Issue 2054273002: Font fallback for UI (Closed)

Created:
4 years, 6 months ago by Ilya Kulshin
Modified:
4 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, derat+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updates UI font fallback to use DirectWrite when available so that we can fallback to the color emoji font. Summary of changes: TextAnalysisSource was moved from content/common to gfx/ui/win, namespace was changed accordingly, and users updated. The public GetUniscribeFallbackFont API was renamed to GetFallbackFont. This API will now check if it can use DirectWrite font fallback; otherwise it will call the old codepath. Using DirectWrite for fallback allows the UI code to correctly fallback on the color emoji font when available. BUG=617376 Committed: https://crrev.com/ce612ebdb8874b563d020338969f20f227b8dd9f Cr-Commit-Position: refs/heads/master@{#402879}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Remove hardcoded locale #

Patch Set 4 : Add check for browser thread #

Patch Set 5 : Revert unrelated comment #

Patch Set 6 : Actually delete old TextAnalysisSource #

Total comments: 36

Patch Set 7 : Fix unittests #

Total comments: 6

Patch Set 8 : Review feedback #

Patch Set 9 : Add new unittest to gyp build #

Patch Set 10 : Remove "DWRITE" from include header guard #

Patch Set 11 : Fix clang build error due to signed-unsigned comparison #

Total comments: 21

Patch Set 12 : Tweak unittests #

Patch Set 13 : Add cache of direct write factory #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -265 lines) Patch
M components/url_formatter/elide_url_unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/dwrite_font_proxy_message_filter_win.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/dwrite_font_proxy/font_fallback_win_unittest.cc View 1 2 3 4 5 6 7 6 chunks +15 lines, -15 lines 0 comments Download
D content/common/dwrite_text_analysis_source_win.h View 1 2 3 4 5 1 chunk +0 lines, -64 lines 0 comments Download
D content/common/dwrite_text_analysis_source_win.cc View 1 2 3 4 5 1 chunk +0 lines, -82 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M ui/gfx/font_fallback_win.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M ui/gfx/font_fallback_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +115 lines, -39 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/gfx_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/platform_font_win.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M ui/gfx/platform_font_win.cc View 1 2 3 4 5 6 7 3 chunks +27 lines, -31 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 5 6 7 4 chunks +15 lines, -15 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M ui/gfx/text_elider_unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
A + ui/gfx/win/text_analysis_source.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -7 lines 0 comments Download
A + ui/gfx/win/text_analysis_source.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -3 lines 0 comments Download
A ui/gfx/win/text_analysis_source_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +133 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (10 generated)
Ilya Kulshin
ptal msw@ - ui/gfx/* ananta@ - content/*
4 years, 6 months ago (2016-06-23 19:43:30 UTC) #5
Ilya Kulshin
4 years, 6 months ago (2016-06-23 19:43:54 UTC) #7
msw
I don't know direct write code well, but I hope my review helps. https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc File ...
4 years, 6 months ago (2016-06-23 20:59:38 UTC) #8
Ilya Kulshin
ptal https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc#newcode23 ui/gfx/font_fallback_win.cc:23: #include "ui/gfx/platform_font_win.h" On 2016/06/23 20:59:37, msw wrote: > ...
4 years, 6 months ago (2016-06-24 20:48:25 UTC) #9
msw
https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc#newcode23 ui/gfx/font_fallback_win.cc:23: #include "ui/gfx/platform_font_win.h" On 2016/06/24 20:48:24, Ilya Kulshin wrote: > ...
4 years, 5 months ago (2016-06-27 20:45:37 UTC) #10
Ilya Kulshin
ptal. https://codereview.chromium.org/2054273002/diff/200001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/2054273002/diff/200001/ui/gfx/font_fallback_win.cc#newcode378 ui/gfx/font_fallback_win.cc:378: base::i18n::IsRTL() ? DWRITE_READING_DIRECTION_RIGHT_TO_LEFT On 2016/06/27 20:45:36, msw wrote: ...
4 years, 5 months ago (2016-06-28 18:08:01 UTC) #11
msw
https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc#newcode351 ui/gfx/font_fallback_win.cc:351: gfx::win::CreateDWriteFactory(factory.Receive()); On 2016/06/27 20:45:36, msw wrote: > On 2016/06/24 ...
4 years, 5 months ago (2016-06-28 18:37:23 UTC) #12
Ilya Kulshin
https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/2054273002/diff/100001/ui/gfx/font_fallback_win.cc#newcode351 ui/gfx/font_fallback_win.cc:351: gfx::win::CreateDWriteFactory(factory.Receive()); On 2016/06/28 18:37:23, msw wrote: > On 2016/06/27 ...
4 years, 5 months ago (2016-06-28 20:32:52 UTC) #13
msw
lgtm
4 years, 5 months ago (2016-06-28 20:41:47 UTC) #14
Ilya Kulshin
+jam@ - could I get an owners approval for components/url_formatter/elide_url_unittest.cc and content/*?
4 years, 5 months ago (2016-06-29 16:12:31 UTC) #16
jam
lgtm
4 years, 5 months ago (2016-06-29 18:14:55 UTC) #17
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/2054273002/260001
4 years, 5 months ago (2016-06-29 18:22:01 UTC) #20
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 5 months ago (2016-06-29 18:47:08 UTC) #22
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 18:47:30 UTC) #23
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 18:49:19 UTC) #25
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/ce612ebdb8874b563d020338969f20f227b8dd9f
Cr-Commit-Position: refs/heads/master@{#402879}

Powered by Google App Engine
This is Rietveld 408576698