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

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: Fix broken unittest. Created 5 years, 6 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..193baf075e3bc112003e8de529593cc88aa90e50 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
+// combining characters should not be separated.
+GFX_EXPORT size_t
+FindValidBoundaryBefore(const base::string16& text, size_t index);
+
+// Returns a valid cut boundary at or after |index|. The surrogate pair and
+// combining 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