v2.0.0: slightly reduced spacing for text blocks not separated by spaces
This commit is contained in:
+3
-3
@@ -215,7 +215,7 @@ public class RenderedTextBlock extends Component {
|
|||||||
for (int i = 0; i < words.size(); i++){
|
for (int i = 0; i < words.size(); i++){
|
||||||
RenderedText word = words.get(i);
|
RenderedText word = words.get(i);
|
||||||
if (word == SPACE){
|
if (word == SPACE){
|
||||||
x += 1.5f;
|
x += 1.667f;
|
||||||
} else if (word == NEWLINE) {
|
} else if (word == NEWLINE) {
|
||||||
//newline
|
//newline
|
||||||
y += height+2f;
|
y += height+2f;
|
||||||
@@ -233,7 +233,7 @@ public class RenderedTextBlock extends Component {
|
|||||||
//Chinese/Japanese always render every character separately without spaces however
|
//Chinese/Japanese always render every character separately without spaces however
|
||||||
while (Messages.lang() != Languages.CHINESE && Messages.lang() != Languages.JAPANESE
|
while (Messages.lang() != Languages.CHINESE && Messages.lang() != Languages.JAPANESE
|
||||||
&& j < words.size() && words.get(j) != SPACE && words.get(j) != NEWLINE){
|
&& j < words.size() && words.get(j) != SPACE && words.get(j) != NEWLINE){
|
||||||
fullWidth += words.get(j).width() - 0.5f;
|
fullWidth += words.get(j).width() - 0.667f;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class RenderedTextBlock extends Component {
|
|||||||
|
|
||||||
//Note that spacing currently doesn't factor in halfwidth and fullwidth characters
|
//Note that spacing currently doesn't factor in halfwidth and fullwidth characters
|
||||||
//(e.g. Ideographic full stop)
|
//(e.g. Ideographic full stop)
|
||||||
x -= 0.5f;
|
x -= 0.667f;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user