Hi, I understand your touble as following:
1. ICU wants to access the memory mapped image of OpenType table which is specified by 4-letter tag (e.g. "kern", "GSUB", etc) 2. But FT_Get_Sfnt_Table() requires FT2-specific number, FT_Sfnt_Tag, to specify TrueType table. 3. So a conversion from 4-letter tag to FT_Sfnt_Tag is required. Which function does the conversion? If I'm misunderstanding, please correct. I guess, ICU can want to access the OpenType table which cannot be specified by FT_Sfnt_Tag (e.g. "GSUB"), so another function FT_Load_Sfnt_Table() can be better. FT_Load_Sfnt_Table() receives 4-letter tag to specify the table in the font. How do you think of? Regards, mpsuzuki On Mon, 09 Jun 2008 16:35:30 -0300 Ian Britten <[EMAIL PROTECTED]> wrote: >Hi all, >I'm in the process of upgrading some v2.1.7 code to the latest >version (2.3.5), and was wondering if someone could point me in >the right direction regarding accessing font tables? > ><Background> >The relevant code is bridging ICU and FreeType. I'm not sure >why ICU wants the font tables (Kerning probably?), but I'm just >trying to get them back to the caller. See >http://www.icu-project.org/apiref/icu4c/classLEFontInstance.html#af1da7510c05deebcab885b4f351db33 >for the C++ baseclass interface I need to implement. > >It provides a single input (LETag == uint32_t), and wants a >void* back. It's called from deep within ICU if/when necessary ></Background> > >The original code seems to only support TT tables, and looks >something like this: > LETag tableTag = // whatever > TT_Face ttFace = // whatever > FT_ULong length = 0; > FT_Error error = ttFace->goto_table( > ttFace, tableTag, ttFace->stream, &length); > if (error) > // whatever > > unsigned char *outBuffer = // whatever > error = FT_Stream_Read(ttFace->stream, outBuffer, length); > if (error) > // whatever > >With the removal of the FT_INTERNAL header files, this code no >longer compiles, and needs to be upgraded to the proper public >FT interfaces. > >Now, am I correct in my understanding that this stuff is referred >to as SFNT? And that it's accessed via some of the functions >like FT_Get_Sfnt_Table() >(http://freetype.sourceforge.net/freetype2/docs/reference/ft2-truetype_tables.html#FT_Get_Sfnt_Table) > >If that's the case, does anyone know how I might convert/map the >given LETag integer to a FT_Sfnt_Tag enum? >If this isn't the correct approach, can someone point me in the >right direction? > >Many thanks for any help! >Ian _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
