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

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

Issue 2853523002: [rendertext,i18n] Added flag to force RTL rendering (Closed)
Patch Set: Created 3 years, 7 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 size_t GetRunContainingCaret(const SelectionModel& caret); 202 size_t GetRunContainingCaret(const SelectionModel& caret);
203 203
204 // Given a |run|, returns the SelectionModel that contains the logical first 204 // Given a |run|, returns the SelectionModel that contains the logical first
205 // or last caret position inside (not at a boundary of) the run. 205 // or last caret position inside (not at a boundary of) the run.
206 // The returned value represents a cursor/caret position without a selection. 206 // The returned value represents a cursor/caret position without a selection.
207 SelectionModel FirstSelectionModelInsideRun( 207 SelectionModel FirstSelectionModelInsideRun(
208 const internal::TextRunHarfBuzz* run); 208 const internal::TextRunHarfBuzz* run);
209 SelectionModel LastSelectionModelInsideRun( 209 SelectionModel LastSelectionModelInsideRun(
210 const internal::TextRunHarfBuzz* run); 210 const internal::TextRunHarfBuzz* run);
211 211
212 void CheckForcedDirection(UBiDiLevel* level);
213
212 // Break the text into logical runs and populate the visual <-> logical maps 214 // Break the text into logical runs and populate the visual <-> logical maps
213 // into |run_list_out|. 215 // into |run_list_out|.
214 void ItemizeTextToRuns(const base::string16& string, 216 void ItemizeTextToRuns(const base::string16& string,
215 internal::TextRunList* run_list_out); 217 internal::TextRunList* run_list_out);
216 218
217 // Helper method for ShapeRun() that calls ShapeRunWithFont() with |text|, 219 // Helper method for ShapeRun() that calls ShapeRunWithFont() with |text|,
218 // |run|, |font|, and |render_params|, returning true if the font provides 220 // |run|, |font|, and |render_params|, returning true if the font provides
219 // all the glyphs needed for |run|, and false otherwise. Additionally updates 221 // all the glyphs needed for |run|, and false otherwise. Additionally updates
220 // |best_font|, |best_render_params|, and |best_missing_glyphs| if |font| 222 // |best_font|, |best_render_params|, and |best_missing_glyphs| if |font|
221 // has fewer than |best_missing_glyphs| missing glyphs. 223 // has fewer than |best_missing_glyphs| missing glyphs.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 272
271 // Fixed width of glyphs. This should only be set in test environments. 273 // Fixed width of glyphs. This should only be set in test environments.
272 float glyph_width_for_test_; 274 float glyph_width_for_test_;
273 275
274 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 276 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
275 }; 277 };
276 278
277 } // namespace gfx 279 } // namespace gfx
278 280
279 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 281 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698