Port raggedness-minimizing line breaking from gl-js.

This commit is contained in:
Chris Loer
2017-01-05 08:47:02 -08:00
parent 35ccb01dbd
commit 12a9932ebc
7 changed files with 131 additions and 72 deletions

View File

@@ -298,6 +298,8 @@ bool allowsWordBreaking(uint16_t chr) {
return (chr == 0x0a /* newline */
|| chr == 0x20 /* space */
|| chr == 0x26 /* ampersand */
|| chr == 0x28 /* open parenthesis */
|| chr == 0x29 /* close parenthesis */
|| chr == 0x2b /* plus sign */
|| chr == 0x2d /* hyphen-minus */
|| chr == 0x2f /* solidus */