[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] WOFF2 support update and questions
From: |
Nikhil Ramakrishnan |
Subject: |
Re: [ft-devel] WOFF2 support update and questions |
Date: |
Fri, 5 Jul 2019 01:29:22 +0530 |
> `FT_Stream_OpenMemory' is be the right function. After calling this,
> you should use `FT_Stream_EnterFrame' and proceed as usual.
This is working now. I think the issue was due to some trivial error I
made while creating the stream and passing it to other functions.
However, could you please check if what I'm doing now is correct?
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sfnt/sfwoff2.c?h=GSoC-2019-nikhil&id=c325089c2fd005e2c324aa4f3ddb942258aed5f1#n340
(see lines 340-344).
I've not used `FT_FRAME_ENTER' as of now (in the loop) because I need
to call `FT_READ_XXX' (which is not for frames) for some part of the
reconstruction. I'll do that when we're ready to copy the table to the
sfnt stream.
> > Also, is this the right way of doing it? Is there some other way I
> > can read the buffer?
>
> Is there are problem with `FT_READ_XXX'?
Nope. It was definitely an issue with my code :-)
Initially, I thought it made sense to have only one `stream' per
source file (because most read macros use an implicit stream
variable), but having a new stream in a separate function works
perfectly.
--
Nikhil