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

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

Issue 674233003: RenderTextHarfBuzz: Try fallback fonts of the Uniscribe font while shaping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HARFBUZZ_H_ 5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_
6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "third_party/harfbuzz-ng/src/hb.h" 10 #include "third_party/harfbuzz-ng/src/hb.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void EnsureLayout() override; 104 void EnsureLayout() override;
105 void DrawVisualText(Canvas* canvas) override; 105 void DrawVisualText(Canvas* canvas) override;
106 106
107 private: 107 private:
108 friend class RenderTextTest; 108 friend class RenderTextTest;
109 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection); 109 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection);
110 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks); 110 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks);
111 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_SubglyphGraphemeCases); 111 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_SubglyphGraphemeCases);
112 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_SubglyphGraphemePartition); 112 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_SubglyphGraphemePartition);
113 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_NonExistentFont); 113 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_NonExistentFont);
114 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_UniscribeFallback);
114 115
115 // Return the run index that contains the argument; or the length of the 116 // Return the run index that contains the argument; or the length of the
116 // |runs_| vector if argument exceeds the text length or width. 117 // |runs_| vector if argument exceeds the text length or width.
117 size_t GetRunContainingCaret(const SelectionModel& caret) const; 118 size_t GetRunContainingCaret(const SelectionModel& caret) const;
118 size_t GetRunContainingXCoord(int x, int* offset) const; 119 size_t GetRunContainingXCoord(int x, int* offset) const;
119 120
120 // Given a |run|, returns the SelectionModel that contains the logical first 121 // Given a |run|, returns the SelectionModel that contains the logical first
121 // or last caret position inside (not at a boundary of) the run. 122 // or last caret position inside (not at a boundary of) the run.
122 // The returned value represents a cursor/caret position without a selection. 123 // The returned value represents a cursor/caret position without a selection.
123 SelectionModel FirstSelectionModelInsideRun( 124 SelectionModel FirstSelectionModelInsideRun(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // ICU grapheme iterator for the layout text. Valid when |!needs_layout_|. Can 159 // ICU grapheme iterator for the layout text. Valid when |!needs_layout_|. Can
159 // be NULL in case of an error. 160 // be NULL in case of an error.
160 scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_; 161 scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_;
161 162
162 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 163 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
163 }; 164 };
164 165
165 } // namespace gfx 166 } // namespace gfx
166 167
167 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 168 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698