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

Unified Diff: ui/views/examples/multiline_example.cc

Issue 152473008: More or less implement RenderTextHarfBuzz (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased; decorations Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/gfx/render_text_harfbuzz.cc ('K') | « ui/gfx/render_text_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/multiline_example.cc
diff --git a/ui/views/examples/multiline_example.cc b/ui/views/examples/multiline_example.cc
index 86685a423ec73baf0426e57b5f9cccbfdd23684a..803ed775f575329ba3492a4175303067fb30d96e 100644
--- a/ui/views/examples/multiline_example.cc
+++ b/ui/views/examples/multiline_example.cc
@@ -72,6 +72,8 @@ class MultilineExample::RenderTextView : public View {
render_text_->ApplyStyle(gfx::DIAGONAL_STRIKE, true, test_range);
render_text_->SetStyle(gfx::UNDERLINE, false);
render_text_->ApplyStyle(gfx::UNDERLINE, true, test_range);
+ render_text_->ApplyStyle(gfx::BOLD, true, gfx::Range(3, 8));
msw 2014/04/29 06:24:45 Handle strings shorter than these hardcoded ranges
ckocagil 2014/05/01 22:02:01 Done.
+ render_text_->ApplyStyle(gfx::ITALIC, true, gfx::Range(5, 10));
InvalidateLayout();
}
@@ -99,14 +101,15 @@ MultilineExample::~MultilineExample() {
}
void MultilineExample::CreateExampleView(View* container) {
- const char kTestString[] = "test string asdf 1234 test string asdf 1234 "
- "test string asdf 1234 test string asdf 1234";
+ const wchar_t kTestString[] = L"qwerty"
msw 2014/04/29 06:24:45 Use base::char16
ckocagil 2014/05/01 22:02:01 I don't think we can do that (wchar_t isn't always
+ L"\x627\x644\x631\x626\x64A\x633\x64A\x629"
msw 2014/04/29 06:24:45 nit: Is there any reason for changing the content
ckocagil 2014/05/01 22:02:01 For testing RTL runs.
+ L"asdfgh";
render_text_view_ = new RenderTextView();
- render_text_view_->SetText(ASCIIToUTF16(kTestString));
+ render_text_view_->SetText(kTestString);
label_ = new Label();
- label_->SetText(ASCIIToUTF16(kTestString));
+ label_->SetText(kTestString);
label_->SetMultiLine(true);
label_->SetBorder(Border::CreateSolidBorder(2, SK_ColorCYAN));
@@ -117,7 +120,7 @@ void MultilineExample::CreateExampleView(View* container) {
textfield_ = new Textfield();
textfield_->set_controller(this);
- textfield_->SetText(ASCIIToUTF16(kTestString));
+ textfield_->SetText(kTestString);
GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
« ui/gfx/render_text_harfbuzz.cc ('K') | « ui/gfx/render_text_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698