OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_GFX_LAYOUT_TEXT_H_ | |
6 #define UI_GFX_LAYOUT_TEXT_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/strings/string16.h" | |
10 #include "ui/base/ui_export.h" | |
11 | |
12 namespace gfx { | |
13 | |
14 class FontList; | |
15 | |
16 // LayoutText represents an interface of layout engines and provides APIs to get | |
17 // text layout information. | |
18 class UI_EXPORT LayoutText { | |
Alexei Svitkine (slow)
2013/08/20 15:17:21
I don't think this needs its own class. Just make
Yuki
2013/08/20 16:45:42
If everyone is okay to define gfx::GetStringWidth(
Yuki
2013/08/21 03:42:44
Done.
| |
19 public: | |
20 // Returns the number of horizontal pixels needed to display the specified | |
21 // |text| with |font_list|. | |
22 static int GetStringWidth(const base::string16& text, | |
23 const FontList& font_list); | |
24 | |
25 private: | |
26 DISALLOW_COPY_AND_ASSIGN(LayoutText); | |
27 }; | |
28 | |
29 } // namespace gfx | |
30 | |
31 #endif // UI_GFX_LAYOUT_TEXT_H_ | |
OLD | NEW |