private final float getRightSideBearing(String label, int start, int end, RectF charBox) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { float advance = paint.getRunAdvance(label, start, end, start, end, false, end); return x_px2mm(advance - charBox.right); } else { return 0; } }
float pos = x_px2mm(posPx);