Hi, I guess you're afraid that some bugs exist in the stream driver of the FreeType2. You could load no font? Or, you could load some fonts, but could not other fonts?
If FT_Open_Face() is already failed, the glyph loading should not be tried anymore. According to fterrdef.h, error code 2 (from FT_Open_Face()) means the unknown font file format. So... if you could load some fonts but could not load other, please clarify the font file you've tried. If it's officially provided freely (not piracy), or bundled to the widely available products, no need to post the font file in this list, please clarify how to access it. If it's difficult (e.g. commercial font, or embedded font in the confidential document etc), please try the tracing of FreeType2. The method how to build the FreeType2 with debugging and tracing message is written in doc/DEBUG. Regards, mpsuzuki On 10/04/2013 11:15 AM, Ztatik Light wrote: > I'm having trouble implementing the read function passed into FT_Open_Face > through it's `args` flags... > > Now, the function is being *called* correctly, because I put a print > statement inside and see it printing out. It even reads some data. But > FT_Open_Face returns 2, and the glyph loading fails... > > I suspect it has something to do with the case of `count` being 0 and it > needing to seek. > > The doc mentions: > > "This function might be called to perform a seek or skip operation with a > ‘count’ of 0." > > > But . . . What if `offset` is also zero? Does this mean seek to beginning of > the file, or just return 0? > > An example of an implemented read function with proper seeking and all would > be the most beneficial in this case.. > > > _______________________________________________ > Freetype mailing list > Freetype@nongnu.org > https://lists.nongnu.org/mailman/listinfo/freetype > _______________________________________________ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype