|
|
|
|
|
|
char startingChar = text[0]; |
|
|
|
float totalWidth = 0; |
|
|
|
if (char.IsHighSurrogate(startingChar) || EmojiUtils.isSingleCharEmoji(startingChar)) { |
|
|
|
float advance = style.fontSize + style.letterSpacing; |
|
|
|
float advance = style.fontSize * EmojiUtils.advanceFactor + style.letterSpacing; |
|
|
|
for (int i = 0; i < text.Length; i++) { |
|
|
|
char ch = text[i]; |
|
|
|
if (char.IsHighSurrogate(ch) || EmojiUtils.isSingleCharNonEmptyEmoji(ch)) { |
|
|
|
|
|
|
char startingChar = text[start]; |
|
|
|
float currentAdvance = offset; |
|
|
|
if (char.IsHighSurrogate(startingChar) || EmojiUtils.isSingleCharEmoji(startingChar)) { |
|
|
|
float advance = style.fontSize + style.letterSpacing; |
|
|
|
float advance = style.fontSize * EmojiUtils.advanceFactor + style.letterSpacing; |
|
|
|
for (int i = 0; i < count; i++) { |
|
|
|
char ch = text[start + i]; |
|
|
|
if (char.IsHighSurrogate(ch) || EmojiUtils.isSingleCharNonEmptyEmoji(ch)) { |
|
|
|
|
|
|
char startingChar = text[start]; |
|
|
|
float totalWidths = 0; |
|
|
|
if (char.IsHighSurrogate(startingChar) || EmojiUtils.isSingleCharEmoji(startingChar)) { |
|
|
|
float advance = style.fontSize + style.letterSpacing; |
|
|
|
float advance = style.fontSize * EmojiUtils.advanceFactor + style.letterSpacing; |
|
|
|
for (int i = 0; i < count; i++) { |
|
|
|
char ch = text[start + i]; |
|
|
|
if (char.IsHighSurrogate(ch) || EmojiUtils.isSingleCharNonEmptyEmoji(ch)) { |
|
|
|
|
|
|
x += letterSpaceHalfLeft; |
|
|
|
advances[i] = letterSpaceHalfLeft; |
|
|
|
|
|
|
|
|
|
|
|
float advance = style.fontSize * EmojiUtils.advanceFactor; |
|
|
|
var maxX = style.fontSize + x; |
|
|
|
var minY = metrics.descent/2 - style.fontSize; |
|
|
|
var maxY = metrics.descent/2; |
|
|
|
var maxX = advance + x; |
|
|
|
var minY = -style.fontSize * EmojiUtils.sizeFactor; |
|
|
|
var maxY = metrics.descent; |
|
|
|
float advance = style.fontSize; |
|
|
|
x += advance; |
|
|
|
|
|
|
|
advances[i] += advance; |
|
|
|