freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Ambiguously Undefined Glyphs [was: Mozilla needs someinfo


From: Brian Stell
Subject: Re: [Freetype] Ambiguously Undefined Glyphs [was: Mozilla needs someinfo on Xft]
Date: Fri, 10 Aug 2001 09:51:10 -0700

David Turner wrote:
> 
> Hello Brian,
> 
> (I'm still on vacation, so I'll be brief.. :-)
> 
> >
> > FreeType2 does not provide access to the LOCA table so I could not
> > do the test in Erik's code or the test you suggested. Instead
> > I load the glyph and look at the count of contours.
> >
> 
> If you need it, we can add a function to access SFNT tables
> within TrueType or OpenType. Something like:
> 
>    FT_Error   FT_Load_Sfnt_Table( FT_Face    face,
>                                   Sfnt_Tag   tag,
>                                   FT_Byte*   buffer,
>                                   FT_ULong   buffer_size,
>                                   FT_ULong  *table_size );

I an happy using FT_Get_Sfnt_Table but the available tags in 
tttables.h does not appear to have the LOCA table. 

  typedef enum
  {
    ft_sfnt_head = 0,
    ft_sfnt_maxp = 1,
    ft_sfnt_os2  = 2,
    ft_sfnt_hhea = 3,
    ft_sfnt_vhea = 4,
    ft_sfnt_post = 5,
    ft_sfnt_pclt = 6,

    sfnt_max   /* don't remove */

  } FT_Sfnt_Tag;

It looks like FT_Load_Sfnt_Table would make a local copy as opposed 
to direct access. Do you see advantages to making a copy?


> Another solution would be to implement the relevant functionality
> in a new function. What about:
> 
>   FT_Error   FT_Map_Char_Codes( FT_Face     face,
>                                 FT_ULong    code,    // first charcode
>                                 FT_UInt     count,   // number of codes/glyphs
>                                 FT_UInt*    glyphs,  // output glyph index 
> buffer
>                                 FT_UInt     flags )
> 
> #define  FT_MAP_CHARS_DEFAULT         0
> #define  FT_MAP_CHARS_IGNORE_BLANKS   1  // "spaces" return glyph index 0
> #define  FT_MAP_CHARS_IGNORE_CHARMAP  2  // assume input is glyph index range
> .... maybe other interesting flags .....

I need some way to find broken glyphs; ie: glyphs that are not 
supposed to be blank but that in fact are. The list of known blanks 
in Unicode is small so Mozilla just has a subroutine (could be a 
macro) that tests for these few points.

-- 
Brian Stell
mailto:address@hidden



reply via email to

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