|
From: Martin H. <mar...@si...> - 2011-12-02 06:53:18
|
Dear Johan,
> I got a bug report today from a user of my Graphite font, pointing out
> that the font behaved differently in LibreOffice 3.4 compared to previous
> versions. To demonstrate this, I have managed to construct a minimal (or
> at least small) testcase:
>
> ---- GDL file begins ----
>
> table(glyph)
> a=codepoint("a")
> A=codepoint("A")
> b=codepoint("b")
> B=codepoint("B")
> endtable;
>
> table(substitution)
> pass(1)
> b b > B B / _ ^ a a _ ; // Rule 1
> a > A / B A ^ _ ; // Rule 2
> a > A / B ^ _ ; // Rule 3
> endpass;
> endtable;
>
> ---- EOF ----
Great work. Thanks for that, it's always good to get bugs squashed. We've fixed the bug so now it works the same as for silgraphite. What was happening was that the mechanism for spotting whether the engine is making progress through the string (notice how many of the rules move the cursor back from the end of the rule), was getting too far ahead of itself after the first rule (it wasn't taking into account the cursor position in rule 1) and so it was tripping the "not making enough progress" test and the engine was jumping the cursor to the end of the string before the last glyphs could get processed.
I say all this because even though we have fixed the bug in the engine, it'll take a while for it to get out into libreoffice. But there is a workaround: increase the MaxRuleLoop to say 10 in the substitution pass, as in:
table(substitution) {MaxRuleLoop = 10}
Thanks again for raising this bug. We've also added your test (well something slightly harder to pass) as a regression test, so it shouldn't happen again.
Yours,
Martin
|