Commit Graph

12 Commits

Author SHA1 Message Date
Chris Loer
fc11d2e872 [core, test] Add BiDi unit test
- Port of arabic.test.js from mapbox-gl-rtl-text
- Modify BiDi::getLine to remove trailing nulls in the event UBIDI_REMOVE_BIDI_CONTROLS causes the string to shorten.
- Patch vendored ICU to avoid undefined undefined bit shifting behavior (triggered sanitizer failure)
2018-10-15 13:15:46 -07:00
Chris Loer
bc71825774 [core] Bidi support for styled text.
Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it.
2018-10-15 13:15:46 -07:00
Bruno de Oliveira Abinader
bd7fb64bae [tidy] modernize-use-nullptr 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
d9d55f93c1 [core] Fix compilation error with older libicu versions 2017-05-02 12:54:37 +03:00
Bruno de Oliveira Abinader
c461dad5ee [core] Safeguard ICU UChar usage 2017-03-02 11:40:42 -08:00
John Firebaugh
c70bf6b2bf [core] Reserve vector size 2017-02-27 09:36:20 -08:00
John Firebaugh
73c5d5c00a [core] Avoid some string copies in bidi implementation
As of C++11, it's safe to preallocate std::[u16]string and write to the buffer via &s[0] (C++17 makes it possible via .data() as well).
2017-02-27 09:36:20 -08:00
Konstantin Käfer
62ea1f2185 [core] remove trailing whitespace, add trailing newlines, add space after // 2017-01-27 11:44:16 +01:00
Chris Loer
12a9932ebc Port raggedness-minimizing line breaking from gl-js. 2017-01-05 10:22:53 -08:00
Chris Loer
f68449aeb8 Cleaning up line breaking code.
* Don't include trailing spacing (as opposed to whitespace) in lineLength
* Modify BiDi interface to require initial bidi layout and linebreaking to happen in one call.
* Code style changes suggested by @kkaefer
2017-01-05 10:22:53 -08:00
Bruno de Oliveira Abinader
c0e18ad80c [core] Added BidiImpl to avoid ICU types exposure 2016-12-12 22:34:52 +02:00
Bruno de Oliveira Abinader
ce5ed9e649 [build] ICU is now configured per platform 2016-12-12 22:34:52 +02:00