strange stroked text

69 views
Skip to first unread message

Rik Cabanier

unread,
Oct 16, 2023, 2:58:12 PM10/16/23
to skia-discuss
we're seeing some strange behavior in the Meta Quest browser with stroked text.
This link shows our rendering on the left and desktop chrome's on the right: https://drive.google.com/file/d/14QJA-gVvEjHRqPBDzy8cxsnSZZpJb0Bo/view?usp=sharing

This seems like an issue in skia.  Is this a known problem?
Our browser runs on ARM android and has version 118 but previous version also have this issue.

Ben Wagner

unread,
Oct 16, 2023, 3:27:58 PM10/16/23
to skia-d...@googlegroups.com
What's the issue? It looks like the outlines of the glyphs have been
stroked. Now, the outlines do overlap and have intersections, so the
stroke of them will as well. If the glyphs of this font are in
OpenType `glyf` format they can set the `OVERLAP_SIMPLE` flag on
glyphs they want simplified and (on platforms that support reading
this flag, like FreeType on Android) Skia will do the extra work to
attempt to remove the overlap. This tends to be more common these days
with variable fonts which tend to have more overlaps.
> --
> You received this message because you are subscribed to the Google Groups "skia-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/62257839-8713-4635-b715-232128e9bca2n%40googlegroups.com.

Rik Cabanier

unread,
Oct 16, 2023, 5:50:28 PM10/16/23
to skia-discuss
The issue is that there is a difference between Android and desktop. Shouldn't the same page look identical on different platforms?
The stroke artifacts on Android seem wrong...

Ben Wagner

unread,
Oct 16, 2023, 6:28:30 PM10/16/23
to skia-d...@googlegroups.com
I would never expect the same "page" to look identical on different
platforms. Especially with how GPUs work it's difficult to get
identical output from one frame or test run to the next on the same
device.

That being said, I have no idea what fonts are in use here. Is it
possible that the "desktop" and "Android" are using different fonts? I
have no means of reproducing both of your cases, so it is difficult to
say why they are different.

There are no stroke "artifacts" on Android, this is simply stroking
the contours of the glyph. As stated before, the font itself can
request simplification or the user of Skia could retrieve the paths,
simplify them, and then stroke the simplified contours. But these are
the contours from the glyph. Stroking such contours (which self
intersect) looks like that. Perhaps it was expected that the *area* of
the glyph would be stroked (stroke the outline of the area)? Stroking
the contours and outlining are different operations if the contours
ever cross. Finding the outline of the area enclosed is what Skia's
simplification does, but something needs to request simplification as
it can be very expensive to compute.
> To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/182062de-451c-48eb-a492-520df9f83e05n%40googlegroups.com.

Rik Cabanier

unread,
Oct 16, 2023, 6:59:02 PM10/16/23
to skia-discuss
I see. Yes, this is not using a specific font, just the system's "sans-serif". I will ask if it can be reproduced with a name font.

thanks for your help!

Reply all
Reply to author
Forward
0 new messages