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

Side by Side Diff: ui/gfx/render_text_win.h

Issue 11535014: Replace StyleRange with BreakList; update RenderText, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ 5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_
6 #define UI_GFX_RENDER_TEXT_WIN_H_ 6 #define UI_GFX_RENDER_TEXT_WIN_H_
7 7
8 #include <usp10.h> 8 #include <usp10.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "ui/gfx/render_text.h" 16 #include "ui/gfx/render_text.h"
17 17
18 namespace gfx { 18 namespace gfx {
19 19
20 namespace internal { 20 namespace internal {
21 21
22 struct TextRun { 22 struct TextRun {
23 TextRun(); 23 TextRun();
24 ~TextRun(); 24 ~TextRun();
25 25
26 ui::Range range; 26 ui::Range range;
27 Font font; 27 Font font;
28 // TODO(msw): Disambiguate color, strike, etc. from TextRuns.
29 // Otherwise, this breaks the glyph shaping process.
30 // See the example at: http://www.catch22.net/tuts/neatpad/12.
31 SkColor foreground;
32 // A gfx::Font::FontStyle flag to specify bold and italic styles. 28 // A gfx::Font::FontStyle flag to specify bold and italic styles.
33 // Supersedes |font.GetFontStyle()|. Stored separately to avoid calling 29 // Supersedes |font.GetFontStyle()|. Stored separately to avoid calling
34 // |font.DeriveFont()|, which is expensive on Windows. 30 // |font.DeriveFont()|, which is expensive on Windows.
35 int font_style; 31 int font_style;
32
33 // TODO(msw): Disambiguate color/style from TextRuns for proper glyph shaping.
34 // See an example: http://www.catch22.net/tuts/uniscribe-mysteries
35 SkColor foreground;
36 bool strike; 36 bool strike;
37 bool diagonal_strike; 37 bool diagonal_strike;
38 bool underline; 38 bool underline;
39 39
40 int width; 40 int width;
41 // The cumulative widths of preceding runs. 41 // The cumulative widths of preceding runs.
42 int preceding_run_widths; 42 int preceding_run_widths;
43 43
44 SCRIPT_ANALYSIS script_analysis; 44 SCRIPT_ANALYSIS script_analysis;
45 45
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 scoped_ptr<int[]> logical_to_visual_; 135 scoped_ptr<int[]> logical_to_visual_;
136 136
137 bool needs_layout_; 137 bool needs_layout_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); 139 DISALLOW_COPY_AND_ASSIGN(RenderTextWin);
140 }; 140 };
141 141
142 } // namespace gfx 142 } // namespace gfx
143 143
144 #endif // UI_GFX_RENDER_TEXT_WIN_H_ 144 #endif // UI_GFX_RENDER_TEXT_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698