ef512e3ec6
started with `StartData' in CID-keyed Type 1 fonts. * include/freetype/internal/t1types.h (CID_FaceRec): Add new members `binary_data' and `cid_stream'. * src/cid/cidload.c (cid_read_subrs): Use `face->cid_stream'. (cid_hex_to_binary): New auxiliary function. (cid_face_open): Add new argument `face_index' to return quickly if less than zero. Updated all callers. Call `cid_hex_to_binary', then open and assign memory stream to `face->cid_stream' if `parser->binary_length' is non-zero. * src/cid/cidload.h: Updated. * src/cid/cidobjs.c (cid_face_done): Free `binary_data' and `cid_stream'. * src/cid/cidparse.c (cid_parser_new): Check arguments to `StartData' and set parser->binary_length accordingly. * src/cid/cidparse.h (CID_Parser): New member `binary_length'. * src/cid/cidgload.c (cid_load_glyph): Use `face->cid_stream'. * docs/CHANGES: Updated. include/freetype/config/ftstdlib.h (ft_atoi): Replaced with... (ft_atol): This. * src/base/ftdbgmem.c: s/atol/ft_atol/. * src/type42/t42drivr.c: s/ft_atoi/ft_atol/.
54 lines
1.8 KiB
C
54 lines
1.8 KiB
C
/***************************************************************************/
|
|
/* */
|
|
/* cidload.h */
|
|
/* */
|
|
/* CID-keyed Type1 font loader (specification). */
|
|
/* */
|
|
/* Copyright 1996-2001, 2002, 2003, 2004 by */
|
|
/* 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. */
|
|
/* */
|
|
/***************************************************************************/
|
|
|
|
|
|
#ifndef __CIDLOAD_H__
|
|
#define __CIDLOAD_H__
|
|
|
|
|
|
#include <ft2build.h>
|
|
#include FT_INTERNAL_STREAM_H
|
|
#include "cidparse.h"
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
typedef struct CID_Loader_
|
|
{
|
|
CID_Parser parser; /* parser used to read the stream */
|
|
FT_Int num_chars; /* number of characters in encoding */
|
|
|
|
} CID_Loader;
|
|
|
|
|
|
FT_LOCAL( FT_Long )
|
|
cid_get_offset( FT_Byte** start,
|
|
FT_Byte offsize );
|
|
|
|
FT_LOCAL( FT_Error )
|
|
cid_face_open( CID_Face face,
|
|
FT_Int face_index );
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
#endif /* __CIDLOAD_H__ */
|
|
|
|
|
|
/* END */
|