Skip to content

Commit 74eafdd

Browse files
committed
[lib] Added examples in the description of extra length properties
1 parent 1a73362 commit 74eafdd

File tree

1 file changed

+19
-9
lines changed
  • tehreer-android/src/main/java/com/mta/tehreer/layout

1 file changed

+19
-9
lines changed

tehreer-android/src/main/java/com/mta/tehreer/layout/GlyphRun.java

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,17 @@ public int getCharEnd() {
156156
}
157157

158158
/**
159-
* Returns the extra excluded length at the start of cluster map. If first cluster of this run
160-
* begins within the excluded range, then its rendering will be clipped from start. The amount
161-
* of clipping would be equal to the perceived trailing caret position of last excluded
162-
* character.
159+
* Returns the extra excluded length at the start of the cluster map. If the first cluster of
160+
* this run begins within the extra range, then its rendering will be clipped from the start.
161+
* The amount of clipping would be equal to the perceived trailing caret position of last
162+
* excluded character.
163+
* <p>
164+
* For example, consider three characters `f`, `i` and another `i` form a cluster having a
165+
* single ligature, `fii` and the run starts from the second `i` with `f` and `i` being extra
166+
* characters. In this case, the ligature would be divided into three equal parts and the first
167+
* two parts would be clipped.
163168
*
164-
* @return The extra excluded length at the start of cluster map.
169+
* @return The extra excluded length at the start of the cluster map.
165170
*
166171
* @see #getClusterMap()
167172
*/
@@ -170,12 +175,17 @@ public int getStartExtraLength() {
170175
}
171176

172177
/**
173-
* Returns the extra excluded length at the end of cluster map. If last cluster of this run
174-
* finishes within the excluded range, then its rendering will be clipped from end. The amount
175-
* of clipping would be equal to the perceived leading caret position of first excluded
178+
* Returns the extra excluded length at the end of the cluster map. If the last cluster of this
179+
* run finishes within the excluded range, then its rendering will be clipped from the end. The
180+
* amount of clipping would be equal to the perceived leading caret position of first excluded
176181
* character.
182+
* <p>
183+
* For example, consider three characters `f`, `i` and another `i` form a cluster having a
184+
* single ligature, `fii` and the run consists of just `f` with both `i` being extra characters.
185+
* In this case, the ligature would be divided into three equal parts and the last two parts
186+
* would be clipped.
177187
*
178-
* @return The extra excluded length at the end of cluster map.
188+
* @return The extra excluded length at the end of the cluster map.
179189
*
180190
* @see #getClusterMap()
181191
*/

0 commit comments

Comments
 (0)