Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-11 Thread mpsuzuki
On Wed, 10 Mar 2010 03:50:17 -0500 Behdad Esfahbod beh...@behdad.org wrote: Well, in short, all the hb_blob_t in HarfBuzz is about communicating to harfbuzz what it can do with the memory backing the font file. There are three different cases we are interested in: - The memory is read-only;

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-10 Thread Behdad Esfahbod
On 03/05/2010 02:26 AM, mpsuz...@hiroshima-u.ac.jp wrote: Checking the source code, I wonder if I should also check for (face_flags FT_FACE_FLAG_EXTERNAL_STREAM) to detect whether it's an mmapped stream or the user provided it (and hence we cannot mprotect). The docs say: Don't read or

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-06 Thread Werner LEMBERG
To guarantee the memory buffer is obtained by mmap() in FT2, including previous releases, the most stable way would be mmap() in FT2 client and pass the memory image to FT2. To me, this sounds reasonable. However, you probably has special constraints... Werner

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-04 Thread mpsuzuki
On Mon, 01 Mar 2010 22:29:18 -0500 Behdad Esfahbod beh...@behdad.org wrote: On 03/01/2010 09:18 PM, mpsuz...@hiroshima-u.ac.jp wrote: How about using if ( face-stream-read == NULL ) instead of if ( face-stream-base != NULL ) Yes, that's what I'm planning to do instead. Thanks!

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-02 Thread mpsuzuki
On Tue, 2 Mar 2010 09:30:39 +0200 Tor Lillqvist t...@iki.fi wrote: Indeed. If you know the function calling the final FT_Stream_EnterFrame() and exposes internal base value to FT2 client, please let me know. Sorry, I don't. As the enter/exit functions are called dozens of times before

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-02 Thread Ralph Giles
On Mon, Mar 1, 2010 at 11:30 PM, Tor Lillqvist t...@iki.fi wrote: Sorry, I don't. As the enter/exit functions are called dozens of times before something odd happens and the exit function isn't called (and then later the Pango function is called), it would take quite some time to debug...

[ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-01 Thread Tor Lillqvist
Hi, I noticed a problem in the Pango FreeType backend on Windows, where it would see a FT_StreamRec with a non-NULL base field, and thus assume it is a memory-based stream as the comment in ftsystem.h promises (and that base points to the whole font file mapped into memory). I did some

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-01 Thread Behdad Esfahbod
On 03/01/2010 09:18 PM, mpsuz...@hiroshima-u.ac.jp wrote: How about using if ( face-stream-read == NULL ) instead of if ( face-stream-base != NULL ) Yes, that's what I'm planning to do instead. Checking the source code, I wonder if I should also check for (face_flags

Re: [ft-devel] Known problem with FT_StreamRec::base being non-NULL also for file-based streams?

2010-03-01 Thread Tor Lillqvist
Indeed. If you know the function calling the final FT_Stream_EnterFrame() and exposes internal base value to FT2 client, please let me know. Sorry, I don't. As the enter/exit functions are called dozens of times before something odd happens and the exit function isn't called (and then later