Better approximation of emoji's bounds
This commit is contained in:
parent
9941d77460
commit
9dbc14edd6
1 changed files with 1 additions and 1 deletions
|
@ -277,7 +277,7 @@ func (gc *GraphicContext) GetStringBounds(s string) (left, top, right, bottom fl
|
||||||
prev, hasPrev := truetype.Index(0), false
|
prev, hasPrev := truetype.Index(0), false
|
||||||
for fragment := range gc.Emojis.Iterate(s) {
|
for fragment := range gc.Emojis.Iterate(s) {
|
||||||
if fragment.IsEmoji {
|
if fragment.IsEmoji {
|
||||||
cursor += gc.Current.Scale*emojiScale + gc.Current.Scale*emojiSpacing*2
|
cursor += fUnitsToFloat64(fixed.Int26_6(gc.Current.Scale)) * 1.15
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
index := f.Index(fragment.Rune)
|
index := f.Index(fragment.Rune)
|
||||||
|
|
Loading…
Reference in a new issue