|
|
|
|
|
|
float letterSpaceHalfRight = letterSpace - letterSpaceHalfLeft; |
|
|
|
|
|
|
|
for (int i = 0; i < wordCount; i++) { |
|
|
|
initAdvance = x; |
|
|
|
if (advances != null) { |
|
|
|
advances[i + layoutOffset] = letterSpaceHalfLeft + wordSpacing; |
|
|
|
} |
|
|
|
advances[i + layoutOffset] = letterSpaceHalfLeft + wordSpacing; |
|
|
|
if (advances != null) { |
|
|
|
advances[i - 1 + layoutOffset] += letterSpaceHalfRight; |
|
|
|
advances[i + layoutOffset] = letterSpaceHalfLeft; |
|
|
|
} |
|
|
|
advances[i - 1 + layoutOffset] += letterSpaceHalfRight; |
|
|
|
advances[i + layoutOffset] = letterSpaceHalfLeft; |
|
|
|
|
|
|
|
x += letterSpace; |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (positions != null) { |
|
|
|
positions[i + layoutOffset] = x; |
|
|
|
} |
|
|
|
positions[i + layoutOffset] = x; |
|
|
|
|
|
|
|
float advance; |
|
|
|
if (ch == '\t') { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
x += advance; |
|
|
|
if (advances != null) { |
|
|
|
advances[i + layoutOffset] += advance; |
|
|
|
} |
|
|
|
advances[i + layoutOffset] += advance; |
|
|
|
if (advances != null) { |
|
|
|
advances[i + layoutOffset] += letterSpaceHalfRight; |
|
|
|
} |
|
|
|
|
|
|
|
advances[i + layoutOffset] += letterSpaceHalfRight; |
|
|
|
x += letterSpaceHalfRight; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
float letterSpaceHalfRight = letterSpace - letterSpaceHalfLeft; |
|
|
|
|
|
|
|
x += letterSpaceHalfLeft; |
|
|
|
if (advances != null) { |
|
|
|
advances[i] = letterSpaceHalfLeft; |
|
|
|
} |
|
|
|
advances[i] = letterSpaceHalfLeft; |
|
|
|
|
|
|
|
|
|
|
|
var minX = x; |
|
|
|
|
|
|
_updateBounds(minX, maxX, minY, maxY, ref bounds); |
|
|
|
|
|
|
|
if (positions != null) { |
|
|
|
positions[i] = x; |
|
|
|
} |
|
|
|
positions[i] = x; |
|
|
|
if (advances != null) { |
|
|
|
advances[i] += advance; |
|
|
|
advances[i] += letterSpaceHalfRight; |
|
|
|
} |
|
|
|
advances[i] += advance; |
|
|
|
advances[i] += letterSpaceHalfRight; |
|
|
|
if (advances != null) { |
|
|
|
advances[i] = 0; |
|
|
|
} |
|
|
|
|
|
|
|
if (positions != null) { |
|
|
|
positions[i] = x; |
|
|
|
} |
|
|
|
advances[i] = 0; |
|
|
|
positions[i] = x; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|