2018-06-03 22:00:42 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* svpscmap.h
|
|
|
|
*
|
|
|
|
* The FreeType PostScript charmap service (specification).
|
|
|
|
*
|
2022-01-11 10:54:10 +01:00
|
|
|
* Copyright (C) 2003-2022 by
|
2018-06-03 22:00:42 +02:00
|
|
|
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
2003-09-30 07:39:35 +02:00
|
|
|
|
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#ifndef SVPSCMAP_H_
|
|
|
|
#define SVPSCMAP_H_
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/internal/ftobjs.h>
|
2006-01-12 09:12:27 +01:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
|
2003-09-29 22:33:37 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
|
* 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
|
|
|
#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
|
2003-09-30 07:39:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2018-06-03 22:00:42 +02:00
|
|
|
* Adobe glyph name to unicode value.
|
2003-09-30 07:39:35 +02:00
|
|
|
*/
|
2003-09-29 22:33:37 +02:00
|
|
|
typedef FT_UInt32
|
|
|
|
(*PS_Unicode_ValueFunc)( const char* glyph_name );
|
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
/*
|
2019-02-20 16:18:40 +01:00
|
|
|
* Macintosh name id to glyph name. `NULL` if invalid index.
|
2003-09-30 07:39:35 +02:00
|
|
|
*/
|
2003-09-29 22:33:37 +02:00
|
|
|
typedef const char*
|
2006-01-12 09:12:27 +01:00
|
|
|
(*PS_Macintosh_NameFunc)( FT_UInt name_index );
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
/*
|
2019-02-20 16:18:40 +01:00
|
|
|
* Adobe standard string ID to glyph name. `NULL` if invalid index.
|
2003-09-30 07:39:35 +02:00
|
|
|
*/
|
2003-09-29 22:33:37 +02:00
|
|
|
typedef const char*
|
2006-01-12 09:12:27 +01:00
|
|
|
(*PS_Adobe_Std_StringsFunc)( FT_UInt string_index );
|
|
|
|
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
/*
|
2018-08-24 18:52:30 +02:00
|
|
|
* Simple unicode -> glyph index charmap built from font glyph names table.
|
2003-09-30 07:39:35 +02:00
|
|
|
*/
|
2003-09-29 22:33:37 +02:00
|
|
|
typedef struct PS_UniMap_
|
|
|
|
{
|
2006-01-11 11:08:49 +01:00
|
|
|
FT_UInt32 unicode; /* bit 31 set: is glyph variant */
|
|
|
|
FT_UInt glyph_index;
|
2003-09-29 22:33:37 +02:00
|
|
|
|
|
|
|
} PS_UniMap;
|
|
|
|
|
|
|
|
|
2006-01-12 09:12:27 +01:00
|
|
|
typedef struct PS_UnicodesRec_* PS_Unicodes;
|
|
|
|
|
|
|
|
typedef struct PS_UnicodesRec_
|
2003-09-29 22:33:37 +02:00
|
|
|
{
|
2006-01-12 09:12:27 +01:00
|
|
|
FT_CMapRec cmap;
|
2003-09-29 22:33:37 +02:00
|
|
|
FT_UInt num_maps;
|
|
|
|
PS_UniMap* maps;
|
|
|
|
|
2006-01-12 09:12:27 +01:00
|
|
|
} PS_UnicodesRec;
|
|
|
|
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2006-01-12 09:12:27 +01:00
|
|
|
/*
|
2019-02-20 16:18:40 +01:00
|
|
|
* A function which returns a glyph name for a given index. Returns
|
|
|
|
* `NULL` if invalid index.
|
2006-01-12 09:12:27 +01:00
|
|
|
*/
|
|
|
|
typedef const char*
|
2006-06-06 10:14:14 +02:00
|
|
|
(*PS_GetGlyphNameFunc)( FT_Pointer data,
|
|
|
|
FT_UInt string_index );
|
|
|
|
|
|
|
|
/*
|
2018-06-03 22:00:42 +02:00
|
|
|
* A function used to release the glyph name returned by
|
|
|
|
* PS_GetGlyphNameFunc, when needed
|
2006-06-06 10:14:14 +02:00
|
|
|
*/
|
|
|
|
typedef void
|
|
|
|
(*PS_FreeGlyphNameFunc)( FT_Pointer data,
|
|
|
|
const char* name );
|
2003-09-29 22:33:37 +02:00
|
|
|
|
|
|
|
typedef FT_Error
|
2006-06-06 10:14:14 +02:00
|
|
|
(*PS_Unicodes_InitFunc)( FT_Memory memory,
|
|
|
|
PS_Unicodes unicodes,
|
|
|
|
FT_UInt num_glyphs,
|
|
|
|
PS_GetGlyphNameFunc get_glyph_name,
|
|
|
|
PS_FreeGlyphNameFunc free_glyph_name,
|
|
|
|
FT_Pointer glyph_data );
|
2003-09-29 22:33:37 +02:00
|
|
|
|
|
|
|
typedef FT_UInt
|
2006-01-12 09:12:27 +01:00
|
|
|
(*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes,
|
|
|
|
FT_UInt32 unicode );
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2009-07-31 17:32:09 +02:00
|
|
|
typedef FT_UInt32
|
2006-01-12 09:12:27 +01:00
|
|
|
(*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes,
|
|
|
|
FT_UInt32 *unicode );
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2003-09-30 07:39:35 +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
|
|
|
FT_DEFINE_SERVICE( PsCMaps )
|
2003-09-29 22:33:37 +02:00
|
|
|
{
|
|
|
|
PS_Unicode_ValueFunc unicode_value;
|
|
|
|
|
|
|
|
PS_Unicodes_InitFunc unicodes_init;
|
|
|
|
PS_Unicodes_CharIndexFunc unicodes_char_index;
|
|
|
|
PS_Unicodes_CharNextFunc unicodes_char_next;
|
|
|
|
|
2006-01-12 09:12:27 +01:00
|
|
|
PS_Macintosh_NameFunc macintosh_name;
|
|
|
|
PS_Adobe_Std_StringsFunc adobe_std_strings;
|
2003-09-29 22:33:37 +02:00
|
|
|
const unsigned short* adobe_std_encoding;
|
|
|
|
const unsigned short* adobe_expert_encoding;
|
|
|
|
};
|
|
|
|
|
2009-04-05 17:18:03 +02:00
|
|
|
|
2012-02-06 22:42:11 +01:00
|
|
|
#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
|
|
|
|
unicode_value_, \
|
|
|
|
unicodes_init_, \
|
|
|
|
unicodes_char_index_, \
|
|
|
|
unicodes_char_next_, \
|
|
|
|
macintosh_name_, \
|
|
|
|
adobe_std_strings_, \
|
|
|
|
adobe_std_encoding_, \
|
|
|
|
adobe_expert_encoding_ ) \
|
|
|
|
static const FT_Service_PsCMapsRec class_ = \
|
|
|
|
{ \
|
|
|
|
unicode_value_, unicodes_init_, \
|
|
|
|
unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
|
|
|
|
adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
|
2009-04-05 17:18:03 +02:00
|
|
|
};
|
|
|
|
|
2003-11-01 15:36:20 +01:00
|
|
|
/* */
|
2003-09-29 22:33:37 +02:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
|
2003-09-29 22:33:37 +02:00
|
|
|
FT_END_HEADER
|
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#endif /* SVPSCMAP_H_ */
|
2003-11-01 15:36:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|