-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
When truncating text in a label, richtext, etc. Japanese text (and possibly other scripts too) don't truncate at the right position and instead overstep the boundary of the widget.
How to reproduce
Run the example app
Screenshots
Example code
package main
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Test truncate")
l1 := widget.NewLabel("hereisakindoflonglabeltextwithnospaces")
l1.Truncation = fyne.TextTruncateEllipsis
l2 := widget.NewLabel("これはテキストの切り捨てがどのように機能するかをテストするための日本語の文です")
l2.Truncation = fyne.TextTruncateEllipsis
rect := &canvas.Rectangle{
StrokeColor: &color.NRGBA{R: 255, A: 255},
StrokeWidth: 2,
}
w.SetContent(container.New(layout.NewGridLayoutWithColumns(2),
container.NewVBox(l1, l2),
rect,
))
w.Resize(fyne.NewSize(300, 150))
w.ShowAndRun()
}
Fyne version
develop
Go compiler version
n/a
Operating system and version
mac
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working