* 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.
This commit is contained in:
parent
4795b36cf9
commit
7760595f84
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
2003-10-29 David Turner <david@freetype.org>
|
||||
|
||||
* 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-22 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/type1/t1load.c (parse_encoding): Handle `/Encoding [ ... ]'.
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
/* bdftypes.h
|
||||
|
||||
FreeType font driver for bdf fonts
|
||||
|
||||
Copyright (C) 2001, 2002 by
|
||||
Francesco Zappa Nardelli
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __BDFTYPES_H__
|
||||
#define __BDFTYPES_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_BDF_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
typedef struct BDF_Public_FaceRec_
|
||||
{
|
||||
FT_FaceRec root;
|
||||
|
||||
char* charset_encoding;
|
||||
char* charset_registry;
|
||||
|
||||
} BDF_Public_FaceRec, *BDF_Public_Face;
|
||||
|
||||
|
||||
typedef FT_Error (*BDF_GetPropertyFunc)( FT_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty );
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __BDFTYPES_H__ */
|
||||
|
||||
|
||||
/* END */
|
|
@ -241,6 +241,8 @@ FT_BEGIN_HEADER
|
|||
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_NAMES_H <freetype/internal/services/svpsname.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
|
||||
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
|
||||
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
|
||||
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
|
||||
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
|
||||
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
|
||||
#define FT_INTERNAL_TYPE42_TYPES_H <freetype/internal/t42types.h>
|
||||
#define FT_INTERNAL_CFF_TYPES_H <freetype/internal/cfftypes.h>
|
||||
#define FT_INTERNAL_BDF_TYPES_H <freetype/internal/bdftypes.h>
|
||||
|
||||
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_TYPE1_TYPES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
@ -651,7 +651,7 @@ FT_BEGIN_HEADER
|
|||
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1];
|
||||
T1_Decoder_Zone zone;
|
||||
|
||||
FT_Service_PsNames psnames; /* for seac */
|
||||
FT_Service_PsCMaps psnames; /* for seac */
|
||||
FT_UInt num_glyphs;
|
||||
FT_Byte** glyph_names;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef __SVBDF_H__
|
||||
#define __SVBDF_H__
|
||||
|
||||
#include FT_BDF_H
|
||||
#include FT_INTERNAL_SERVICE_H
|
||||
|
||||
|
||||
|
@ -27,7 +28,6 @@ FT_BEGIN_HEADER
|
|||
|
||||
#define FT_SERVICE_ID_BDF "bdf"
|
||||
|
||||
|
||||
typedef FT_Error
|
||||
(*FT_BDF_GetCharsetIdFunc)( FT_Face face,
|
||||
const char* *acharset_encoding,
|
||||
|
@ -47,7 +47,7 @@ FT_BEGIN_HEADER
|
|||
|
||||
/* */
|
||||
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* svpsname.h */
|
||||
/* svpscmap.h */
|
||||
/* */
|
||||
/* The FreeType glyph PS name services (specification). */
|
||||
/* The FreeType PostScript charmap service (specification) */
|
||||
/* */
|
||||
/* Copyright 2003 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
|
@ -16,14 +16,14 @@
|
|||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __SVPSNAME_H__
|
||||
#define __SVPSNAME_H__
|
||||
#ifndef __SVPSCMAP_H__
|
||||
#define __SVPSCMAP_H__
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
#define FT_SERVICE_ID_POSTSCRIPT_NAMES "postscript-names"
|
||||
#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
|
||||
|
||||
|
||||
/*
|
||||
|
@ -87,7 +87,7 @@ FT_BEGIN_HEADER
|
|||
FT_ULong unicode );
|
||||
|
||||
|
||||
FT_DEFINE_SERVICE( PsNames )
|
||||
FT_DEFINE_SERVICE( PsCMaps )
|
||||
{
|
||||
PS_Unicode_ValueFunc unicode_value;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef __SVPSINFO_H__
|
||||
#define __SVPSINFO_H__
|
||||
|
||||
#include FT_INTERNAL_SERVICE_H
|
||||
#include FT_INTERNAL_TYPE1_TYPES_H
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info"
|
||||
|
||||
typedef FT_Error (*PS_GetFontInfoFunc)( FT_Face face,
|
||||
PS_FontInfoRec* afont_info );
|
||||
|
||||
typedef FT_Int (*PS_HasGlyphNamesFunc)( FT_Face face );
|
||||
|
||||
FT_DEFINE_SERVICE( PsInfo )
|
||||
{
|
||||
PS_GetFontInfoFunc ps_get_font_info;
|
||||
PS_HasGlyphNamesFunc ps_has_glyph_names;
|
||||
};
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
|
||||
#endif /* __SVPSINFO_H__ */
|
|
@ -25,7 +25,7 @@
|
|||
#include FT_TYPE1_TABLES_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
||||
#include FT_INTERNAL_SERVICE_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
|
|
@ -1500,7 +1500,7 @@ FT_BEGIN_HEADER
|
|||
/* the basic TrueType tables in the face object */
|
||||
void* sfnt;
|
||||
|
||||
/* a typeless pointer to the FT_Service_PsNamesRec table used to */
|
||||
/* a typeless pointer to the FT_Service_PsCMapsRec table used to */
|
||||
/* handle glyph names <-> unicode & Mac values */
|
||||
void* psnames;
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_BDF_TYPES_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_SERVICE_BDF_H
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_TYPE1_TYPES_H
|
||||
#include FT_INTERNAL_TYPE42_TYPES_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_SERVICE_H
|
||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||
|
||||
|
||||
/* documentation is in t1tables.h */
|
||||
|
@ -28,58 +28,36 @@
|
|||
FT_Get_PS_Font_Info( FT_Face face,
|
||||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
PS_FontInfo font_info = NULL;
|
||||
FT_Error error = FT_Err_Invalid_Argument;
|
||||
const char* driver_name;
|
||||
FT_Error error = FT_Err_Invalid_Argument;
|
||||
|
||||
|
||||
if ( face && face->driver && face->driver->root.clazz )
|
||||
if ( face )
|
||||
{
|
||||
driver_name = face->driver->root.clazz->module_name;
|
||||
if ( ft_strcmp( driver_name, "type1" ) == 0 )
|
||||
font_info = &((T1_Face)face)->type1.font_info;
|
||||
else if ( ft_strcmp( driver_name, "t1cid" ) == 0 )
|
||||
font_info = &((CID_Face)face)->cid.font_info;
|
||||
else if ( ft_strcmp( driver_name, "type42" ) == 0 )
|
||||
font_info = &((T42_Face)face)->type1.font_info;
|
||||
}
|
||||
if ( font_info != NULL )
|
||||
{
|
||||
*afont_info = *font_info;
|
||||
error = FT_Err_Ok;
|
||||
}
|
||||
FT_Service_PsInfo service = NULL;
|
||||
|
||||
FT_FACE_FIND_SERVICE( service, face, POSTSCRIPT_INFO );
|
||||
|
||||
if ( service && service->ps_get_font_info )
|
||||
error = service->ps_get_font_info( face, afont_info );
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/* XXX: Bad hack, but I didn't want to change several drivers here. */
|
||||
|
||||
/* documentation is in t1tables.h */
|
||||
|
||||
FT_EXPORT_DEF( FT_Int )
|
||||
FT_Has_PS_Glyph_Names( FT_Face face )
|
||||
{
|
||||
FT_Int result = 0;
|
||||
const char* driver_name;
|
||||
FT_Int result = 0;
|
||||
FT_Service_PsInfo service = NULL;
|
||||
|
||||
|
||||
if ( face && face->driver && face->driver->root.clazz )
|
||||
if ( face )
|
||||
{
|
||||
/* Currently, only the type1, type42, and cff drivers provide */
|
||||
/* reliable glyph names... */
|
||||
FT_FACE_FIND_SERVICE( service, face, POSTSCRIPT_INFO );
|
||||
|
||||
/* We could probably hack the TrueType driver to recognize */
|
||||
/* certain cases where the glyph names are most certainly */
|
||||
/* correct (e.g. using a 20 or 22 format `post' table), but */
|
||||
/* this will probably happen later... */
|
||||
|
||||
driver_name = face->driver->root.clazz->module_name;
|
||||
result = ( ft_strcmp( driver_name, "type1" ) == 0 ||
|
||||
ft_strcmp( driver_name, "type42" ) == 0 ||
|
||||
ft_strcmp( driver_name, "cff" ) == 0 );
|
||||
if ( service && service->ps_has_glyph_names )
|
||||
result = service->ps_has_glyph_names( face );
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||
CFF_Font cff = (CFF_Font)face->extra.data;
|
||||
CFF_Charset charset = &cff->charset;
|
||||
FT_Service_PsNames psnames = (FT_Service_PsNames)cff->psnames;
|
||||
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
|
||||
|
||||
|
||||
cmap->num_pairs = 0;
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||
|
||||
#include "cffdrivr.h"
|
||||
#include "cffgload.h"
|
||||
|
@ -227,11 +228,11 @@
|
|||
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||
FT_String* gname;
|
||||
FT_UShort sid;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
FT_Error error;
|
||||
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
if ( !psnames )
|
||||
{
|
||||
FT_ERROR(( "cff_get_glyph_name:" ));
|
||||
|
@ -274,7 +275,7 @@
|
|||
{
|
||||
CFF_Font cff;
|
||||
CFF_Charset charset;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||
FT_String* name;
|
||||
FT_UShort sid;
|
||||
|
@ -285,7 +286,7 @@
|
|||
cff = (CFF_FontRec *)face->extra.data;
|
||||
charset = &cff->charset;
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
for ( i = 0; i < cff->num_glyphs; i++ )
|
||||
{
|
||||
sid = charset->sids[i];
|
||||
|
@ -314,6 +315,25 @@
|
|||
(FT_GlyphDict_NameIndexFunc)cff_get_name_index,
|
||||
};
|
||||
|
||||
/*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Int
|
||||
cff_ps_has_glyph_names( FT_Face face )
|
||||
{
|
||||
FT_UNUSED( face );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const FT_Service_PsInfoRec cff_service_ps_info =
|
||||
{
|
||||
(PS_GetFontInfoFunc) NULL, /* unsupported with CFF fonts */
|
||||
(PS_HasGlyphNamesFunc) cff_ps_has_glyph_names
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
@ -329,9 +349,10 @@
|
|||
|
||||
static const FT_ServiceDescRec cff_services[] =
|
||||
{
|
||||
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF },
|
||||
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF },
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info },
|
||||
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
|
||||
{ FT_SERVICE_ID_GLYPH_DICT, &cff_service_glyph_dict },
|
||||
{ FT_SERVICE_ID_GLYPH_DICT, &cff_service_glyph_dict },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
|
||||
#include "cffload.h"
|
||||
|
@ -1314,7 +1314,7 @@
|
|||
FT_LOCAL_DEF( FT_String* )
|
||||
cff_index_get_sid_string( CFF_Index idx,
|
||||
FT_UInt sid,
|
||||
FT_Service_PsNames psnames )
|
||||
FT_Service_PsCMaps psnames )
|
||||
{
|
||||
/* if it is not a standard string, return it */
|
||||
if ( sid > 390 )
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_CFF_TYPES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include "cfftypes.h"
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
@ -38,7 +38,7 @@ FT_BEGIN_HEADER
|
|||
FT_LOCAL( FT_String* )
|
||||
cff_index_get_sid_string( CFF_Index idx,
|
||||
FT_UInt sid,
|
||||
FT_Service_PsNames psnames );
|
||||
FT_Service_PsCMaps psnames );
|
||||
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
||||
#include "cffobjs.h"
|
||||
#include "cffload.h"
|
||||
|
@ -255,7 +255,7 @@
|
|||
{
|
||||
FT_Error error;
|
||||
SFNT_Service sfnt;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
PSHinter_Service pshinter;
|
||||
FT_Bool pure_cff = 1;
|
||||
FT_Bool sfnt_format = 0;
|
||||
|
@ -273,7 +273,7 @@
|
|||
if ( !sfnt )
|
||||
goto Bad_Format;
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
|
||||
pshinter = (PSHinter_Service)FT_Get_Module_Interface(
|
||||
face->root.driver->root.library, "pshinter" );
|
||||
|
@ -324,7 +324,7 @@
|
|||
/* FreeType 2 */
|
||||
}
|
||||
|
||||
/* now, load the CFF part of the file */
|
||||
/* now, load the CFF part of the file */
|
||||
error = face->goto_table( face, TTAG_CFF, stream, 0 );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_CFF_TYPES_H
|
||||
#include "cfftypes.h"
|
||||
#include FT_INTERNAL_TRUETYPE_TYPES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_CFF_TYPES_H
|
||||
#include "cfftypes.h"
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "cidgload.h"
|
||||
#include "cidload.h"
|
||||
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_AUX_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
||||
|
||||
|
@ -269,7 +269,7 @@
|
|||
FT_Parameter* params )
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
PSAux_Service psaux;
|
||||
PSHinter_Service pshinter;
|
||||
|
||||
|
@ -281,7 +281,7 @@
|
|||
|
||||
face->root.num_faces = 1;
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
|
||||
psaux = (PSAux_Service)face->psaux;
|
||||
if ( !psaux )
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||
#include FT_SERVICE_XFREE86_NAME_H
|
||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
|
@ -61,6 +62,26 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Error
|
||||
cid_ps_get_font_info( FT_Face face,
|
||||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
*afont_info = ((CID_Face)face)->cid.font_info;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const FT_Service_PsInfoRec cid_service_ps_info =
|
||||
{
|
||||
(PS_GetFontInfoFunc) cid_ps_get_font_info,
|
||||
(PS_HasGlyphNamesFunc) NULL /* unsupported with CID fonts */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* SERVICE LIST
|
||||
*
|
||||
|
@ -70,6 +91,7 @@
|
|||
{
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cid_service_ps_name },
|
||||
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CID },
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &cid_service_ps_info },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ int r )
|
|||
uInt bl, bd;
|
||||
inflate_huft *tl, *td;
|
||||
|
||||
inflate_trees_fixed(&bl, &bd, &tl, &td, z);
|
||||
inflate_trees_fixed(&bl, &bd, (const inflate_huft**)&tl,
|
||||
(const inflate_huft**)&td, z);
|
||||
s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
|
||||
if (s->sub.decode.codes == Z_NULL)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
FT_Int is_expert )
|
||||
{
|
||||
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
|
||||
FT_Service_PsNames psnames = (FT_Service_PsNames)face->psnames;
|
||||
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
|
||||
|
||||
|
||||
cmap->num_glyphs = face->type1.num_glyphs;
|
||||
|
@ -282,7 +282,7 @@
|
|||
FT_UInt count;
|
||||
T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
|
||||
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||
FT_Service_PsNames psnames = (FT_Service_PsNames)face->psnames;
|
||||
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
|
||||
|
||||
|
||||
cmap->num_pairs = 0;
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
{
|
||||
FT_UInt n;
|
||||
const FT_String* glyph_name;
|
||||
FT_Service_PsNames psnames = decoder->psnames;
|
||||
FT_Service_PsCMaps psnames = decoder->psnames;
|
||||
|
||||
|
||||
/* check range of standard char code */
|
||||
|
@ -1129,10 +1129,10 @@
|
|||
|
||||
/* retrieve PSNames interface from list of current modules */
|
||||
{
|
||||
FT_Service_PsNames psnames = 0;
|
||||
FT_Service_PsCMaps psnames = 0;
|
||||
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
if ( !psnames )
|
||||
{
|
||||
FT_ERROR(( "t1_decoder_init: " ));
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
#include "psmodule.h"
|
||||
#include "pstables.h"
|
||||
|
@ -335,7 +335,7 @@
|
|||
|
||||
|
||||
static
|
||||
const FT_Service_PsNamesRec psnames_interface =
|
||||
const FT_Service_PsCMapsRec pscmaps_interface =
|
||||
{
|
||||
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
|
||||
|
||||
|
@ -361,9 +361,9 @@
|
|||
};
|
||||
|
||||
|
||||
static const FT_ServiceDescRec psnames_services[] =
|
||||
static const FT_ServiceDescRec pscmaps_services[] =
|
||||
{
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_NAMES, &psnames_interface },
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_CMAPS, &pscmaps_interface },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -374,7 +374,7 @@
|
|||
{
|
||||
FT_UNUSED( module );
|
||||
|
||||
return ft_service_list_lookup( psnames_services, service_id );
|
||||
return ft_service_list_lookup( pscmaps_services, service_id );
|
||||
}
|
||||
|
||||
#endif /* !FT_CONFIG_OPTION_NO_POSTSCRIPT_NAMES */
|
||||
|
@ -397,7 +397,7 @@
|
|||
(FT_Module_Destructor) 0,
|
||||
(FT_Module_Requester) 0
|
||||
#else
|
||||
(void*)&psnames_interface, /* module specific interface */
|
||||
(void*)&pscmaps_interface, /* module specific interface */
|
||||
(FT_Module_Constructor)0,
|
||||
(FT_Module_Destructor) 0,
|
||||
(FT_Module_Requester) psnames_get_service
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include FT_INTERNAL_SFNT_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include "sferrors.h"
|
||||
|
||||
|
||||
|
@ -364,7 +364,7 @@
|
|||
face->goto_table = sfnt->goto_table;
|
||||
}
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );
|
||||
|
||||
/* check that we have a valid TrueType file */
|
||||
error = sfnt->load_sfnt_header( face, stream, face_index, &sfnt_header );
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
|
||||
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
|
||||
#define MAC_NAME( x ) ( (FT_String*)psnames->macintosh_name( x ) )
|
||||
|
||||
|
@ -441,7 +441,7 @@
|
|||
FT_Fixed format;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -452,7 +452,7 @@
|
|||
return SFNT_Err_Invalid_Glyph_Index;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
psnames = (FT_Service_PsNames)face->psnames;
|
||||
psnames = (FT_Service_PsCMaps)face->psnames;
|
||||
if ( !psnames )
|
||||
return SFNT_Err_Unimplemented_Feature;
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
#include FT_SERVICE_GLYPH_DICT_H
|
||||
#include FT_SERVICE_XFREE86_NAME_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
|
@ -135,6 +136,32 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* POSTSCRIPT INFO SERVICE
|
||||
*
|
||||
*/
|
||||
|
||||
static FT_Error
|
||||
t1_ps_get_font_info( FT_Face face,
|
||||
PS_FontInfoRec* afont_info )
|
||||
{
|
||||
*afont_info = ((T1_Face)face)->type1.font_info;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FT_Int
|
||||
t1_ps_has_glyph_names( FT_Face face )
|
||||
{
|
||||
FT_UNUSED( face );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const FT_Service_PsInfoRec t1_service_ps_info =
|
||||
{
|
||||
(PS_GetFontInfoFunc) t1_ps_get_font_info,
|
||||
(PS_HasGlyphNamesFunc) t1_ps_has_glyph_names
|
||||
};
|
||||
|
||||
/*
|
||||
* SERVICE LIST
|
||||
*
|
||||
|
@ -145,6 +172,7 @@
|
|||
{ FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t1_service_ps_name },
|
||||
{ FT_SERVICE_ID_GLYPH_DICT, &t1_service_glyph_dict },
|
||||
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TYPE_1 },
|
||||
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &t1_service_ps_info },
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
||||
{ FT_SERVICE_ID_MULTI_MASTERS, &t1_service_multi_masters },
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "t1afm.h"
|
||||
#endif
|
||||
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_AUX_H
|
||||
|
||||
|
||||
|
@ -276,7 +276,7 @@
|
|||
FT_Parameter* params )
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
PSAux_Service psaux;
|
||||
T1_Font type1 = &face->type1;
|
||||
PS_FontInfo info = &type1->font_info;
|
||||
|
@ -289,7 +289,7 @@
|
|||
|
||||
face->root.num_faces = 1;
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
face->psnames = psnames;
|
||||
|
||||
face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include FT_SERVICE_XFREE86_NAME_H
|
||||
#include FT_SERVICE_GLYPH_DICT_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT trace_t42
|
||||
|
@ -127,6 +128,33 @@
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static FT_Int
|
||||
t42_ps_has_glyph_names( FT_Face face )
|
||||
{
|
||||
FT_UNUSED( face );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const FT_Service_PsInfoRec t42_service_ps_info =
|
||||
{
|
||||
(PS_GetFontInfoFunc) t42_ps_get_font_info,
|
||||
(PS_HasGlyphNamesFunc) t42_ps_has_glyph_names
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* SERVICE LIST
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
FT_Parameter* params )
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Service_PsNames psnames;
|
||||
FT_Service_PsCMaps psnames;
|
||||
PSAux_Service psaux;
|
||||
FT_Face root = (FT_Face)&face->root;
|
||||
T1_Font type1 = &face->type1;
|
||||
|
@ -169,7 +169,7 @@
|
|||
face->ttf_face = NULL;
|
||||
face->root.num_faces = 1;
|
||||
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
|
||||
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
|
||||
face->psnames = psnames;
|
||||
|
||||
face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include FT_FREETYPE_H
|
||||
#include FT_TYPE1_TABLES_H
|
||||
#include FT_INTERNAL_TYPE1_TYPES_H
|
||||
#include FT_INTERNAL_TYPE42_TYPES_H
|
||||
#include "t42types.h"
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_DRIVER_H
|
||||
#include FT_SERVICE_POSTSCRIPT_NAMES_H
|
||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue