Dear Ingmar, Thank you for finding the issue, I will take a look. I think the repeated file access for the glyph index which does not have bitmaps is, at least, inconvenient behaviour. Even if it was designed behaviour, the request of improvement is reasonable.
Unfortunately, I don't have sufficient time to start at once, please wait for a month. I'm quite sorry. Regards, mpsuzuki On Wed, 09 Mar 2011 09:34:43 +0100 Ingmar Frank <[email protected]> wrote: >Hello everybody, > >we've noticed repeated file access by the small bitmap cache when >looking up the blank character (code 32). Our rendering engine iterates >over the string to be printed, calling FTC_SBitCache_Lookup() to obtain >the glyph for each character. The problem seems to be that for the blank >there is no glyph image, which makes sense, but we need the x advance. >When performing this look-up FreeType accesses the file each time. > >We've supplied our own callbacks for file access which made it easy to >determine that this is the source of some major slowdowns, especially >when the fonts are stored on slow media (like SD cards). > >We currently have a workaround in place that stores the x advance for >each size in our application. But we would like to avoid this kind of >thing. So the question is, is this a bug, or are we not using the API >correctly? We suspect that since there is no glyph image (or its width >and height is 0) the cache assumes that it needs to create the glyph and >therefore opens the file over and over again. > >Kind regards, >Ingmar Frank > > >_______________________________________________ >Freetype mailing list >[email protected] >http://lists.nongnu.org/mailman/listinfo/freetype _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
