tangrams / tangram-es

2D and 3D map renderer using OpenGL ES
MIT License
823 stars 239 forks source link

When the text is Chinese, the text_wrap parameter does not work. Because the words in Chinese are not separated by spaces. #1074

Closed ligai322 closed 7 years ago

ligai322 commented 7 years ago

for example: I come from Beijing. But This sentence write in Chinese, like '我来自北京'.

nvkelso commented 7 years ago

We'll need to add special implementation logic for this, there are a few standards to reference.

ligai322 commented 7 years ago

@nvkelso We can refer to the implementation of CSS, like word-wrap,word-break and text-wrap.

nvkelso commented 7 years ago

See also:

westnordost commented 7 years ago

From Asian languages, this also at least applies to Thai, Lao and Burmese.

hjanetzek commented 7 years ago

It's possible that liblinebreak that we use requires the correct language to be specified. It worked before when we applied liblinebreak to individual script/language runs. This was changed a while ago to detect linebreaks without language set on the full string to first split on explicit line breaks.

karimnaaji commented 7 years ago

Fixed by https://github.com/tangrams/tangram-es/issues/1075.