Fix issue rendering names
This commit is contained in:
parent
b9cb4c4740
commit
7c4ffa0023
2 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,6 @@ import android.graphics.PointF;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.text.TextPaint;
|
|
||||||
import android.util.FloatMath;
|
import android.util.FloatMath;
|
||||||
|
|
||||||
public class TextRenderer {
|
public class TextRenderer {
|
||||||
|
@ -284,7 +283,7 @@ public class TextRenderer {
|
||||||
}
|
}
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
if (lastSpace == -1) {
|
if (lastSpace == -1 || pos == end) {
|
||||||
drawTextOnCanvas(cv, text.text.substring(start, pos), text.centerX, text.centerY + line * (textSize + 2), paintText,
|
drawTextOnCanvas(cv, text.text.substring(start, pos), text.centerX, text.centerY + line * (textSize + 2), paintText,
|
||||||
text.textShadow);
|
text.textShadow);
|
||||||
start = pos;
|
start = pos;
|
||||||
|
|
|
@ -253,7 +253,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
|
||||||
}
|
}
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
if(lastSpace == -1){
|
if(lastSpace == -1 || (pos == end)){
|
||||||
drawShadowText(cv, text.substring(start, pos), x, y + line * (textSize + 2));
|
drawShadowText(cv, text.substring(start, pos), x, y + line * (textSize + 2));
|
||||||
start = pos;
|
start = pos;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue