Skip to content

Commit

Permalink
include last char
Browse files Browse the repository at this point in the history
  • Loading branch information
azimgd committed May 24, 2023
1 parent 780dcc2 commit 4d53dce
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ public static WritableMap getFontMetrics(
break;
}

int offset = layout.getLineEnd(i) >= textLayoutRegion.getInt(1) ? 0 : 1;

Rect regionBounds = new Rect(
(int)layout.getPrimaryHorizontal(startIndex),
bounds.top,
(int)layout.getPrimaryHorizontal(endIndex - 1),
(int)layout.getPrimaryHorizontal(endIndex - offset),
bounds.bottom);

WritableMap region = Arguments.createMap();
Expand Down

0 comments on commit 4d53dce

Please sign in to comment.