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

Unified Diff: ui/gfx/text_utils.h

Issue 1070223004: Stop combining text runs which are connected by 'COMMON' blocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address msw@'s comments. Created 5 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698