2002-06-08 08:47:18 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* t42drivr.c */
|
|
|
|
/* */
|
|
|
|
/* High-level Type 42 driver interface (body). */
|
|
|
|
/* */
|
2007-02-12 22:44:10 +01:00
|
|
|
/* Copyright 2002, 2003, 2004, 2006, 2007 by Roberto Alameda. */
|
2002-06-08 08:47:18 +02:00
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
2002-06-19 21:43:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* This driver implements Type42 fonts as described in the */
|
|
|
|
/* Technical Note #5012 from Adobe, with these limitations: */
|
|
|
|
/* */
|
|
|
|
/* 1) CID Fonts are not currently supported. */
|
|
|
|
/* 2) Incremental fonts making use of the GlyphDirectory keyword */
|
|
|
|
/* will be loaded, but the rendering will be using the TrueType */
|
|
|
|
/* tables. */
|
2003-10-16 17:48:39 +02:00
|
|
|
/* 3) As for Type1 fonts, CDevProc is not supported. */
|
|
|
|
/* 4) The Metrics dictionary is not supported. */
|
|
|
|
/* 5) AFM metrics are not supported. */
|
2002-06-19 21:43:15 +02:00
|
|
|
/* */
|
|
|
|
/* In other words, this driver supports Type42 fonts derived from */
|
|
|
|
/* TrueType fonts in a non-CID manner, as done by usual conversion */
|
|
|
|
/* programs. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
2002-06-08 08:47:18 +02:00
|
|
|
|
|
|
|
|
2002-06-07 09:23:06 +02:00
|
|
|
#include "t42drivr.h"
|
|
|
|
#include "t42objs.h"
|
2002-06-08 08:47:18 +02:00
|
|
|
#include "t42error.h"
|
2002-06-07 09:23:06 +02:00
|
|
|
#include FT_INTERNAL_DEBUG_H
|
2002-05-15 08:16:57 +02:00
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
#include FT_SERVICE_XFREE86_NAME_H
|
|
|
|
#include FT_SERVICE_GLYPH_DICT_H
|
|
|
|
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
2002-06-08 08:47:18 +02:00
|
|
|
|
2002-06-07 09:23:06 +02:00
|
|
|
#undef FT_COMPONENT
|
|
|
|
#define FT_COMPONENT trace_t42
|
2002-05-15 08:16:57 +02:00
|
|
|
|
2002-06-08 08:47:18 +02:00
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* GLYPH DICT SERVICE
|
|
|
|
*
|
|
|
|
*/
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2002-05-15 08:16:57 +02:00
|
|
|
static FT_Error
|
|
|
|
t42_get_glyph_name( T42_Face face,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_Pointer buffer,
|
|
|
|
FT_UInt buffer_max )
|
|
|
|
{
|
2007-02-12 15:55:03 +01:00
|
|
|
FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
|
2007-02-12 22:44:10 +01:00
|
|
|
|
2002-06-08 08:47:18 +02:00
|
|
|
return T42_Err_Ok;
|
2002-05-15 08:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static FT_UInt
|
|
|
|
t42_get_name_index( T42_Face face,
|
|
|
|
FT_String* glyph_name )
|
|
|
|
{
|
|
|
|
FT_Int i;
|
|
|
|
FT_String* gname;
|
|
|
|
|
|
|
|
|
2002-06-07 09:23:06 +02:00
|
|
|
for ( i = 0; i < face->type1.num_glyphs; i++ )
|
2002-05-15 08:16:57 +02:00
|
|
|
{
|
2002-06-07 09:23:06 +02:00
|
|
|
gname = face->type1.glyph_names[i];
|
2002-05-15 08:16:57 +02:00
|
|
|
|
2007-02-12 15:55:03 +01:00
|
|
|
if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
|
2004-01-23 20:52:40 +01:00
|
|
|
return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
|
2002-05-15 08:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-04-21 16:30:37 +02:00
|
|
|
static const FT_Service_GlyphDictRec t42_service_glyph_dict =
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
{
|
2003-09-17 07:26:33 +02:00
|
|
|
(FT_GlyphDict_GetNameFunc) t42_get_glyph_name,
|
|
|
|
(FT_GlyphDict_NameIndexFunc)t42_get_name_index
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* POSTSCRIPT NAME SERVICE
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
static const char*
|
2003-09-29 22:33:37 +02:00
|
|
|
t42_get_ps_font_name( T42_Face face )
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
{
|
|
|
|
return (const char*)face->type1.font_name;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-04-21 16:30:37 +02:00
|
|
|
static const FT_Service_PsFontNameRec t42_service_ps_font_name =
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
{
|
2003-09-29 22:33:37 +02:00
|
|
|
(FT_PsName_GetFunc)t42_get_ps_font_name
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
/*
|
2003-11-01 15:36:20 +01:00
|
|
|
*
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
* POSTSCRIPT INFO SERVICE
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
static FT_Error
|
|
|
|
t42_ps_get_font_info( FT_Face face,
|
|
|
|
PS_FontInfoRec* afont_info )
|
|
|
|
{
|
|
|
|
*afont_info = ((T42_Face)face)->type1.font_info;
|
2004-11-12 08:02:45 +01:00
|
|
|
return T42_Err_Ok;
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
}
|
|
|
|
|
2009-03-03 14:28:59 +01:00
|
|
|
static FT_Error
|
|
|
|
t42_ps_get_font_extra( FT_Face face,
|
|
|
|
PS_FontExtraRec* afont_extra )
|
|
|
|
{
|
|
|
|
*afont_extra = ((T42_Face)face)->type1.font_extra;
|
|
|
|
return T42_Err_Ok;
|
|
|
|
}
|
2003-11-01 15:36:20 +01:00
|
|
|
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
static FT_Int
|
|
|
|
t42_ps_has_glyph_names( FT_Face face )
|
|
|
|
{
|
|
|
|
FT_UNUSED( face );
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-11-01 15:36:20 +01:00
|
|
|
|
2004-11-12 08:02:45 +01:00
|
|
|
static FT_Error
|
|
|
|
t42_ps_get_font_private( FT_Face face,
|
|
|
|
PS_PrivateRec* afont_private )
|
|
|
|
{
|
|
|
|
*afont_private = ((T42_Face)face)->type1.private_dict;
|
|
|
|
return T42_Err_Ok;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
static const FT_Service_PsInfoRec t42_service_ps_info =
|
|
|
|
{
|
2004-11-12 08:02:45 +01:00
|
|
|
(PS_GetFontInfoFunc) t42_ps_get_font_info,
|
2009-03-03 14:28:59 +01:00
|
|
|
(PS_GetFontExtraFunc) t42_ps_get_font_extra,
|
2004-11-12 08:02:45 +01:00
|
|
|
(PS_HasGlyphNamesFunc) t42_ps_has_glyph_names,
|
|
|
|
(PS_GetFontPrivateFunc)t42_ps_get_font_private
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* SERVICE LIST
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
static const FT_ServiceDescRec t42_services[] =
|
|
|
|
{
|
2003-09-29 22:33:37 +02:00
|
|
|
{ FT_SERVICE_ID_GLYPH_DICT, &t42_service_glyph_dict },
|
|
|
|
{ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t42_service_ps_font_name },
|
2003-11-01 15:36:20 +01:00
|
|
|
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &t42_service_ps_info },
|
2003-10-23 06:54:14 +02:00
|
|
|
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TYPE_42 },
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
2003-09-17 07:26:33 +02:00
|
|
|
|
2002-05-15 08:16:57 +02:00
|
|
|
static FT_Module_Interface
|
2002-06-07 09:23:06 +02:00
|
|
|
T42_Get_Interface( FT_Driver driver,
|
|
|
|
const FT_String* t42_interface )
|
2002-05-15 08:16:57 +02:00
|
|
|
{
|
|
|
|
FT_UNUSED( driver );
|
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
return ft_service_list_lookup( t42_services, t42_interface );
|
2002-05-15 08:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const FT_Driver_ClassRec t42_driver_class =
|
|
|
|
{
|
|
|
|
{
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_FONT_DRIVER |
|
|
|
|
FT_MODULE_DRIVER_SCALABLE |
|
2006-08-26 00:45:13 +02:00
|
|
|
#ifdef TT_USE_BYTECODE_INTERPRETER
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_DRIVER_HAS_HINTER,
|
2002-05-21 16:13:01 +02:00
|
|
|
#else
|
|
|
|
0,
|
|
|
|
#endif
|
2002-05-15 08:16:57 +02:00
|
|
|
|
|
|
|
sizeof ( T42_DriverRec ),
|
|
|
|
|
|
|
|
"type42",
|
|
|
|
0x10000L,
|
|
|
|
0x20000L,
|
|
|
|
|
|
|
|
0, /* format interface */
|
|
|
|
|
|
|
|
(FT_Module_Constructor)T42_Driver_Init,
|
|
|
|
(FT_Module_Destructor) T42_Driver_Done,
|
2002-06-07 09:23:06 +02:00
|
|
|
(FT_Module_Requester) T42_Get_Interface,
|
2002-05-15 08:16:57 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
sizeof ( T42_FaceRec ),
|
|
|
|
sizeof ( T42_SizeRec ),
|
|
|
|
sizeof ( T42_GlyphSlotRec ),
|
|
|
|
|
|
|
|
(FT_Face_InitFunc) T42_Face_Init,
|
|
|
|
(FT_Face_DoneFunc) T42_Face_Done,
|
|
|
|
(FT_Size_InitFunc) T42_Size_Init,
|
|
|
|
(FT_Size_DoneFunc) T42_Size_Done,
|
|
|
|
(FT_Slot_InitFunc) T42_GlyphSlot_Init,
|
|
|
|
(FT_Slot_DoneFunc) T42_GlyphSlot_Done,
|
|
|
|
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
|
|
|
ft_stub_set_char_sizes,
|
|
|
|
ft_stub_set_pixel_sizes,
|
|
|
|
#endif
|
2002-06-07 09:23:06 +02:00
|
|
|
(FT_Slot_LoadFunc) T42_GlyphSlot_Load,
|
2002-05-15 08:16:57 +02:00
|
|
|
|
|
|
|
(FT_Face_GetKerningFunc) 0,
|
|
|
|
(FT_Face_AttachFunc) 0,
|
|
|
|
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
(FT_Face_GetAdvancesFunc) 0,
|
|
|
|
(FT_Size_RequestFunc) T42_Size_Request,
|
|
|
|
(FT_Size_SelectFunc) T42_Size_Select
|
2002-05-15 08:16:57 +02:00
|
|
|
};
|
|
|
|
|
2002-06-08 08:47:18 +02:00
|
|
|
|
|
|
|
/* END */
|