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

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

Issue 10010047: Always try metafile font fallback in the case of missing glyphs in RenderTextWin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | ui/gfx/render_text_win.cc » ('j') | ui/gfx/render_text_win.cc » ('J')
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 #pragma once 7 #pragma once
8 8
9 #include <usp10.h> 9 #include <usp10.h>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 virtual std::vector<Rect> GetSubstringBounds(ui::Range range) OVERRIDE; 88 virtual std::vector<Rect> GetSubstringBounds(ui::Range range) OVERRIDE;
89 virtual bool IsCursorablePosition(size_t position) OVERRIDE; 89 virtual bool IsCursorablePosition(size_t position) OVERRIDE;
90 virtual void ResetLayout() OVERRIDE; 90 virtual void ResetLayout() OVERRIDE;
91 virtual void EnsureLayout() OVERRIDE; 91 virtual void EnsureLayout() OVERRIDE;
92 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; 92 virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
93 93
94 private: 94 private:
95 void ItemizeLogicalText(); 95 void ItemizeLogicalText();
96 void LayoutVisualText(); 96 void LayoutVisualText();
97 97
98 // Helper function to update the font on a text run after font substitution.
99 void UpdateRunFont(internal::TextRun* run, int font_size);
msw 2012/04/12 21:32:14 nit: Consider renaming this ApplyFontSubstitute or
Alexei Svitkine (slow) 2012/04/13 13:56:15 Done.
100
98 // Returns a vector of linked fonts corresponding to |font|. 101 // Returns a vector of linked fonts corresponding to |font|.
99 const std::vector<Font>* GetLinkedFonts(const Font& font) const; 102 const std::vector<Font>* GetLinkedFonts(const Font& font) const;
100 103
101 // Return the run index that contains the argument; or the length of the 104 // Return the run index that contains the argument; or the length of the
102 // |runs_| vector if argument exceeds the text length or width. 105 // |runs_| vector if argument exceeds the text length or width.
103 size_t GetRunContainingCaret(const SelectionModel& caret) const; 106 size_t GetRunContainingCaret(const SelectionModel& caret) const;
104 size_t GetRunContainingPoint(const Point& point) const; 107 size_t GetRunContainingPoint(const Point& point) const;
105 108
106 // Given a |run|, returns the SelectionModel that contains the logical first 109 // Given a |run|, returns the SelectionModel that contains the logical first
107 // or last caret position inside (not at a boundary of) the run. 110 // or last caret position inside (not at a boundary of) the run.
(...skipping 21 matching lines...) Expand all
129 scoped_array<int> logical_to_visual_; 132 scoped_array<int> logical_to_visual_;
130 133
131 bool needs_layout_; 134 bool needs_layout_;
132 135
133 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); 136 DISALLOW_COPY_AND_ASSIGN(RenderTextWin);
134 }; 137 };
135 138
136 } // namespace gfx 139 } // namespace gfx
137 140
138 #endif // UI_GFX_RENDER_TEXT_WIN_H_ 141 #endif // UI_GFX_RENDER_TEXT_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text_win.cc » ('j') | ui/gfx/render_text_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698