forked from minhngoc25a/freetype2
* docs/CHANGES: Updated.
Add new service for getting the ROS from a CID font. * include/freetype/config/ftheader.h (FT_CID_H): New macro. * include/freetype/ftcid.h: New file. * include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro. * include/freetype/internal/services/svcid.h: New file. * src/base/ftcid.c: New file. * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H. (cff_get_ros): New function. (cff_service_cid_info): New service structure. (cff_services): Register it. * src/cff/cffload.c (cff_font_done): Free registry and ordering. * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'. * modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
This commit is contained in:
parent
2f10956744
commit
ef915c36f4
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
||||||
|
2007-07-16 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* docs/CHANGES: Updated.
|
||||||
|
|
||||||
|
2007-07-16 Derek Clegg <dclegg@apple.com>
|
||||||
|
|
||||||
|
Add new service for getting the ROS from a CID font.
|
||||||
|
|
||||||
|
* include/freetype/config/ftheader.h (FT_CID_H): New macro.
|
||||||
|
* include/freetype/ftcid.h: New file.
|
||||||
|
|
||||||
|
* include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
|
||||||
|
* include/freetype/internal/services/svcid.h: New file.
|
||||||
|
|
||||||
|
* src/base/ftcid.c: New file.
|
||||||
|
|
||||||
|
* src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
|
||||||
|
(cff_get_ros): New function.
|
||||||
|
(cff_service_cid_info): New service structure.
|
||||||
|
(cff_services): Register it.
|
||||||
|
|
||||||
|
* src/cff/cffload.c (cff_font_done): Free registry and ordering.
|
||||||
|
|
||||||
|
* src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.
|
||||||
|
|
||||||
|
* modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
|
||||||
|
|
||||||
2007-07-11 Derek Clegg <dclegg@apple.com>
|
2007-07-11 Derek Clegg <dclegg@apple.com>
|
||||||
|
|
||||||
Add support for postscript name service to CFF driver.
|
Add support for postscript name service to CFF driver.
|
||||||
|
|
12
docs/CHANGES
12
docs/CHANGES
|
@ -1,4 +1,16 @@
|
||||||
|
|
||||||
|
CHANGES BETWEEN 2.3.6 and 2.3.5
|
||||||
|
|
||||||
|
II. IMPORTANT CHANGES
|
||||||
|
|
||||||
|
- The new function `FT_Get_CID_Registry_Ordering_Supplement' gives
|
||||||
|
access to those fields in a CID-keyed font. The code has been
|
||||||
|
contributed by Derek Clegg.
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
|
||||||
CHANGES BETWEEN 2.3.5 and 2.3.4
|
CHANGES BETWEEN 2.3.5 and 2.3.4
|
||||||
|
|
||||||
I. IMPORTANT BUG FIXES
|
I. IMPORTANT BUG FIXES
|
||||||
|
|
|
@ -383,6 +383,20 @@
|
||||||
#define FT_BDF_H <freetype/ftbdf.h>
|
#define FT_BDF_H <freetype/ftbdf.h>
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
*
|
||||||
|
* @macro:
|
||||||
|
* FT_CID_H
|
||||||
|
*
|
||||||
|
* @description:
|
||||||
|
* A macro used in #include statements to name the file containing the
|
||||||
|
* definitions of an API which access CID font information from a
|
||||||
|
* face.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define FT_CID_H <freetype/ftcid.h>
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* @macro:
|
* @macro:
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
/* type1_tables */
|
/* type1_tables */
|
||||||
/* sfnt_names */
|
/* sfnt_names */
|
||||||
/* bdf_fonts */
|
/* bdf_fonts */
|
||||||
|
/* cid_fonts */
|
||||||
/* pfr_fonts */
|
/* pfr_fonts */
|
||||||
/* winfnt_fonts */
|
/* winfnt_fonts */
|
||||||
/* font_formats */
|
/* font_formats */
|
||||||
|
|
|
@ -301,6 +301,7 @@ FT_BEGIN_HEADER
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
|
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
|
||||||
|
#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
|
||||||
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
|
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
|
||||||
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
|
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
|
||||||
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
||||||
|
|
|
@ -152,6 +152,11 @@ BASE_EXTENSIONS += ftbbox.c
|
||||||
# See include/freetype/ftbdf.h for the API.
|
# See include/freetype/ftbdf.h for the API.
|
||||||
BASE_EXTENSIONS += ftbdf.c
|
BASE_EXTENSIONS += ftbdf.c
|
||||||
|
|
||||||
|
# Access CID font information.
|
||||||
|
#
|
||||||
|
# See include/freetype/ftcid.h for the API.
|
||||||
|
BASE_EXTENSIONS += ftcid.c
|
||||||
|
|
||||||
# Utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp bitmaps into
|
# Utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp bitmaps into
|
||||||
# 8bpp format, and for emboldening of bitmap glyphs.
|
# 8bpp format, and for emboldening of bitmap glyphs.
|
||||||
#
|
#
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include FT_INTERNAL_STREAM_H
|
#include FT_INTERNAL_STREAM_H
|
||||||
#include FT_INTERNAL_SFNT_H
|
#include FT_INTERNAL_SFNT_H
|
||||||
#include FT_TRUETYPE_IDS_H
|
#include FT_TRUETYPE_IDS_H
|
||||||
|
#include FT_SERVICE_CID_H
|
||||||
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
|
||||||
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
||||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||||
|
@ -420,6 +421,66 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CID INFO SERVICE
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static FT_Error
|
||||||
|
cff_get_ros( CFF_Face face,
|
||||||
|
const char* *registry,
|
||||||
|
const char* *ordering,
|
||||||
|
FT_Int *supplement )
|
||||||
|
{
|
||||||
|
FT_Error error = CFF_Err_Ok;
|
||||||
|
CFF_Font cff = (CFF_Font)face->extra.data;
|
||||||
|
|
||||||
|
|
||||||
|
if ( cff )
|
||||||
|
{
|
||||||
|
CFF_FontRecDict dict = &cff->top_font.font_dict;
|
||||||
|
FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
|
||||||
|
|
||||||
|
|
||||||
|
if ( dict->cid_registry == 0xFFFFU )
|
||||||
|
{
|
||||||
|
error = CFF_Err_Invalid_Argument;
|
||||||
|
goto Fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( registry )
|
||||||
|
{
|
||||||
|
if ( cff->registry == NULL )
|
||||||
|
cff->registry = cff_index_get_sid_string( &cff->string_index,
|
||||||
|
dict->cid_registry,
|
||||||
|
psnames );
|
||||||
|
*registry = cff->registry;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ordering )
|
||||||
|
{
|
||||||
|
if ( cff->ordering == NULL )
|
||||||
|
cff->ordering = cff_index_get_sid_string( &cff->string_index,
|
||||||
|
dict->cid_ordering,
|
||||||
|
psnames );
|
||||||
|
*ordering = cff->ordering;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( supplement )
|
||||||
|
*supplement = dict->cid_supplement;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Fail:
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const FT_Service_CIDRec cff_service_cid_info =
|
||||||
|
{
|
||||||
|
(FT_CID_GetRegistryOrderingSupplementFunc)cff_get_ros
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -441,6 +502,7 @@
|
||||||
{ FT_SERVICE_ID_GLYPH_DICT, &cff_service_glyph_dict },
|
{ FT_SERVICE_ID_GLYPH_DICT, &cff_service_glyph_dict },
|
||||||
#endif
|
#endif
|
||||||
{ FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info },
|
{ FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info },
|
||||||
|
{ FT_SERVICE_ID_CID, &cff_service_cid_info },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1590,6 +1590,9 @@
|
||||||
FT_FREE( font->font_info );
|
FT_FREE( font->font_info );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FT_FREE( font->registry );
|
||||||
|
FT_FREE( font->ordering );
|
||||||
|
|
||||||
FT_FREE( font->global_subrs );
|
FT_FREE( font->global_subrs );
|
||||||
FT_FREE( font->font_name );
|
FT_FREE( font->font_name );
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,6 +259,10 @@ FT_BEGIN_HEADER
|
||||||
/* since version 2.3.0 */
|
/* since version 2.3.0 */
|
||||||
PS_FontInfoRec* font_info; /* font info dictionary */
|
PS_FontInfoRec* font_info; /* font info dictionary */
|
||||||
|
|
||||||
|
/* since version 2.3.6 */
|
||||||
|
FT_String* registry;
|
||||||
|
FT_String* ordering;
|
||||||
|
|
||||||
} CFF_FontRec, *CFF_Font;
|
} CFF_FontRec, *CFF_Font;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue