diff --git a/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java b/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java index cba24bb..fc8c130 100644 --- a/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java +++ b/justifytext-library/src/main/java/me/biubiubiu/justifytext/library/JustifyTextView.java @@ -62,7 +62,7 @@ private void drawScaledText(Canvas canvas, int lineStart, String line, float lin line = line.substring(3); } - float d = (mViewWidth - lineWidth) / line.length() - 1; + float d = (mViewWidth - lineWidth) / (line.length() - 1); for (int i = 0; i < line.length(); i++) { String c = String.valueOf(line.charAt(i)); float cw = StaticLayout.getDesiredWidth(c, getPaint());