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

Issue 18848002: Shows Japanese and English mixed queries correctly. (Closed)

Created:
7 years, 5 months ago by Yuki
Modified:
7 years, 5 months ago
CC:
chromium-reviews, tfarina, James Su
Visibility:
Public.

Description

Shows Japanese and English mixed queries correctly. This CL respects the common height and baseline of the fonts in the given font list, and draw text according to the baseline. The cause of vertically-misaligned queries was that 1. ASCII characters have 23 pixels in height 2. Japanese characters have 17 pixels in height pango_layout_get_pixel_size(), which is called in RenderTextLinux::GetStringSize(), returns the above size. Also see: https://docs.google.com/a/chromium.org/document/d/1e2n9lEM_usn37Pld8tMeo_qpfLRQQjkx-O1hTHi3sPo/edit?usp=sharing BUG=244323 TEST=Test manually. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211664

Patch Set 1 #

Patch Set 2 : Fixes RenderText::GetAlignmentOffset(). #

Total comments: 2

Patch Set 3 : Switched the way to fix the issue. #

Patch Set 4 : Adds a unit test. #

Total comments: 16

Patch Set 5 : Fixes based on review comments. #

Total comments: 10

Patch Set 6 : Fixed code style and comments. #

Patch Set 7 : Synced. #

Patch Set 8 : Disables the test on Android. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -12 lines) Patch
M build/android/pylib/gtest/filter/ui_unittests_disabled View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M ui/gfx/font_list.h View 1 2 3 4 5 4 chunks +15 lines, -0 lines 0 comments Download
M ui/gfx/font_list.cc View 1 2 3 4 5 3 chunks +35 lines, -4 lines 0 comments Download
M ui/gfx/font_list_unittest.cc View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Yuki
Could you review this CL? Cheers, Yuki Shiino
7 years, 5 months ago (2013-07-08 13:36:10 UTC) #1
Peter Kasting
You can't change to VCENTER. I introduced the entire concept of vertical alignment precisely to ...
7 years, 5 months ago (2013-07-08 19:20:33 UTC) #2
Yuki
On 2013/07/08 19:20:33, Peter Kasting wrote: > You can't change to VCENTER. I introduced the ...
7 years, 5 months ago (2013-07-09 09:30:09 UTC) #3
Peter Kasting
https://codereview.chromium.org/18848002/diff/4001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/18848002/diff/4001/ui/gfx/render_text.cc#newcode861 ui/gfx/render_text.cc:861: offset.set_y(display_rect().height() - string_size.height()); I think we should be subtracting ...
7 years, 5 months ago (2013-07-09 17:28:36 UTC) #4
Yuki
On 2013/07/09 17:28:36, Peter Kasting wrote: > https://codereview.chromium.org/18848002/diff/4001/ui/gfx/render_text.cc > File ui/gfx/render_text.cc (right): > > https://codereview.chromium.org/18848002/diff/4001/ui/gfx/render_text.cc#newcode861 ...
7 years, 5 months ago (2013-07-10 08:37:47 UTC) #5
Peter Kasting
After reading your doc I realize that your change doesn't actually fix the problem of ...
7 years, 5 months ago (2013-07-10 18:29:01 UTC) #6
msw
On 2013/07/10 18:29:01, Peter Kasting wrote: > After reading your doc I realize that your ...
7 years, 5 months ago (2013-07-11 01:16:00 UTC) #7
Yuki
Thanks for all the comments and suggestions. I've completely changed a way as you guys ...
7 years, 5 months ago (2013-07-11 13:25:40 UTC) #8
msw
Does this actually fix the issue? I would have thought that RenderTextLinux::DrawVisualText would actually need ...
7 years, 5 months ago (2013-07-11 22:47:28 UTC) #9
Yuki
Thanks for the review. We don't need per-run tweaks. If the text is mixture of ...
7 years, 5 months ago (2013-07-12 08:25:52 UTC) #10
msw
LGTM with nits and Qs; thanks! https://codereview.chromium.org/18848002/diff/14001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/18848002/diff/14001/ui/gfx/font_list.cc#newcode159 ui/gfx/font_list.cc:159: return ascent + ...
7 years, 5 months ago (2013-07-12 09:36:04 UTC) #11
Yuki
Thanks for the review. If you really want a TODO comment, I'm happy to add ...
7 years, 5 months ago (2013-07-12 10:29:23 UTC) #12
msw
https://codereview.chromium.org/18848002/diff/14001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/18848002/diff/14001/ui/gfx/font_list.cc#newcode159 ui/gfx/font_list.cc:159: return ascent + descent; On 2013/07/12 10:29:24, Yuki wrote: ...
7 years, 5 months ago (2013-07-12 10:41:57 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/18848002/31001
7 years, 5 months ago (2013-07-12 14:07:21 UTC) #14
Peter Kasting
So does this also fix the bug on Windows, or is that still broken?
7 years, 5 months ago (2013-07-12 20:15:27 UTC) #15
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test on builder ...
7 years, 5 months ago (2013-07-12 21:47:56 UTC) #16
Yuki
On 2013/07/12 20:15:27, Peter Kasting wrote: > So does this also fix the bug on ...
7 years, 5 months ago (2013-07-15 12:55:48 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/18848002/58001
7 years, 5 months ago (2013-07-15 13:52:17 UTC) #18
commit-bot: I haz the power
7 years, 5 months ago (2013-07-15 18:30:19 UTC) #19
Message was sent while issue was closed.
Change committed as 211664

Powered by Google App Engine
This is Rietveld 408576698