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

Issue 331713003: RenderTextHarfBuzz: Implement font fallback for Win and Linux (Closed)

Created:
6 years, 6 months ago by ckocagil
Modified:
6 years, 5 months ago
CC:
chromium-reviews, Daniel Erat, Alexei Svitkine (slow)
Project:
chromium
Visibility:
Public.

Description

RenderTextHarfBuzz: Implement font fallback for Win and Linux BUG=321868 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284297

Patch Set 1 #

Patch Set 2 : fix tests; add placeholder impl for Mac #

Total comments: 12

Patch Set 3 : rebased #

Patch Set 4 : comments addressed #

Total comments: 4

Patch Set 5 : rebased #

Patch Set 6 : comments addressed #

Patch Set 7 : move uniscribe emf func to font_fallback_win, and use it in harfbuzz #

Total comments: 10

Patch Set 8 : comments addressed 3 #

Total comments: 10

Patch Set 9 : comments addressed 4 #

Total comments: 19

Patch Set 10 : comments addressed 5 #

Total comments: 4

Patch Set 11 : comments addressed 6 #

Total comments: 5

Patch Set 12 : comments addressed 7 #

Patch Set 13 : compile fix #

Patch Set 14 : gyp -> gn #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -93 lines) Patch
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
A ui/gfx/font_fallback.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
A ui/gfx/font_fallback_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +62 lines, -0 lines 0 comments Download
A ui/gfx/font_fallback_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +20 lines, -0 lines 0 comments Download
M ui/gfx/font_fallback_win.h View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -2 lines 0 comments Download
M ui/gfx/font_fallback_win.cc View 1 2 3 4 5 6 7 8 9 5 chunks +79 lines, -2 lines 0 comments Download
M ui/gfx/font_fallback_win_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +60 lines, -16 lines 2 comments Download
M ui/gfx/render_text_win.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -69 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
ckocagil
PTAL. Feel free to only leave high level comments instead of a full review.
6 years, 6 months ago (2014-06-21 20:11:38 UTC) #1
msw
Can we cache the fallback families for a given family in a map? Is that ...
6 years, 5 months ago (2014-06-30 17:35:54 UTC) #2
ckocagil
PTAL. Note: this doesn't implement the full fallback logic in RenderTextWin, which uses Uniscribe in ...
6 years, 5 months ago (2014-07-04 15:30:16 UTC) #3
msw
On 2014/07/04 15:30:16, ckocagil wrote: > PTAL. Note: this doesn't implement the full fallback logic ...
6 years, 5 months ago (2014-07-07 22:52:46 UTC) #4
ckocagil
Latest comments addressed. Also added a cache to font_fallback_linux to address your previous comment. https://codereview.chromium.org/331713003/diff/80001/ui/gfx/font_fallback_linux.cc ...
6 years, 5 months ago (2014-07-12 11:47:54 UTC) #5
msw
Thanks again for working on this! https://codereview.chromium.org/331713003/diff/200001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/331713003/diff/200001/ui/gfx/font_fallback_win.cc#newcode263 ui/gfx/font_fallback_win.cc:263: std::vector<std::string> GetFallbackFontFamilies(std::string font_family) ...
6 years, 5 months ago (2014-07-12 17:41:11 UTC) #6
ckocagil
https://codereview.chromium.org/331713003/diff/200001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/331713003/diff/200001/ui/gfx/font_fallback_win.cc#newcode263 ui/gfx/font_fallback_win.cc:263: std::vector<std::string> GetFallbackFontFamilies(std::string font_family) { On 2014/07/12 17:41:11, msw wrote: ...
6 years, 5 months ago (2014-07-12 19:53:26 UTC) #7
msw
Sorry, I got overly ambitious with my last round of comments. This patch is already ...
6 years, 5 months ago (2014-07-12 22:03:38 UTC) #8
Daniel Erat
lgtm for linux with some nits about string arguments that should be const references and ...
6 years, 5 months ago (2014-07-14 14:58:21 UTC) #9
ckocagil
Comments addressed. Mike, please take a quick look at the font_fallback_win.cc changes, thanks! https://codereview.chromium.org/331713003/diff/220001/ui/gfx/font_fallback.h File ...
6 years, 5 months ago (2014-07-16 23:42:22 UTC) #10
msw
LGTM with a nit. https://codereview.chromium.org/331713003/diff/220001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/331713003/diff/220001/ui/gfx/render_text_harfbuzz.cc#newcode967 ui/gfx/render_text_harfbuzz.cc:967: if (GetUniscribeFallbackFont(NULL, primary_font, On 2014/07/16 ...
6 years, 5 months ago (2014-07-17 00:08:04 UTC) #11
msw
+CC Alexei in case he wishes to take a look.
6 years, 5 months ago (2014-07-17 00:08:37 UTC) #12
ckocagil
https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc#newcode286 ui/gfx/font_fallback_win.cc:286: hdc = CreateCompatibleDC(NULL); On 2014/07/17 00:08:04, msw wrote: > ...
6 years, 5 months ago (2014-07-17 00:10:49 UTC) #13
msw
https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc#newcode286 ui/gfx/font_fallback_win.cc:286: hdc = CreateCompatibleDC(NULL); On 2014/07/17 00:10:49, ckocagil wrote: > ...
6 years, 5 months ago (2014-07-17 00:15:35 UTC) #14
Daniel Erat
https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc File ui/gfx/font_fallback_win.cc (right): https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_win.cc#newcode286 ui/gfx/font_fallback_win.cc:286: hdc = CreateCompatibleDC(NULL); On 2014/07/17 00:15:35, msw wrote: > ...
6 years, 5 months ago (2014-07-17 02:22:24 UTC) #15
Alexei Svitkine (slow)
Looks good, some comments for you below. https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_linux.cc File ui/gfx/font_fallback_linux.cc (right): https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_linux.cc#newcode19 ui/gfx/font_fallback_linux.cc:19: std::vector<std::string> GetFallbackFontFamilies(std::string ...
6 years, 5 months ago (2014-07-17 21:22:00 UTC) #16
ckocagil
https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_linux.cc File ui/gfx/font_fallback_linux.cc (right): https://codereview.chromium.org/331713003/diff/240001/ui/gfx/font_fallback_linux.cc#newcode19 ui/gfx/font_fallback_linux.cc:19: std::vector<std::string> GetFallbackFontFamilies(std::string font_family) { On 2014/07/17 21:22:00, Alexei Svitkine ...
6 years, 5 months ago (2014-07-17 23:12:01 UTC) #17
Alexei Svitkine (slow)
LGTM with one more suggestion https://codereview.chromium.org/331713003/diff/260001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): https://codereview.chromium.org/331713003/diff/260001/ui/gfx/render_text_win.cc#newcode1000 ui/gfx/render_text_win.cc:1000: GetFallbackFontFamilies(original_font.GetFontName()); Nit: Can this ...
6 years, 5 months ago (2014-07-18 13:08:48 UTC) #18
ckocagil
Comments addressed. I'll check the commit box after the try jobs pass. Thanks for the ...
6 years, 5 months ago (2014-07-18 15:50:12 UTC) #19
msw
https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc#newcode1003 ui/gfx/render_text_win.cc:1003: Font current_font(original_font.GetFontName(), original_font.GetFontSize()); nit: just do "Font current_font = ...
6 years, 5 months ago (2014-07-18 17:09:18 UTC) #20
ckocagil
https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc#newcode1003 ui/gfx/render_text_win.cc:1003: Font current_font(original_font.GetFontName(), original_font.GetFontSize()); On 2014/07/18 17:09:18, msw wrote: > ...
6 years, 5 months ago (2014-07-18 17:25:31 UTC) #21
msw
still lgtm, thanks! https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc File ui/gfx/render_text_win.cc (right): https://codereview.chromium.org/331713003/diff/280001/ui/gfx/render_text_win.cc#newcode1032 ui/gfx/render_text_win.cc:1032: if (GetUniscribeFallbackFont(run->font, run_text, run_length, On 2014/07/18 ...
6 years, 5 months ago (2014-07-18 17:37:10 UTC) #22
ckocagil
The CQ bit was checked by ckocagil@chromium.org
6 years, 5 months ago (2014-07-18 19:27:40 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckocagil@chromium.org/331713003/320001
6 years, 5 months ago (2014-07-18 19:30:09 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_gn_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 22:08:20 UTC) #25
ckocagil
The CQ bit was checked by ckocagil@chromium.org
6 years, 5 months ago (2014-07-18 23:31:28 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ckocagil@chromium.org/331713003/340001
6 years, 5 months ago (2014-07-18 23:32:08 UTC) #27
commit-bot: I haz the power
Change committed as 284297
6 years, 5 months ago (2014-07-19 03:01:42 UTC) #28
ebrahimgnu
https://codereview.chromium.org/331713003/diff/340001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/331713003/diff/340001/ui/gfx/render_text_harfbuzz.cc#newcode1036 ui/gfx/render_text_harfbuzz.cc:1036: run->positions[i].set(run->width + x_offset, y_offset); Seems this caused regression of ...
6 years, 5 months ago (2014-07-19 21:02:43 UTC) #29
msw
6 years, 5 months ago (2014-07-19 23:31:41 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/331713003/diff/340001/ui/gfx/render_text_harf...
File ui/gfx/render_text_harfbuzz.cc (right):

https://codereview.chromium.org/331713003/diff/340001/ui/gfx/render_text_harf...
ui/gfx/render_text_harfbuzz.cc:1036: run->positions[i].set(run->width +
x_offset, y_offset);
On 2014/07/19 21:02:43, ebraminio wrote:
> Seems this caused regression of
> https://code.google.com/p/chromium/issues/detail?id=391203 again :(

I'll fix this in https://codereview.chromium.org/408733002/
(I'm sure it was just a merge error)

Powered by Google App Engine
This is Rietveld 408576698