[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Revised SVG stuff

From: Moazin K
Subject: Re: Revised SVG stuff
Date: Sat, 15 Jan 2022 21:09:08 -0800

Hi Werner,

I just got some time to quickly check this bug. The reason why the autohinting code seems to get triggered for that font is because `ttface->num_locations` is 1 for this font while it's 0 for all other fonts that I had in my test collection. This check happens in FT_Load_Glyph in `ftobjs.c` on line number 999 in my branch where autohint is set to true, there's a comment about `num_locations` over there. I'm under the impression that that value will not be set to `0` in the case of OTF fonts with TTF glyphs. I'm not sure how to add a check that can prevent hinting to be run for OT-SVG glyphs. Whether or not a glyph index has a corresponding SVG glyph in the table is determined later on inside cff_slot_load or TT_Load_Glyph. Any ideas on how to prevent autohinting from being run on an OT-SVG glyph?


On Mon, Jan 3, 2022 at 10:48 AM Werner LEMBERG <> wrote:

Hello Moazin,

just now I've pushed new branches to the FreeType and FreeType Demo
repositories with my changes.

While the library stuff is thoroughly checked and modified[*], the
demo stuff is not yet; to the latter code I've only applied the
necessary fixes to make it compile.

The reason why I've stopped is that I wasn't able to render this SVG

Funnily, it was the first SVG that I downloaded, and I was quite
surprised to see no SVG rendering at all :-)

AFAICS, the error 'Unimplemented Feature' is returned in line 502 of
file `afloader.c`.  Please check.  It doesn't make any sense for SVG
glyphs to run the auto-hinter.


[*] I did `git rebase -i HEAD^^^^^`, then walking over the code commit
    by commit, adding my changes with `git commit --amend`.  If I
    found new things I did rebasing again so that the changes get
    added to the right commit.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]