Add check useDictionaryLBR before replace word boundary marker #1899
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Flag useDictionaryLBR check before replace word boundary marker with U+200B
Hello
I want to fix for some Thai font like TH Sarabun New (Standard Fonts for Thai Public Sectors) because it does not support with ZWSP (U+200B).
The reason that I have to use OTL because some characters require processing before display.
without useOTL and "useDictionaryLBR" => false
with "useOTL" => 0xFF and "useDictionaryLBR" => false
When I add flag "useDictionaryLBR" => false and edit Otl.php:351 for check before process $this->seaLineBreaking(); can fix this issue. See output like this picture below
Added a pull request as I think this edit might be helpful for other Thai people. and this a pull request can fix for issue #1272
Info
This line is have flag useDictionaryLBR before insert U+200B
In Otl.php: 982
But this line isn't have flag useDictionaryLBR before insert U+200B
In Otl.php: 351
I want to add flag useDictionaryLBR check before insert U+200B. This can fix some thai font like Sarabun it does not support ZWSP (U+200B)
Version Info
Font:
THSarabunNew.zip
This is a PHP code