summaryrefslogtreecommitdiff
path: root/pango/break-thai.c
Commit message (Collapse)AuthorAgeFilesLines
* break-thai: Fix up word break handlingMatthias Clasen2021-08-231-8/+20
| | | | | | | | | | | We want to insert word start+end if libthai hands us line breaks between letters. But must be careful not to overwrite existing word boundaries, or we end up with a nonsense sequence. This was found by checking log attr invariants. Regenerate affected test outputs.
* Use GMutex for the thai_brkPeng Wu2021-07-211-5/+9
| | | | Use GMutex to protect the thai_brk in multithreading.
* Revert "Update break-thai.c to Unicode 11"Matthias Clasen2019-08-211-4/+4
| | | | | | This reverts commit bca876de9b8cad4c912a2734561f2fe23b2d872a. See https://gitlab.gnome.org/GNOME/pango/issues/413
* Update break-thai.c to Unicode 11Peng Wu2018-11-291-4/+4
| | | | | According to the comments from break-thai.c, use alternative approach for break-thai.c .
* Use the shared brk in break-thai.cPeng Wu2018-11-141-10/+2
| | | | Use the shared brk to improve the performance of the break_thai function.
* pango: th_brk_new() may return NULL.Jehan2018-11-131-1/+5
| | | | | | | | | | | | | | The call to th_brk_new() may return NULL, in case of allocation failure of course, but also if the default dictionnary fails to load, which may be an unlikely event, yet far from impossible (packaging may have forgotten the file hence it may be absent, have been corrupted, or whatever else). In any case, although unlikely, it is not impossible, and should not crash the whole program so we should check the return value and output a warning if NULL. Note that the call to th_brk_find_breaks() can still run even if brk is NULL so we only check before freeing the data.
* Use non-deprecated libthai API when availableKhaled Hosny2018-04-111-5/+11
| | | | I’m assuming the new API is thread-safe as claimed.
* [break-thai] Fix two bugs in libthai glue layerBehdad Esfahbod2017-05-231-1/+6
| | | | | | | | | | | | | | | | | | | First bug is, we were passing as count to th_brk, the UTF-8 length instead of TIS length. Ouch! I'm not sure how this was never caught... The other one was, break-thai was possibly marking a position is_line_break when break.c has already set it to is_char_break=FALSE. This broke the invariant that if a position is line-break, then it must be char-break as well. This, in turn was hitting assertions in certain conditions. Hit it with this for example: $ ./pango-view --text 'ส์" (S' --width 43 --font 156px Note that in a correct world the Latin part of that string should not reach break-thai.c at all, but that's not how pango-layout.c breaks right now. See comment before pango_break() call in pango-layout.c.
* Add note re threadsafe libthaiBehdad Esfahbod2015-10-221-0/+5
|
* Remove remaining uses of g_utf8_strlen()Behdad Esfahbod2015-08-211-3/+4
|
* Serialize call to th_brk()Behdad Esfahbod2015-08-181-0/+5
| | | | | | | Libthai is not threadsafe (thought it probably can easily be made to be). As such, add mutex around th_brk() calls. test-pangocairo-threads passes again.
* [modules] Move language modules in source tree and remove modules/Behdad Esfahbod2015-04-041-0/+90
This should complete the kill-modules effort. What is left is leftover removal and unbreaking stuff. Bug 733882 - Kill Pango modules, engines, and config files