Tehreer / Tehreer-Android

Standalone text engine for Android aimed to be free from platform limitations
Apache License 2.0
89 stars 16 forks source link

Support for cluster splitting in multiple spans #10

Closed mta452 closed 6 years ago

mta452 commented 6 years ago

This issue is a continuation of discussion in #1

Consider three characters form a ligature, but its individual characters have different color spans. The typesetter does not break runs based on color spans, but whole ligature is rendered in a single color, which is a deviation from intended behavior. The same thing happens if multiple characters form a cluster, such as marks followed by a base.

As characters are not recognizable in a ligature/cluster, they can be estimated by dividing the total advance of the cluster with the number of characters in it. Then, the whole cluster should be rendered in defined edges with clipping mode.

The end result should be similar to the following image, where the estimated portion of س and ت is rendered in red color.

mta452 commented 6 years ago

Resolved in v2.2

mta452 commented 6 years ago

@AbdullahRusi you may check the feature in v2.2.