OLD | NEW |
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" |
11 #include "third_party/icu/source/common/unicode/ubidi.h" | 11 #include "third_party/icu/source/common/unicode/ubidi.h" |
12 #include "third_party/icu/source/common/unicode/uscript.h" | 12 #include "third_party/icu/source/common/unicode/uscript.h" |
13 #include "ui/gfx/render_text.h" | 13 #include "ui/gfx/render_text.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 | 16 |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 struct TextRunHarfBuzz { | 19 struct GFX_EXPORT TextRunHarfBuzz { |
20 TextRunHarfBuzz(); | 20 TextRunHarfBuzz(); |
21 ~TextRunHarfBuzz(); | 21 ~TextRunHarfBuzz(); |
22 | 22 |
23 // Returns the index of the first glyph that corresponds to the character at | 23 // Returns the index of the first glyph that corresponds to the character at |
24 // |pos|. | 24 // |pos|. |
25 size_t CharToGlyph(size_t pos) const; | 25 size_t CharToGlyph(size_t pos) const; |
26 | 26 |
27 // Returns the corresponding glyph range of the given character range. | 27 // Returns the corresponding glyph range of the given character range. |
28 // |range| is in text-space (0 corresponds to |GetLayoutText()[0]|). Returned | 28 // |range| is in text-space (0 corresponds to |GetLayoutText()[0]|). Returned |
29 // value is in run-space (0 corresponds to the first glyph in the run). | 29 // value is in run-space (0 corresponds to the first glyph in the run). |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::vector<int32_t> logical_to_visual_; | 117 std::vector<int32_t> logical_to_visual_; |
118 | 118 |
119 bool needs_layout_; | 119 bool needs_layout_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); | 121 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace gfx | 124 } // namespace gfx |
125 | 125 |
126 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 126 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
OLD | NEW |