Open antmelnyk opened 1 year ago
This is a ligature handling bug. Similar to #614, but this time it doesn't fail immediately.
Seems like usvg-text-layout
bug. rustybuzz
produces the same output as harfbuzz
.
It basically thinks that fi
is a single character, which is not. Kinda...
Yeah, that makes sense. I thought that it was about ligature handling.
For this font, the ligatures are classic ff
, fi
, fl
, ffi
, ffl
.
And it fails to render fi
and fl
if there are more characters after these.
I checked 350 other Google Fonts, and quite a lot of them have these 2 ligatures (fi
and fl
). It fails to render only for this particular font, Fjalla One. Maybe that can help you to understand the difference and core of the issue.
Hey @RazrFalcon, I hope you're doing OK.
There is a weird issue with text resolving that was caught for one particular font and a combination of letters. Not sure exactly on which level that happens - either
usvg-text-layout
orrustybuzz
. Maybe you have an idea?SVG:
Font Fjalla One (https://fonts.google.com/specimen/Fjalla+One?noto.query=Roboto&preview.text=fit&preview.text_type=custom&query=fjalla)
Result of running
minimal.rs
example with addedfontdb.load_font_file("./examples/Fjalla One-regular.ttf").unwrap();
Expected (rsvg-convert):![rsvg](https://github.com/RazrFalcon/resvg/assets/17108334/cb249ca2-fab0-44c9-a134-88b032f6f9b5)
Actual (ReSVG):![resvg](https://github.com/RazrFalcon/resvg/assets/17108334/26bb38bc-4b86-4ecf-a1f4-e0b47bd8281c)