konvajs / konva

Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://konvajs.org/
Other
11.07k stars 896 forks source link

bug: Text stroke is buggy in android webview #1774

Closed EinfachHans closed 4 weeks ago

EinfachHans commented 1 month ago

Description

I use this awesome library in an ionic angular application. I encountered a problem, which seems to be only available in android webview.

The stroke of a text seems to be visible inline.

iOS Android
WhatsApp Image 2024-06-07 at 15 01 23 WhatsApp Image 2024-06-07 at 15 01 48

Reproduction

https://jsbin.com/gazusafuta/edit?html,js,output

lavrton commented 4 weeks ago

I don't think we can do much here from Konva side.

EinfachHans commented 4 weeks ago

@lavrton Why not? Can you give me more input about the root cause of this issue?

lavrton commented 4 weeks ago

I guess this is just how android webview rendering words for stroked text.

You can try to experiment with native 2d canvas API to see if you can have any other results.

A possible and ugly workaround is to still draw white text on top of stroked text to "erase" these internal stroke parts.

EinfachHans commented 2 weeks ago

I continue with the ugly workaround for now...

@lavrton Do you have experience in submitting bugs to the android webview engine? As an expert of this, maybe you can create a issue?