summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_win.h
diff options
context:
space:
mode:
authoralekseys@chromium.org <alekseys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-15 00:48:06 +0000
committeralekseys@chromium.org <alekseys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-15 00:48:06 +0000
commit7b2db2e2cf46fcd0d01d9449b0245859d20144b1 (patch)
tree6a695eda14de3d95c7b6924110173d085b043a8c /ui/gfx/render_text_win.h
parent18a8f2d02a3d4ab14301b56bcbc2ed2beade4bab (diff)
downloadchromium_src-7b2db2e2cf46fcd0d01d9449b0245859d20144b1.zip
chromium_src-7b2db2e2cf46fcd0d01d9449b0245859d20144b1.tar.gz
chromium_src-7b2db2e2cf46fcd0d01d9449b0245859d20144b1.tar.bz2
Revert 109977 - Implement font fallback in RenderTextWin.
This is done by using a metafile to capture the font that Uniscribe would use to render the text (since there is no API to get this from Uniscribe itself). Makes SCRIPT_CACHE be per-run, since different runs may have different fonts and the SCRIPT_CACHE cannot be re-used between these. This is similar to what is done in WebKit in FontCacheWin.cpp BUG=90426 TEST=Run chrome.exe --use-pure-views and paste some Hebrew text into the omnibox. It should show up properly. Review URL: http://codereview.chromium.org/8565011 TBR=asvitkine@chromium.org Review URL: http://codereview.chromium.org/8568002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_win.h')
-rw-r--r--ui/gfx/render_text_win.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/gfx/render_text_win.h b/ui/gfx/render_text_win.h
index fda3150..627368a 100644
--- a/ui/gfx/render_text_win.h
+++ b/ui/gfx/render_text_win.h
@@ -43,7 +43,6 @@ struct TextRun {
scoped_array<int> advance_widths;
scoped_array<GOFFSET> offsets;
ABC abc_widths;
- SCRIPT_CACHE script_cache;
private:
DISALLOW_COPY_AND_ASSIGN(TextRun);
@@ -90,8 +89,8 @@ class RenderTextWin : public RenderText {
// Given a |run|, returns the SelectionModel that contains the logical first
// or last caret position inside (not at a boundary of) the run.
// The returned value represents a cursor/caret position without a selection.
- SelectionModel FirstSelectionModelInsideRun(internal::TextRun* run);
- SelectionModel LastSelectionModelInsideRun(internal::TextRun* run);
+ SelectionModel FirstSelectionModelInsideRun(internal::TextRun*);
+ SelectionModel LastSelectionModelInsideRun(internal::TextRun*);
// Get the selection model visually left/right of |selection| by one grapheme.
// The returned value represents a cursor/caret position without a selection.
@@ -112,6 +111,8 @@ class RenderTextWin : public RenderText {
SCRIPT_CONTROL script_control_;
SCRIPT_STATE script_state_;
+ SCRIPT_CACHE script_cache_;
+
std::vector<internal::TextRun*> runs_;
int string_width_;