freetype-devel
[Top][All Lists]
Advanced

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

Re: Revised SVG stuff


From: Werner LEMBERG
Subject: Re: Revised SVG stuff
Date: Sun, 16 Jan 2022 08:22:20 +0000 (UTC)

>> > 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?
>>
>> It seems to me that you could try to add another special case for
>> SVG.
> 
> Yea, that's what I had in mind, but given this situation, I think
> what can be done is, check if an SVG table exists in the font and
> FT_LOAD_COLOR has been passed, if the two are true, don't run the
> auto-hinter.
> 
> Is that what you mean?

Yes.  However, you write

  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.

If I understand this correctly it means that a test for the SVG table
is not sufficient.  Instead, you have to actually do the call to
`driver->clazz->load_glyph`, and if this fails, FreeType should try to
load a bitmap font, and if this fails, it should proceed with
auto-hinting the glyph from the `glyf` table.

If necessary, `tt_face_load_svg_doc` should be modified to exit
quickly if there is no SVG corresponding glyph.


    Werner



reply via email to

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