`svgrender.h' -> `otsvg.h'
`FT_SVG_RENDER_H' -> `FT_OTSVG_H'
Since `svgrender.h' contains just the hooks and the SVG document
structure it's probably just better to name it something general
like `otsvg.h'.
We have to remove the system installation of FreeType
from the includes, the proper way is to write a regular
expression that removes the whole path. The last one
is buggy (it can remove other libs along with freetype)
so for now I am temporarily resorting to this one.
Inside the SVG Document List, four fields exist. It's
better to create a struct to hold at one place instead
of 4 variables. Also created `compare_svg_doc' which
will be helpful in writing binary search later.
If `yes' is choosen but SVG library isn't found, exit
with error. If `auto' was choosen but the library wasn't
found, go with `no' NOT `no-default'. `no-default' should
be a separate option.
Added a `no-default' option that compiles SVG support
but keeps no default rendering port. Thus, the client
application must inject its own hooks.
* builds/unix/configure.raw: Changes in the build
system to support `no-default'.
* builds/unix/unix-cc.in: Add `COMPILE_SVG_PORT' var
to ultimately let the `rules.mk' in `svg' folder know
whether to build the port files or not.
* include/freetype/config/ftoption.h: Change the flag
`FT_CONFIG_OPTION_SVG_DEFAULT' to `*_DEFAULT_SVG' as
`sed' and `ftoption_set' has a problem with the older
version.
* src/svg/ftsvg.c: Ditto.
* src/svg/rules.mk: Compile the port only if
`COMPILE_SVG_PORT' is set.
and the image buffer.
State has been moved inside the library structure. A new hook
function has been added to query the size needed for the state
structure and this allocation is performed by FT. Memory alloc.
for the image buffer is also being done by FT so that it can later
free it easily.
* include/freetype/svgrenderer.h: Small doc fixes. Addition of two
new hooks. `SVG_Lib_Get_State_Size' and `SVG_Lib_Get_Buffer_Size'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Small bug fix. Memory
was being initialized before library.
* src/base/ftobjs.c (FT_Set_Svg_Hooks): Adjust the code for new
hook functions.
* src/svg/ftsvg.c: Adjust the code for new hook functions. Perform
all memory allocations needed by the rendering port from FreeType
side.
* src/svg/svgtypes.c: Add the new hooks in the hook structure.