freetype-devel
[Top][All Lists]
Advanced

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

[BUG?] FT_LOAD_RENDER flag sends autohinter off course


From: Henrik Gedenryd
Subject: [BUG?] FT_LOAD_RENDER flag sends autohinter off course
Date: Tue, 01 Aug 2000 09:20:06 +0200
User-agent: Microsoft Outlook Express Macintosh Edition - 5.0 (1513)

I think I have found a bug but I'm not sure.

Scenario: I call FT_Load_Char with FT_LOAD_RENDER for a ps font, and the t1z
renderer is selected as I have not included the regular t1 in the build (as
the documentation indicates that the t1 will soon become obsolete). The t1z
driver opts to load using the autohinter.

The autohinter recursively calls FT_Load_Glyph with the render flag, which
causes a bitmap to be rendered into the slot.

When returning to the autohinter, it gets confused by there being a bitmap
in the slot.

It seems to me that the recursive call should be made with the render flag
switched off, so that the bitmap is created only after the autohinter has
had a go at the outline.

The following fix works for me (in ftobjs.c, FT_Load_Glyph()):

...
    if ( autohint )
    {
      FT_AutoHinter_Interface*  hinting;


      hinting = (FT_AutoHinter_Interface*)hinter->clazz->module_interface;
        /* turn off forced rendering to ensure that only outline is loaded
*/
      error = hinting->load_glyph( (FT_AutoHinter)hinter, slot, face->size,
                                   glyph_index, load_flags & ~
FT_LOAD_RENDER);
    }
    else
...

Henrik





reply via email to

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