freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] FT_Slot_LoadFunc load_flags info?


From: Ian Britten
Subject: [ft-devel] FT_Slot_LoadFunc load_flags info?
Date: Fri, 02 Oct 2009 11:56:35 -0300
User-agent: Thunderbird 2.0.0.23 (X11/20090822)

Hi all,
As discussed here before a bit, I'm in the awkward position of
having a custom (unsanctioned) FT_Driver, for accessing our custom
font file format via FT.  (Generally works well though! :) )

I'm wondering if there's any docs (or if anyone can summarize)
which of the various FT_LOAD_* flags my FT_Slot_LoadFunc function
is responsible for detecting/obeying, and which ones I can ignore?
http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_XXX

In our initial rendering pipeline, this wasn't much of a problem,
since we controlled the rendering, and didn't use (m)any of these
flags.  However, I'm now using Cairo some, and am finding my font
not working in some workflows.  It seems to be due to my driver
basically ignoring the load_flags parameter, which I'm now trying
to fix.

I've already learnt that FT_LOAD_NO_SCALE needs to be handled [*],
and I'm thinking maybe FT_LOAD_IGNORE_TRANSFORM needs to be handled
too (Or, maybe I am supposed to be doing something when that flag
*isn't* present?  Hmmm...).
Any others?


[*] Can someone sanity-check my pseudo-calculations for NO_SCALE?
       double xScale, yScale;
       if (load_flags & FT_LOAD_NO_SCALE)
              xScale = yScale = inSlot->face->scale;
       else
              xScale = inSlot->face->scale *
                    inSize->metrics.x_scale / (double)(0x10000);
              yScale = inSlot->face->scale *
                    inSize->metrics.y_scale / (double)(0x10000);
       ...
       currPnt.x = xScale * myPnt.x;
       currPnt.y = yScale * myPnt.y;
       inSlot->face->glyph_loader->current.outline.points[count]
                                                   = currPnt;

Many thanks for any info/help!
Ian




reply via email to

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