freetype
[Top][All Lists]
Advanced

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

Re: bugs?


From: David Turner
Subject: Re: bugs?
Date: Tue, 11 Jul 2000 17:59:29 +0200

Hi Lidia,

> 
>     hello !
> i use freetype library in order to have some properties for different kinds
> of font formats.
> for ttf , i need know some names
> my code is:
> ----------------------------------------------------------------------------
> --
>      FT_Library library;
>      FT_Error   error;
> 
>      TT_FaceRec*    face;
> 
>      error=FT_Init_FreeType(&library);
> 
>      cSTRING pathname="c:\\winnt\\fonts\\arial.ttf";
> 
>      error = FT_New_Face( library , pathname.getStr() , 0,
> (FT_Face*)(&face) );
> 
>      cMEMORY buff(100);
>      for ( int i=0;i<8;i++)
>      {
>           TT_NameRec* name=face->name_table.names + i;
> 
> strncpy((char*)buff.getPtr(),(char*)(name->string),name->stringLength);
>         *(buff.getPtr()+name->stringLength)=0;
>           M_DBGMSG("I=" << i << " name=" << buff.getPtr())
>        }
> 
>      FT_Done_Face((FT_Face)face);
>      FT_Done_FreeType(library);
> ----------------------------------------------------------------------------
> ------

First of all, you're using FreeType internals, which means your program
isn't guaranteed to work with succesive versions of the library..

However, it is true that there's currently no high-level interface to
retrieve names from a SFNT-based font file (TrueType & OpenType). This
will come, but probably a bit later..

> 1.for some fonts it works OK , but it fails on memory for standart Arial.ttf

What does "fails on memory" exactly means ??

> 2.face->num_names field always is 0.Is this bug or feature?

A bug, you can use face->name_tables.numNameRecords instead for the moment
until this is fixed..

> 3.is there some examples for different  modules using? I am interesting on
> psnames module...

What do you mean. Modules are pretty internal to the engine. They will be
described later but I have no intention to document them fully for now.

What kind of things interest you in the "psnames" module ?

Best,

- David



reply via email to

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