For anyone else using the Ebitengine that wants to render text as an outline, I’ve had had some success using the shapes package. The approach that worked for me was to render the text to a separate image, then call ApplyOutline using the screen as the target.

Here’s some very unoptimised code demonstrating this:

func (f *State) Draw(screen *ebiten.Image) {
// The image holding the rendered text
img := ebiten.NewImage(screen.Bounds().Dx(), screen.Bounds().Dy())

// The filled in text colour. Here it's set to red. As far as I can tell,
// this has no effect on the rendered outline.
col := ebiten.ColorScale{}
col.Scale(1, 0, 0, 1)

pos := ebiten....

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help