Should fix centering issues with trailing emojis
This commit is contained in:
parent
9dbc14edd6
commit
41b8d7304e
1 changed files with 2 additions and 0 deletions
|
@ -278,6 +278,8 @@ func (gc *GraphicContext) GetStringBounds(s string) (left, top, right, bottom fl
|
|||
for fragment := range gc.Emojis.Iterate(s) {
|
||||
if fragment.IsEmoji {
|
||||
cursor += fUnitsToFloat64(fixed.Int26_6(gc.Current.Scale)) * 1.15
|
||||
left = math.Min(left, cursor)
|
||||
right = math.Max(right, cursor)
|
||||
continue
|
||||
}
|
||||
index := f.Index(fragment.Rune)
|
||||
|
|
Loading…
Reference in a new issue