2002-02-22 19:28:11 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
2004-08-29 18:50:09 +02:00
|
|
|
/* ttcmap.h */
|
2002-02-22 19:28:11 +01:00
|
|
|
/* */
|
2004-08-29 18:50:09 +02:00
|
|
|
/* TrueType character mapping table (cmap) support (specification). */
|
2002-02-22 19:28:11 +01:00
|
|
|
/* */
|
2005-05-10 00:11:36 +02:00
|
|
|
/* Copyright 2002, 2003, 2004, 2005 by */
|
2002-02-22 19:28:11 +01: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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2004-08-29 18:50:09 +02:00
|
|
|
#ifndef __TTCMAP_H__
|
|
|
|
#define __TTCMAP_H__
|
2002-02-22 19:28:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_INTERNAL_TRUETYPE_TYPES_H
|
* include/freetype/internal/ftobjs.h: Don't include
FT_CONFIG_STANDARD_LIBRARY_H.
(FT_Validator, FT_VAlidationLevel, FT_ValidatorRec, FT_VALIDATOR,
ft_validator_init, ft_validator_run, ft_validator_error, FT_INVALID,
FT_INVALID_TOO_SHORT, FT_INVALID_OFFSET, FT_INVALID_FORMAT,
FT_INVALID_GLYPH_ID, FT_INVALID_DATA): Move to...
* include/freetype/internal/ftvalid.h: New file.
Make FT_INVALID return module-specific error codes.
* include/freetype/internal/internal.h (FT_INTERNAL_VALIDATE_H): New
macro.
* include/freetype/fterrors.h: Undefine FT_ERR_PREFIX only if
FT_KEEP_ERR_PREFIX isn't defined.
* src/base/ftobjs.c: Include FT_INTERNAL_VALIDATE_H.
* src/sfnt/ttcmap.h: Don't include FT_INTERNAL_OBJECTS_H but
FT_INTERNAL_VALIDATE_H.
* src/sfnt/ttcmap.c: Don't include FT_INTERNAL_OBJECTS_H but
FT_INTERNAL_VALIDATE_H.
Include sferrors.h before FT_INTERNAL_VALIDATE_H.
s/FT_Err_Ok/SFNT_Err_Ok/.
* src/sfnt/sferrors.h: Define FT_KEEP_ERR_PREFIX.
* src/type1/t1afm.c: Include t1errors.h.
2004-09-06 09:06:56 +02:00
|
|
|
#include FT_INTERNAL_VALIDATE_H
|
2003-12-17 15:28:22 +01:00
|
|
|
#include FT_SERVICE_TT_CMAP_H
|
2002-02-22 19:28:11 +01:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2005-11-29 12:32:53 +01:00
|
|
|
|
2005-11-30 19:47:49 +01:00
|
|
|
#define TT_CMAP_FLAG_UNSORTED 1
|
|
|
|
#define TT_CMAP_FLAG_OVERLAPPING 2
|
2005-11-29 12:32:53 +01:00
|
|
|
|
2002-03-31 20:48:24 +02:00
|
|
|
typedef struct TT_CMapRec_
|
2002-03-01 03:26:22 +01:00
|
|
|
{
|
|
|
|
FT_CMapRec cmap;
|
2002-03-31 20:48:24 +02:00
|
|
|
FT_Byte* data; /* pointer to in-memory cmap table */
|
2005-11-29 12:32:53 +01:00
|
|
|
FT_Int flags; /* for format 4 only */
|
2002-03-01 03:26:22 +01:00
|
|
|
|
|
|
|
} TT_CMapRec, *TT_CMap;
|
|
|
|
|
2002-03-31 20:48:24 +02:00
|
|
|
typedef const struct TT_CMap_ClassRec_* TT_CMap_Class;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
|
|
|
|
2002-03-31 20:48:24 +02:00
|
|
|
typedef FT_Error
|
|
|
|
(*TT_CMap_ValidateFunc)( FT_Byte* data,
|
|
|
|
FT_Validator valid );
|
|
|
|
|
|
|
|
typedef struct TT_CMap_ClassRec_
|
2002-03-01 03:26:22 +01:00
|
|
|
{
|
|
|
|
FT_CMap_ClassRec clazz;
|
|
|
|
FT_UInt format;
|
|
|
|
TT_CMap_ValidateFunc validate;
|
2003-12-17 15:28:22 +01:00
|
|
|
TT_CMap_Info_GetFunc get_cmap_info;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
|
|
|
} TT_CMap_ClassRec;
|
|
|
|
|
2002-03-31 20:48:24 +02:00
|
|
|
|
|
|
|
typedef struct TT_ValidatorRec_
|
2002-03-22 16:02:38 +01:00
|
|
|
{
|
2002-03-22 18:09:52 +01:00
|
|
|
FT_ValidatorRec validator;
|
|
|
|
FT_UInt num_glyphs;
|
* include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h,
src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c,
src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup,
FT_CONFIG_OPTION_USE_CMAPS is now the default
2002-07-17 23:52:20 +02:00
|
|
|
|
2002-03-22 16:02:38 +01:00
|
|
|
} TT_ValidatorRec, *TT_Validator;
|
|
|
|
|
2002-03-31 20:48:24 +02:00
|
|
|
|
|
|
|
#define TT_VALIDATOR( x ) ((TT_Validator)( x ))
|
|
|
|
#define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
|
2002-03-22 16:02:38 +01:00
|
|
|
|
2002-03-01 03:26:22 +01:00
|
|
|
|
|
|
|
FT_LOCAL( FT_Error )
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
tt_face_build_cmaps( TT_Face face );
|
2002-02-22 19:28:11 +01:00
|
|
|
|
2003-12-17 15:28:22 +01:00
|
|
|
/* used in tt-cmaps service */
|
|
|
|
FT_LOCAL( FT_Error )
|
|
|
|
tt_get_cmap_info( FT_CharMap charmap,
|
|
|
|
TT_CMapInfo *cmap_info );
|
|
|
|
|
2002-02-22 19:28:11 +01:00
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
2004-08-29 18:50:09 +02:00
|
|
|
#endif /* __TTCMAP_H__ */
|
2002-02-22 19:28:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|