Chromium Code Reviews| Index: ui/gfx/text_utils.h |
| diff --git a/ui/gfx/text_utils.h b/ui/gfx/text_utils.h |
| index 088f97cea9e6077ce461f40c3cfcad97a51d3ed1..46fef9a8e8fced61029104bcf76fa50979afdcb5 100644 |
| --- a/ui/gfx/text_utils.h |
| +++ b/ui/gfx/text_utils.h |
| @@ -31,6 +31,16 @@ GFX_EXPORT int GetStringWidth(const base::string16& text, |
| GFX_EXPORT float GetStringWidthF(const base::string16& text, |
| const FontList& font_list); |
| +// Returns a valid cut boundary at or before |index|. The surrogate pair and |
| +// combined characters should not be separated. |
| +GFX_EXPORT size_t |
| +FindValidBoundaryBefore(const base::string16& text, size_t index); |
|
msw
2015/06/03 00:32:04
nit: Is this the correct line breaking according t
xdai1
2015/06/06 00:05:19
Yes, this is the correct line breaking. It's gener
|
| + |
| +// Returns a valid cut boundary at or after |index|. The surrogate pair and |
| +// combined characters should not be separated. |
| +GFX_EXPORT size_t |
| +FindValidBoundaryAfter(const base::string16& text, size_t index); |
| + |
| } // namespace gfx |
| #endif // UI_GFX_TEXT_UTILS_H_ |