1999-12-17 00:11:37 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftobjs.h */
|
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* The FreeType private base classes (specification). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2015-01-17 20:41:43 +01:00
|
|
|
/* Copyright 1996-2015 by */
|
2000-07-14 08:16:47 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-14 08:16:47 +02:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* This file contains the definition of all internal FreeType classes. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#ifndef __FTOBJS_H__
|
|
|
|
#define __FTOBJS_H__
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-04 23:53:55 +01:00
|
|
|
#include <ft2build.h>
|
2000-12-01 00:12:33 +01:00
|
|
|
#include FT_RENDER_H
|
2001-10-07 15:30:26 +02:00
|
|
|
#include FT_SIZES_H
|
2006-11-10 17:49:42 +01:00
|
|
|
#include FT_LCD_FILTER_H
|
2000-12-01 00:12:33 +01:00
|
|
|
#include FT_INTERNAL_MEMORY_H
|
2002-02-24 03:59:24 +01:00
|
|
|
#include FT_INTERNAL_GLYPH_LOADER_H
|
2000-12-01 00:12:33 +01:00
|
|
|
#include FT_INTERNAL_DRIVER_H
|
|
|
|
#include FT_INTERNAL_AUTOHINT_H
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
#include FT_INTERNAL_SERVICE_H
|
2009-04-05 16:59:26 +02:00
|
|
|
#include FT_INTERNAL_PIC_H
|
2000-12-09 01:45:38 +01:00
|
|
|
|
2002-08-01 17:29:17 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_INCREMENTAL
|
|
|
|
#include FT_INCREMENTAL_H
|
|
|
|
#endif
|
|
|
|
|
2002-08-06 23:47:40 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_BEGIN_HEADER
|
2000-07-05 06:32:02 +02:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Some generic definitions. */
|
|
|
|
/* */
|
|
|
|
#ifndef TRUE
|
|
|
|
#define TRUE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FALSE
|
|
|
|
#define FALSE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL (void*)0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* The min and max functions missing in C. As usual, be careful not to */
|
2004-03-05 10:26:24 +01:00
|
|
|
/* write things like FT_MIN( a++, b++ ) to avoid side effects. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2004-03-05 10:26:24 +01:00
|
|
|
#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
|
|
|
|
#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2004-03-05 10:26:24 +01:00
|
|
|
#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2014-10-30 03:24:24 +01:00
|
|
|
/*
|
|
|
|
* Approximate sqrt(x*x+y*y) using the `alpha max plus beta min'
|
|
|
|
* algorithm. We use alpha = 1, beta = 3/8, giving us results with a
|
|
|
|
* largest error less than 7% compared to the exact value.
|
|
|
|
*/
|
|
|
|
#define FT_HYPOT( x, y ) \
|
|
|
|
( x = FT_ABS( x ), \
|
|
|
|
y = FT_ABS( y ), \
|
|
|
|
x > y ? x + ( 3 * y >> 3 ) \
|
|
|
|
: y + ( 3 * x >> 3 ) )
|
2003-12-24 02:10:46 +01:00
|
|
|
|
2015-02-16 11:31:32 +01:00
|
|
|
/* we use the TYPEOF macro to suppress signedness compilation warnings */
|
|
|
|
#define FT_PAD_FLOOR( x, n ) ( (x) & ~TYPEOF( x, (n)-1 ) )
|
2003-12-24 14:37:58 +01:00
|
|
|
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
|
|
|
|
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
|
|
|
|
|
2015-02-16 11:31:32 +01:00
|
|
|
#define FT_PIX_FLOOR( x ) ( (x) & ~TYPEOF( x, 63 ) )
|
2003-12-24 14:37:58 +01:00
|
|
|
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
|
|
|
|
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
|
|
|
|
|
2000-11-04 09:33:38 +01:00
|
|
|
|
2007-05-15 13:55:37 +02:00
|
|
|
/*
|
|
|
|
* character classification functions -- since these are used to parse
|
|
|
|
* font files, we must not use those in <ctypes.h> which are
|
|
|
|
* locale-dependent
|
|
|
|
*/
|
|
|
|
#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U )
|
2007-05-15 12:54:10 +02:00
|
|
|
|
2007-05-15 13:55:37 +02:00
|
|
|
#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \
|
|
|
|
( (unsigned)(x) - 'a' ) < 6U || \
|
|
|
|
( (unsigned)(x) - 'A' ) < 6U )
|
2007-05-15 12:54:10 +02:00
|
|
|
|
2007-05-15 13:55:37 +02:00
|
|
|
/* the next two macros assume ASCII representation */
|
|
|
|
#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U )
|
|
|
|
#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U )
|
2007-05-15 12:54:10 +02:00
|
|
|
|
2007-05-15 13:55:37 +02:00
|
|
|
#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) )
|
|
|
|
#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) )
|
2007-05-15 12:54:10 +02:00
|
|
|
|
|
|
|
|
2002-02-27 22:25:47 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** C H A R M A P S ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* handle to internal charmap object */
|
2002-02-27 22:25:47 +01:00
|
|
|
typedef struct FT_CMapRec_* FT_CMap;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* handle to charmap class structure */
|
|
|
|
typedef const struct FT_CMap_ClassRec_* FT_CMap_Class;
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* internal charmap object structure */
|
|
|
|
typedef struct FT_CMapRec_
|
2002-02-27 22:25:47 +01:00
|
|
|
{
|
|
|
|
FT_CharMapRec charmap;
|
|
|
|
FT_CMap_Class clazz;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
2002-02-27 22:25:47 +01:00
|
|
|
} FT_CMapRec;
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* typecase any pointer to a charmap handle */
|
|
|
|
#define FT_CMAP( x ) ((FT_CMap)( x ))
|
|
|
|
|
|
|
|
/* obvious macros */
|
|
|
|
#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
|
|
|
|
#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id
|
|
|
|
#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding
|
|
|
|
#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face
|
2002-02-27 22:25:47 +01:00
|
|
|
|
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* class method definitions */
|
|
|
|
typedef FT_Error
|
|
|
|
(*FT_CMap_InitFunc)( FT_CMap cmap,
|
|
|
|
FT_Pointer init_data );
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
typedef void
|
|
|
|
(*FT_CMap_DoneFunc)( FT_CMap cmap );
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
typedef FT_UInt
|
|
|
|
(*FT_CMap_CharIndexFunc)( FT_CMap cmap,
|
|
|
|
FT_UInt32 char_code );
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
typedef FT_UInt
|
|
|
|
(*FT_CMap_CharNextFunc)( FT_CMap cmap,
|
|
|
|
FT_UInt32 *achar_code );
|
2002-02-27 22:25:47 +01:00
|
|
|
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
typedef FT_UInt
|
|
|
|
(*FT_CMap_CharVarIndexFunc)( FT_CMap cmap,
|
|
|
|
FT_CMap unicode_cmap,
|
|
|
|
FT_UInt32 char_code,
|
|
|
|
FT_UInt32 variant_selector );
|
|
|
|
|
|
|
|
typedef FT_Bool
|
|
|
|
(*FT_CMap_CharVarIsDefaultFunc)( FT_CMap cmap,
|
|
|
|
FT_UInt32 char_code,
|
|
|
|
FT_UInt32 variant_selector );
|
|
|
|
|
|
|
|
typedef FT_UInt32 *
|
|
|
|
(*FT_CMap_VariantListFunc)( FT_CMap cmap,
|
|
|
|
FT_Memory mem );
|
|
|
|
|
|
|
|
typedef FT_UInt32 *
|
|
|
|
(*FT_CMap_CharVariantListFunc)( FT_CMap cmap,
|
|
|
|
FT_Memory mem,
|
|
|
|
FT_UInt32 char_code );
|
|
|
|
|
|
|
|
typedef FT_UInt32 *
|
|
|
|
(*FT_CMap_VariantCharListFunc)( FT_CMap cmap,
|
|
|
|
FT_Memory mem,
|
|
|
|
FT_UInt32 variant_selector );
|
|
|
|
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
typedef struct FT_CMap_ClassRec_
|
2002-02-27 22:25:47 +01:00
|
|
|
{
|
* include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/psaux.h, src/cid/cidgload.c,
src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
Many casts and slight argument type changes to make it work with
a 16bit compiler.
2003-06-05 06:31:05 +02:00
|
|
|
FT_ULong size;
|
2002-02-27 22:25:47 +01:00
|
|
|
FT_CMap_InitFunc init;
|
|
|
|
FT_CMap_DoneFunc done;
|
|
|
|
FT_CMap_CharIndexFunc char_index;
|
|
|
|
FT_CMap_CharNextFunc char_next;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.
* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.
* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.
* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.
* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.
* docs/CHANGES: Mention cmap 14 support.
2007-10-15 19:21:32 +02:00
|
|
|
/* Subsequent entries are special ones for format 14 -- the variant */
|
|
|
|
/* selector subtable which behaves like no other */
|
|
|
|
|
|
|
|
FT_CMap_CharVarIndexFunc char_var_index;
|
|
|
|
FT_CMap_CharVarIsDefaultFunc char_var_default;
|
|
|
|
FT_CMap_VariantListFunc variant_list;
|
|
|
|
FT_CMap_CharVariantListFunc charvariant_list;
|
|
|
|
FT_CMap_VariantCharListFunc variantchar_list;
|
|
|
|
|
2002-02-27 22:25:47 +01:00
|
|
|
} FT_CMap_ClassRec;
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_CMAP_CLASS( class_ ) \
|
|
|
|
FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
|
|
|
|
|
|
|
|
#define FT_DEFINE_CMAP_CLASS( \
|
|
|
|
class_, \
|
|
|
|
size_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
char_index_, \
|
|
|
|
char_next_, \
|
|
|
|
char_var_index_, \
|
|
|
|
char_var_default_, \
|
|
|
|
variant_list_, \
|
|
|
|
charvariant_list_, \
|
|
|
|
variantchar_list_ ) \
|
|
|
|
FT_CALLBACK_TABLE_DEF \
|
|
|
|
const FT_CMap_ClassRec class_ = \
|
|
|
|
{ \
|
|
|
|
size_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
char_index_, \
|
|
|
|
char_next_, \
|
|
|
|
char_var_index_, \
|
|
|
|
char_var_default_, \
|
|
|
|
variant_list_, \
|
|
|
|
charvariant_list_, \
|
|
|
|
variantchar_list_ \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_CMAP_CLASS( class_ ) \
|
|
|
|
void \
|
|
|
|
FT_Init_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_CMap_ClassRec* clazz );
|
|
|
|
|
|
|
|
#define FT_DEFINE_CMAP_CLASS( \
|
|
|
|
class_, \
|
|
|
|
size_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
char_index_, \
|
|
|
|
char_next_, \
|
|
|
|
char_var_index_, \
|
|
|
|
char_var_default_, \
|
|
|
|
variant_list_, \
|
|
|
|
charvariant_list_, \
|
|
|
|
variantchar_list_ ) \
|
|
|
|
void \
|
|
|
|
FT_Init_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_CMap_ClassRec* clazz ) \
|
|
|
|
{ \
|
|
|
|
FT_UNUSED( library ); \
|
|
|
|
\
|
|
|
|
clazz->size = size_; \
|
|
|
|
clazz->init = init_; \
|
|
|
|
clazz->done = done_; \
|
|
|
|
clazz->char_index = char_index_; \
|
|
|
|
clazz->char_next = char_next_; \
|
|
|
|
clazz->char_var_index = char_var_index_; \
|
|
|
|
clazz->char_var_default = char_var_default_; \
|
|
|
|
clazz->variant_list = variant_list_; \
|
|
|
|
clazz->charvariant_list = charvariant_list_; \
|
|
|
|
clazz->variantchar_list = variantchar_list_; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2002-02-27 22:25:47 +01:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
/* create a new charmap and add it to charmap->face */
|
2002-02-28 17:10:29 +01:00
|
|
|
FT_BASE( FT_Error )
|
|
|
|
FT_CMap_New( FT_CMap_Class clazz,
|
2002-03-01 03:26:22 +01:00
|
|
|
FT_Pointer init_data,
|
2002-02-28 17:10:29 +01:00
|
|
|
FT_CharMap charmap,
|
|
|
|
FT_CMap *acmap );
|
|
|
|
|
2005-05-27 08:01:28 +02:00
|
|
|
/* destroy a charmap and remove it from face's list */
|
2002-02-28 17:10:29 +01:00
|
|
|
FT_BASE( void )
|
|
|
|
FT_CMap_Done( FT_CMap cmap );
|
|
|
|
|
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Face_InternalRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* This structure contains the internal fields of each FT_Face */
|
|
|
|
/* object. These fields may change between different releases of */
|
|
|
|
/* FreeType. */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2003-09-16 09:57:25 +02:00
|
|
|
/* max_points :: */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* The maximum number of points used to store the vectorial outline */
|
2003-09-16 09:57:25 +02:00
|
|
|
/* of any glyph in this face. If this value cannot be known in */
|
|
|
|
/* advance, or if the face isn't scalable, this should be set to 0. */
|
|
|
|
/* Only relevant for scalable formats. */
|
|
|
|
/* */
|
|
|
|
/* max_contours :: */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* The maximum number of contours used to store the vectorial */
|
2003-09-16 09:57:25 +02:00
|
|
|
/* outline of any glyph in this face. If this value cannot be */
|
|
|
|
/* known in advance, or if the face isn't scalable, this should be */
|
|
|
|
/* set to 0. Only relevant for scalable formats. */
|
|
|
|
/* */
|
|
|
|
/* transform_matrix :: */
|
|
|
|
/* A 2x2 matrix of 16.16 coefficients used to transform glyph */
|
|
|
|
/* outlines after they are loaded from the font. Only used by the */
|
|
|
|
/* convenience functions. */
|
|
|
|
/* */
|
|
|
|
/* transform_delta :: */
|
|
|
|
/* A translation vector used to transform glyph outlines after they */
|
|
|
|
/* are loaded from the font. Only used by the convenience */
|
|
|
|
/* functions. */
|
|
|
|
/* */
|
|
|
|
/* transform_flags :: */
|
|
|
|
/* Some flags used to classify the transform. Only used by the */
|
|
|
|
/* convenience functions. */
|
|
|
|
/* */
|
|
|
|
/* services :: */
|
|
|
|
/* A cache for frequently used services. It should be only */
|
|
|
|
/* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* */
|
2002-08-06 23:47:40 +02:00
|
|
|
/* incremental_interface :: */
|
2003-09-16 09:57:25 +02:00
|
|
|
/* If non-null, the interface through which glyph data and metrics */
|
|
|
|
/* are loaded incrementally for faces that do not provide all of */
|
|
|
|
/* this data when first opened. This field exists only if */
|
|
|
|
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
|
2002-08-01 17:29:17 +02:00
|
|
|
/* */
|
2006-10-01 02:09:35 +02:00
|
|
|
/* ignore_unpatented_hinter :: */
|
2006-10-03 10:43:42 +02:00
|
|
|
/* This boolean flag instructs the glyph loader to ignore the */
|
|
|
|
/* native font hinter, if one is found. This is exclusively used */
|
|
|
|
/* in the case when the unpatented hinter is compiled within the */
|
|
|
|
/* library. */
|
2006-08-26 00:45:13 +02:00
|
|
|
/* */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* refcount :: */
|
|
|
|
/* A counter initialized to~1 at the time an @FT_Face structure is */
|
|
|
|
/* created. @FT_Reference_Face increments this counter, and */
|
|
|
|
/* @FT_Done_Face only destroys a face if the counter is~1, */
|
|
|
|
/* otherwise it simply decrements it. */
|
|
|
|
/* */
|
2000-11-04 09:33:38 +01:00
|
|
|
typedef struct FT_Face_InternalRec_
|
2000-11-04 03:52:02 +01:00
|
|
|
{
|
2003-09-16 09:57:25 +02:00
|
|
|
FT_Matrix transform_matrix;
|
|
|
|
FT_Vector transform_delta;
|
|
|
|
FT_Int transform_flags;
|
2000-11-04 03:52:02 +01:00
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
FT_ServiceCacheRec services;
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2002-08-01 17:29:17 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_INCREMENTAL
|
|
|
|
FT_Incremental_InterfaceRec* incremental_interface;
|
|
|
|
#endif
|
|
|
|
|
2006-10-01 02:09:35 +02:00
|
|
|
FT_Bool ignore_unpatented_hinter;
|
2013-06-18 09:35:34 +02:00
|
|
|
FT_Int refcount;
|
2006-08-26 00:45:13 +02:00
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
} FT_Face_InternalRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Slot_InternalRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* This structure contains the internal fields of each FT_GlyphSlot */
|
|
|
|
/* object. These fields may change between different releases of */
|
|
|
|
/* FreeType. */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* loader :: The glyph loader object used to load outlines */
|
|
|
|
/* into the glyph slot. */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
2003-06-18 08:59:57 +02:00
|
|
|
/* flags :: Possible values are zero or */
|
|
|
|
/* FT_GLYPH_OWN_BITMAP. The latter indicates */
|
|
|
|
/* that the FT_GlyphSlot structure owns the */
|
|
|
|
/* bitmap buffer. */
|
|
|
|
/* */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* must be transformed through a specific */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* font transformation. This is _not_ the same */
|
|
|
|
/* as the face transform set through */
|
|
|
|
/* FT_Set_Transform(). */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* glyph_matrix :: The 2x2 matrix corresponding to the glyph */
|
|
|
|
/* transformation, if necessary. */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
2000-11-04 09:33:38 +01:00
|
|
|
/* glyph_delta :: The 2d translation vector corresponding to */
|
|
|
|
/* the glyph transformation, if necessary. */
|
2000-11-04 03:52:02 +01:00
|
|
|
/* */
|
2001-12-05 02:22:05 +01:00
|
|
|
/* glyph_hints :: Format-specific glyph hints management. */
|
2001-10-18 13:49:26 +02:00
|
|
|
/* */
|
2003-06-18 08:59:57 +02:00
|
|
|
|
2015-02-16 17:59:06 +01:00
|
|
|
#define FT_GLYPH_OWN_BITMAP 0x1U
|
2003-06-18 08:59:57 +02:00
|
|
|
|
2001-12-05 02:22:05 +01:00
|
|
|
typedef struct FT_Slot_InternalRec_
|
2000-11-04 03:52:02 +01:00
|
|
|
{
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_GlyphLoader loader;
|
2003-06-18 08:59:57 +02:00
|
|
|
FT_UInt flags;
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_Bool glyph_transformed;
|
|
|
|
FT_Matrix glyph_matrix;
|
|
|
|
FT_Vector glyph_delta;
|
|
|
|
void* glyph_hints;
|
2002-02-24 03:59:24 +01:00
|
|
|
|
2000-11-04 03:52:02 +01:00
|
|
|
} FT_GlyphSlot_InternalRec;
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2008-05-11 23:36:37 +02:00
|
|
|
#if 0
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_Size_InternalRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This structure contains the internal fields of each FT_Size */
|
|
|
|
/* object. Currently, it's empty. */
|
|
|
|
/* */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
2008-05-11 23:36:37 +02:00
|
|
|
|
|
|
|
typedef struct FT_Size_InternalRec_
|
|
|
|
{
|
|
|
|
/* empty */
|
|
|
|
|
|
|
|
} FT_Size_InternalRec;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2012-08-16 08:39:11 +02:00
|
|
|
/*************************************************************************/
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** M O D U L E S ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_ModuleRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A module object instance. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* clazz :: A pointer to the module's class. */
|
|
|
|
/* */
|
|
|
|
/* library :: A handle to the parent library object. */
|
|
|
|
/* */
|
|
|
|
/* memory :: A handle to the memory manager. */
|
|
|
|
/* */
|
|
|
|
typedef struct FT_ModuleRec_
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
{
|
|
|
|
FT_Module_Class* clazz;
|
|
|
|
FT_Library library;
|
|
|
|
FT_Memory memory;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
} FT_ModuleRec;
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
2012-02-11 09:37:46 +01:00
|
|
|
/* typecast an object to an FT_Module */
|
2002-03-30 00:23:28 +01:00
|
|
|
#define FT_MODULE( x ) ((FT_Module)( x ))
|
|
|
|
#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
|
|
|
|
#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
|
|
|
|
#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
|
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_FONT_DRIVER )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_RENDERER )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_HINTER )
|
2000-06-30 03:31:22 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_STYLER )
|
2000-06-30 03:31:22 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_DRIVER_SCALABLE )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_DRIVER_NO_OUTLINES )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2002-03-30 00:23:28 +01:00
|
|
|
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_DRIVER_HAS_HINTER )
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-14 08:16:47 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Module_Interface */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Finds a module and returns its specific interface as a typeless */
|
|
|
|
/* pointer. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* library :: A handle to the library object. */
|
|
|
|
/* */
|
|
|
|
/* module_name :: The module's name (as an ASCII string). */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* A module-specific interface if available, 0 otherwise. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* You should better be familiar with FreeType internals to know */
|
|
|
|
/* which module to look for, and what its interface is :-) */
|
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_BASE( const void* )
|
|
|
|
FT_Get_Module_Interface( FT_Library library,
|
|
|
|
const char* mod_name );
|
2000-07-14 08:16:47 +02:00
|
|
|
|
2003-09-29 22:33:37 +02:00
|
|
|
FT_BASE( FT_Pointer )
|
|
|
|
ft_module_get_service( FT_Module module,
|
|
|
|
const char* service_id );
|
|
|
|
|
2012-08-16 08:39:11 +02:00
|
|
|
/* */
|
2003-01-22 23:45:28 +01:00
|
|
|
|
2000-07-14 08:16:47 +02:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
2012-08-16 08:39:11 +02:00
|
|
|
/**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
/* a few macros used to perform easy typecasts with minimal brain damage */
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_FACE( x ) ((FT_Face)(x))
|
|
|
|
#define FT_SIZE( x ) ((FT_Size)(x))
|
|
|
|
#define FT_SLOT( x ) ((FT_GlyphSlot)(x))
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
|
|
|
|
#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
|
|
|
|
#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory
|
2002-03-22 18:09:52 +01:00
|
|
|
#define FT_FACE_STREAM( x ) FT_FACE( x )->stream
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_SIZE_FACE( x ) FT_SIZE( x )->face
|
|
|
|
#define FT_SLOT_FACE( x ) FT_SLOT( x )->face
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph
|
|
|
|
#define FT_FACE_SIZE( x ) FT_FACE( x )->size
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2000-11-08 00:56:02 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_GlyphSlot */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* It is sometimes useful to have more than one glyph slot for a */
|
|
|
|
/* given face object. This function is used to create additional */
|
|
|
|
/* slots. All of them are automatically discarded when the face is */
|
|
|
|
/* destroyed. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to a parent face object. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* aslot :: A handle to a new glyph slot object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0 means success. */
|
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_BASE( FT_Error )
|
|
|
|
FT_New_GlyphSlot( FT_Face face,
|
|
|
|
FT_GlyphSlot *aslot );
|
2000-11-08 00:56:02 +01:00
|
|
|
|
2000-10-03 20:02:02 +02:00
|
|
|
|
2000-11-08 00:56:02 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Done_GlyphSlot */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Destroys a given glyph slot. Remember however that all slots are */
|
|
|
|
/* automatically destroyed with its parent. Using this function is */
|
|
|
|
/* not always mandatory. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* slot :: A handle to a target glyph slot. */
|
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_BASE( void )
|
|
|
|
FT_Done_GlyphSlot( FT_GlyphSlot slot );
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2003-03-20 08:04:40 +01:00
|
|
|
/* */
|
2003-08-18 00:09:14 +02:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
#define FT_REQUEST_WIDTH( req ) \
|
|
|
|
( (req)->horiResolution \
|
2015-02-16 17:59:06 +01:00
|
|
|
? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
|
2006-01-26 22:03:58 +01:00
|
|
|
: (req)->width )
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
#define FT_REQUEST_HEIGHT( req ) \
|
|
|
|
( (req)->vertResolution \
|
2015-02-16 17:59:06 +01:00
|
|
|
? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
|
2006-01-26 22:03:58 +01:00
|
|
|
: (req)->height )
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
|
|
|
|
/* Set the metrics according to a bitmap strike. */
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
FT_BASE( void )
|
|
|
|
FT_Select_Metrics( FT_Face face,
|
|
|
|
FT_ULong strike_index );
|
|
|
|
|
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Set the metrics according to a size request. */
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.
* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.
* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics. They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.
* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL. That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching. This was what we did and it
does cause some problems without rounding.
* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected. This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.
* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.
* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.
* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed. Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 15:12:40 +01:00
|
|
|
FT_BASE( void )
|
|
|
|
FT_Request_Metrics( FT_Face face,
|
|
|
|
FT_Size_Request req );
|
|
|
|
|
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Match a size request against `available_sizes'. */
|
* include/freetype/internal/sfnt.h (SFNT_Interface): New method
`load_strike_metrics' used to load the strike's metrics.
* src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.
* src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.
* src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
nominal size unless it is obviously incorrect.
* include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
FNT driver.
Introduce new size selection interface.
* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.
* include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
(FT_Select_Size, FT_Request_Size): API additions to export the new
size selection interface.
* src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
`FT_Request_Size'.
* include/freetype/internal/ftobjs.h (FT_Match_Size),
src/base/ftobjs.c (FT_Match_Size): New function to match a size
request against `available_sizes'. Drivers supporting bitmap strikes
can use this function to implement `request_size'.
* src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
Update to new size selection interface.
* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
selection interface.
Make `strike_index' FT_ULong and always defined.
Use `load_strike_metrics' provided by SFNT interface.
2006-01-13 13:21:31 +01:00
|
|
|
FT_BASE( FT_Error )
|
|
|
|
FT_Match_Size( FT_Face face,
|
|
|
|
FT_Size_Request req,
|
|
|
|
FT_Bool ignore_width,
|
2006-02-01 06:22:25 +01:00
|
|
|
FT_ULong* size_index );
|
* include/freetype/internal/sfnt.h (SFNT_Interface): New method
`load_strike_metrics' used to load the strike's metrics.
* src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.
* src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.
* src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
nominal size unless it is obviously incorrect.
* include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
FNT driver.
Introduce new size selection interface.
* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.
* include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
(FT_Select_Size, FT_Request_Size): API additions to export the new
size selection interface.
* src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
`FT_Request_Size'.
* include/freetype/internal/ftobjs.h (FT_Match_Size),
src/base/ftobjs.c (FT_Match_Size): New function to match a size
request against `available_sizes'. Drivers supporting bitmap strikes
can use this function to implement `request_size'.
* src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
Update to new size selection interface.
* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
selection interface.
Make `strike_index' FT_ULong and always defined.
Use `load_strike_metrics' provided by SFNT interface.
2006-01-13 13:21:31 +01:00
|
|
|
|
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Use the horizontal metrics to synthesize the vertical metrics. */
|
|
|
|
/* If `advance' is zero, it is also synthesized. */
|
2006-01-15 07:24:53 +01:00
|
|
|
FT_BASE( void )
|
2006-01-15 16:01:45 +01:00
|
|
|
ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
|
|
|
|
FT_Pos advance );
|
2006-01-15 07:24:53 +01:00
|
|
|
|
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Free the bitmap of a given glyphslot when needed (i.e., only when it */
|
|
|
|
/* was allocated with ft_glyphslot_alloc_bitmap). */
|
2003-03-20 08:04:40 +01:00
|
|
|
FT_BASE( void )
|
|
|
|
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
|
2003-08-18 00:09:14 +02:00
|
|
|
|
2003-04-22 09:49:24 +02:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Allocate a new bitmap buffer in a glyph slot. */
|
2003-03-20 08:04:40 +01:00
|
|
|
FT_BASE( FT_Error )
|
|
|
|
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
|
|
|
|
FT_ULong size );
|
|
|
|
|
2003-04-22 09:49:24 +02:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */
|
|
|
|
/* will not be freed by a later call to ft_glyphslot_free_bitmap. */
|
2003-03-20 08:04:40 +01:00
|
|
|
FT_BASE( void )
|
2003-04-22 09:49:24 +02:00
|
|
|
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
|
2003-04-23 21:48:24 +02:00
|
|
|
FT_Byte* buffer );
|
2003-03-20 08:04:40 +01:00
|
|
|
|
2000-03-28 13:22:31 +02:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** R E N D E R E R S ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_RENDERER( x ) ((FT_Renderer)( x ))
|
|
|
|
#define FT_GLYPH( x ) ((FT_Glyph)( x ))
|
|
|
|
#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x ))
|
|
|
|
#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct FT_RendererRec_
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
{
|
2002-09-05 17:10:54 +02:00
|
|
|
FT_ModuleRec root;
|
|
|
|
FT_Renderer_Class* clazz;
|
|
|
|
FT_Glyph_Format glyph_format;
|
|
|
|
FT_Glyph_Class glyph_class;
|
|
|
|
|
|
|
|
FT_Raster raster;
|
|
|
|
FT_Raster_Render_Func raster_render;
|
|
|
|
FT_Renderer_RenderFunc render;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
} FT_RendererRec;
|
2000-03-28 13:22:31 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/**** F O N T D R I V E R S ****/
|
1999-12-17 00:11:37 +01:00
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* typecast a module into a driver easily */
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_DRIVER( x ) ((FT_Driver)(x))
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
|
|
|
/* typecast a module as a driver, and get its driver class */
|
2000-07-18 08:50:03 +02:00
|
|
|
#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
|
|
|
|
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_DriverRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The root font driver class. A font driver is responsible for */
|
|
|
|
/* managing and loading font files of a given format. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* root :: Contains the fields of the root module class. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* clazz :: A pointer to the font driver's class. Note that */
|
|
|
|
/* this is NOT root.clazz. `class' wasn't used */
|
|
|
|
/* as it is a reserved word in C++. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* faces_list :: The list of faces currently opened by this */
|
|
|
|
/* driver. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2015-01-14 18:35:56 +01:00
|
|
|
/* glyph_loader :: Unused. Used to be glyph loader for all faces */
|
|
|
|
/* managed by this driver. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_DriverRec_
|
|
|
|
{
|
2002-03-30 00:23:28 +01:00
|
|
|
FT_ModuleRec root;
|
|
|
|
FT_Driver_Class clazz;
|
|
|
|
FT_ListRec faces_list;
|
|
|
|
FT_GlyphLoader glyph_loader;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
} FT_DriverRec;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** L I B R A R I E S ****/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* This hook is used by the TrueType debugger. It must be set to an */
|
|
|
|
/* alternate truetype bytecode interpreter function. */
|
2003-08-18 00:09:14 +02:00
|
|
|
#define FT_DEBUG_HOOK_TRUETYPE 0
|
|
|
|
|
|
|
|
|
2006-01-26 22:03:58 +01:00
|
|
|
/* Set this debug hook to a non-null pointer to force unpatented hinting */
|
2006-09-03 08:18:45 +02:00
|
|
|
/* for all faces when both TT_USE_BYTECODE_INTERPRETER and */
|
|
|
|
/* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. This is only used */
|
2006-01-26 22:03:58 +01:00
|
|
|
/* during debugging. */
|
2003-08-18 00:09:14 +02:00
|
|
|
#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
|
2006-09-27 09:52:48 +02:00
|
|
|
typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
|
|
|
|
FT_Render_Mode render_mode,
|
2006-11-10 17:49:42 +01:00
|
|
|
FT_Library library );
|
2006-09-27 09:52:48 +02:00
|
|
|
|
2006-09-29 23:31:53 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* FT_LibraryRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The FreeType library class. This is the root of all FreeType */
|
|
|
|
/* data. Use FT_New_Library() to create a library object, and */
|
|
|
|
/* FT_Done_Library() to discard it and all child objects. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* memory :: The library's memory object. Manages memory */
|
|
|
|
/* allocation. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2003-09-16 09:57:25 +02:00
|
|
|
/* version_major :: The major version number of the library. */
|
|
|
|
/* */
|
|
|
|
/* version_minor :: The minor version number of the library. */
|
|
|
|
/* */
|
|
|
|
/* version_patch :: The current patch level of the library. */
|
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* num_modules :: The number of modules currently registered */
|
|
|
|
/* within this library. This is set to 0 for new */
|
|
|
|
/* libraries. New modules are added through the */
|
|
|
|
/* FT_Add_Module() API function. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* modules :: A table used to store handles to the currently */
|
|
|
|
/* registered modules. Note that each font driver */
|
|
|
|
/* contains a list of its opened faces. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* renderers :: The list of renderers currently registered */
|
|
|
|
/* within the library. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* cur_renderer :: The current outline renderer. This is a */
|
|
|
|
/* shortcut used to avoid parsing the list on */
|
|
|
|
/* each call to FT_Outline_Render(). It is a */
|
|
|
|
/* handle to the current renderer for the */
|
* 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
|
|
|
/* FT_GLYPH_FORMAT_OUTLINE format. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* auto_hinter :: XXX */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* raster_pool :: The raster object's render pool. This can */
|
|
|
|
/* ideally be changed dynamically at run-time. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* raster_pool_size :: The size of the render pool in bytes. */
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* debug_hooks :: XXX */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* lcd_filter :: If subpixel rendering is activated, the */
|
|
|
|
/* selected LCD filter mode. */
|
|
|
|
/* */
|
|
|
|
/* lcd_extra :: If subpixel rendering is activated, the number */
|
|
|
|
/* of extra pixels needed for the LCD filter. */
|
|
|
|
/* */
|
|
|
|
/* lcd_weights :: If subpixel rendering is activated, the LCD */
|
|
|
|
/* filter weights, if any. */
|
|
|
|
/* */
|
|
|
|
/* lcd_filter_func :: If subpixel rendering is activated, the LCD */
|
|
|
|
/* filtering callback function. */
|
|
|
|
/* */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* pic_container :: Contains global structs and tables, instead */
|
|
|
|
/* of defining them globallly. */
|
|
|
|
/* */
|
2010-07-18 18:41:47 +02:00
|
|
|
/* refcount :: A counter initialized to~1 at the time an */
|
|
|
|
/* @FT_Library structure is created. */
|
|
|
|
/* @FT_Reference_Library increments this counter, */
|
|
|
|
/* and @FT_Done_Library only destroys a library */
|
|
|
|
/* if the counter is~1, otherwise it simply */
|
|
|
|
/* decrements it. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct FT_LibraryRec_
|
|
|
|
{
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_Memory memory; /* library's memory manager */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-06 13:42:34 +01:00
|
|
|
FT_Int version_major;
|
|
|
|
FT_Int version_minor;
|
|
|
|
FT_Int version_patch;
|
|
|
|
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_UInt num_modules;
|
|
|
|
FT_Module modules[FT_MAX_MODULES]; /* module objects */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_ListRec renderers; /* list of renderers */
|
|
|
|
FT_Renderer cur_renderer; /* current outline renderer */
|
|
|
|
FT_Module auto_hinter;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_Byte* raster_pool; /* scan-line conversion */
|
2002-03-30 00:23:28 +01:00
|
|
|
/* render pool */
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_ULong raster_pool_size; /* size of render pool in bytes */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-28 01:29:08 +02:00
|
|
|
FT_DebugHook_Func debug_hooks[4];
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2006-09-27 09:52:48 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
2006-11-10 17:49:42 +01:00
|
|
|
FT_LcdFilter lcd_filter;
|
|
|
|
FT_Int lcd_extra; /* number of extra pixels */
|
|
|
|
FT_Byte lcd_weights[7]; /* filter weights, if any */
|
|
|
|
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
|
2006-09-27 09:52:48 +02:00
|
|
|
#endif
|
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_PIC
|
|
|
|
FT_PIC_Container pic_container;
|
|
|
|
#endif
|
|
|
|
|
2013-06-18 09:35:34 +02:00
|
|
|
FT_Int refcount;
|
2010-07-18 18:41:47 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_LibraryRec;
|
|
|
|
|
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_BASE( FT_Renderer )
|
|
|
|
FT_Lookup_Renderer( FT_Library library,
|
|
|
|
FT_Glyph_Format format,
|
|
|
|
FT_ListNode* node );
|
2000-06-28 01:32:27 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_BASE( FT_Error )
|
* src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.
* src/cff/cffobjs.c (cff_face_init): Ditto.
* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.
* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.
* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.
* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.
* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.
* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.
* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.
* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.
* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.
* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.
* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.
* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.
* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.
* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 13:09:23 +02:00
|
|
|
FT_Render_Glyph_Internal( FT_Library library,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode render_mode );
|
2000-06-28 01:32:27 +02:00
|
|
|
|
2001-10-17 15:48:10 +02:00
|
|
|
typedef const char*
|
2002-03-14 10:28:51 +01:00
|
|
|
(*FT_Face_GetPostscriptNameFunc)( FT_Face face );
|
2001-10-17 15:48:10 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-14 10:28:51 +01:00
|
|
|
(*FT_Face_GetGlyphNameFunc)( FT_Face face,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_Pointer buffer,
|
|
|
|
FT_UInt buffer_max );
|
2000-07-19 19:13:03 +02:00
|
|
|
|
2001-08-08 13:02:12 +02:00
|
|
|
typedef FT_UInt
|
2002-03-14 10:28:51 +01:00
|
|
|
(*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
|
|
|
|
FT_String* glyph_name );
|
2001-08-08 13:02:12 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
|
|
|
|
|
2000-11-07 18:21:11 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Memory */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Creates a new memory object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* A pointer to the new memory object. 0 in case of error. */
|
|
|
|
/* */
|
* src/base/ftcalc.c (FT_MulTo64): Commented out.
* include/freetype/internal/ftcalc.h (FT_SqrtFixed), src/base/ftcalc.c
(FT_SqrtFixed), include/freetype/internal/ftdebug.h
(FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic),
src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message,
FT_Panic), include/freetype/internal/ftobjs.h (FT_New_Memory,
FT_Done_Memory), include/freetype/internal/ftstream.h
(FT_Stream_Open), src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory,
FT_Stream_Open): s/FT_EXPORT/FT_BASE/.
* builds/exports.mk: Manually add TT_New_Context to EXPORTS_LIST too.
2005-11-17 02:53:07 +01:00
|
|
|
FT_BASE( FT_Memory )
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_New_Memory( void );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-11-07 18:21:11 +01:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Done_Memory */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Discards memory manager. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* memory :: A handle to the memory manager. */
|
|
|
|
/* */
|
* src/base/ftcalc.c (FT_MulTo64): Commented out.
* include/freetype/internal/ftcalc.h (FT_SqrtFixed), src/base/ftcalc.c
(FT_SqrtFixed), include/freetype/internal/ftdebug.h
(FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic),
src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message,
FT_Panic), include/freetype/internal/ftobjs.h (FT_New_Memory,
FT_Done_Memory), include/freetype/internal/ftstream.h
(FT_Stream_Open), src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory,
FT_Stream_Open): s/FT_EXPORT/FT_BASE/.
* builds/exports.mk: Manually add TT_New_Context to EXPORTS_LIST too.
2005-11-17 02:53:07 +01:00
|
|
|
FT_BASE( void )
|
2001-06-28 19:49:10 +02:00
|
|
|
FT_Done_Memory( FT_Memory memory );
|
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
2000-06-22 02:17:42 +02:00
|
|
|
|
2000-07-18 08:50:03 +02:00
|
|
|
#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
|
|
|
|
|
|
|
|
|
|
|
|
/* Define default raster's interface. The default raster is located in */
|
2000-07-28 01:29:08 +02:00
|
|
|
/* `src/base/ftraster.c'. */
|
2000-07-18 08:50:03 +02:00
|
|
|
/* */
|
|
|
|
/* Client applications can register new rasters through the */
|
|
|
|
/* FT_Set_Raster() API. */
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
#ifndef FT_NO_DEFAULT_RASTER
|
2000-07-18 08:50:03 +02:00
|
|
|
FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
|
1999-12-17 00:11:37 +01:00
|
|
|
#endif
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
2012-08-16 08:39:11 +02:00
|
|
|
/**** P I C S U P P O R T ****/
|
2009-04-05 16:59:26 +02:00
|
|
|
/**** ****/
|
|
|
|
/**** ****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2012-08-16 08:39:11 +02:00
|
|
|
/* PIC support macros for ftimage.h */
|
|
|
|
|
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_OUTLINE_FUNCS */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to initialize an instance of FT_Outline_Funcs struct. */
|
|
|
|
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* be called with a pre-allocated structure to be filled. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
|
|
|
|
/* allocated in the global scope (or the scope where the macro */
|
|
|
|
/* is used). */
|
|
|
|
/* */
|
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_OUTLINE_FUNCS( \
|
|
|
|
class_, \
|
|
|
|
move_to_, \
|
|
|
|
line_to_, \
|
|
|
|
conic_to_, \
|
|
|
|
cubic_to_, \
|
|
|
|
shift_, \
|
|
|
|
delta_ ) \
|
|
|
|
static const FT_Outline_Funcs class_ = \
|
|
|
|
{ \
|
|
|
|
move_to_, \
|
|
|
|
line_to_, \
|
|
|
|
conic_to_, \
|
|
|
|
cubic_to_, \
|
|
|
|
shift_, \
|
|
|
|
delta_ \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_OUTLINE_FUNCS( \
|
|
|
|
class_, \
|
|
|
|
move_to_, \
|
|
|
|
line_to_, \
|
|
|
|
conic_to_, \
|
|
|
|
cubic_to_, \
|
|
|
|
shift_, \
|
|
|
|
delta_ ) \
|
|
|
|
static FT_Error \
|
|
|
|
Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \
|
|
|
|
{ \
|
|
|
|
clazz->move_to = move_to_; \
|
|
|
|
clazz->line_to = line_to_; \
|
|
|
|
clazz->conic_to = conic_to_; \
|
|
|
|
clazz->cubic_to = cubic_to_; \
|
|
|
|
clazz->shift = shift_; \
|
|
|
|
clazz->delta = delta_; \
|
|
|
|
\
|
|
|
|
return FT_Err_Ok; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_RASTER_FUNCS */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to initialize an instance of FT_Raster_Funcs struct. */
|
|
|
|
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* be called with a pre-allocated structure to be filled. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
|
|
|
|
/* allocated in the global scope (or the scope where the macro */
|
|
|
|
/* is used). */
|
|
|
|
/* */
|
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_RASTER_FUNCS( \
|
|
|
|
class_, \
|
|
|
|
glyph_format_, \
|
|
|
|
raster_new_, \
|
|
|
|
raster_reset_, \
|
|
|
|
raster_set_mode_, \
|
|
|
|
raster_render_, \
|
|
|
|
raster_done_ ) \
|
|
|
|
const FT_Raster_Funcs class_ = \
|
|
|
|
{ \
|
|
|
|
glyph_format_, \
|
|
|
|
raster_new_, \
|
|
|
|
raster_reset_, \
|
|
|
|
raster_set_mode_, \
|
|
|
|
raster_render_, \
|
|
|
|
raster_done_ \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_RASTER_FUNCS( \
|
|
|
|
class_, \
|
|
|
|
glyph_format_, \
|
|
|
|
raster_new_, \
|
|
|
|
raster_reset_, \
|
|
|
|
raster_set_mode_, \
|
|
|
|
raster_render_, \
|
|
|
|
raster_done_ ) \
|
|
|
|
void \
|
|
|
|
FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \
|
|
|
|
{ \
|
|
|
|
clazz->glyph_format = glyph_format_; \
|
|
|
|
clazz->raster_new = raster_new_; \
|
|
|
|
clazz->raster_reset = raster_reset_; \
|
|
|
|
clazz->raster_set_mode = raster_set_mode_; \
|
|
|
|
clazz->raster_render = raster_render_; \
|
|
|
|
clazz->raster_done = raster_done_; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2012-08-16 08:39:11 +02:00
|
|
|
/* PIC support macros for ftrender.h */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_GLYPH */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to initialize an instance of FT_Glyph_Class struct. */
|
|
|
|
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* be called with a pre-allocated stcture to be filled. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
|
|
|
|
/* allocated in the global scope (or the scope where the macro */
|
|
|
|
/* is used). */
|
|
|
|
/* */
|
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_GLYPH( \
|
|
|
|
class_, \
|
|
|
|
size_, \
|
|
|
|
format_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
copy_, \
|
|
|
|
transform_, \
|
|
|
|
bbox_, \
|
|
|
|
prepare_ ) \
|
|
|
|
FT_CALLBACK_TABLE_DEF \
|
|
|
|
const FT_Glyph_Class class_ = \
|
|
|
|
{ \
|
|
|
|
size_, \
|
|
|
|
format_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
copy_, \
|
|
|
|
transform_, \
|
|
|
|
bbox_, \
|
|
|
|
prepare_ \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_GLYPH( \
|
|
|
|
class_, \
|
|
|
|
size_, \
|
|
|
|
format_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
copy_, \
|
|
|
|
transform_, \
|
|
|
|
bbox_, \
|
|
|
|
prepare_ ) \
|
|
|
|
void \
|
|
|
|
FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \
|
|
|
|
{ \
|
|
|
|
clazz->glyph_size = size_; \
|
|
|
|
clazz->glyph_format = format_; \
|
|
|
|
clazz->glyph_init = init_; \
|
|
|
|
clazz->glyph_done = done_; \
|
|
|
|
clazz->glyph_copy = copy_; \
|
|
|
|
clazz->glyph_transform = transform_; \
|
|
|
|
clazz->glyph_bbox = bbox_; \
|
|
|
|
clazz->glyph_prepare = prepare_; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DECLARE_RENDERER */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to create a forward declaration of a */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* FT_Renderer_Class struct instance. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_RENDERER */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to initialize an instance of FT_Renderer_Class struct. */
|
|
|
|
/* */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need */
|
|
|
|
/* to be called with a pointer where the allocated structure is */
|
|
|
|
/* returned. And when it is no longer needed a `destroy' function */
|
|
|
|
/* needs to be called to release that allocation. */
|
|
|
|
/* `fcinit.c' (ft_create_default_module_classes) already contains */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* a mechanism to call these functions for the default modules */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* described in `ftmodule.h'. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* Notice that the created `create' and `destroy' functions call */
|
|
|
|
/* `pic_init' and `pic_free' to allow you to manually allocate and */
|
|
|
|
/* initialize any additional global data, like a module specific */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* interface, and put them in the global pic container defined in */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* `ftpic.h'. If you don't need them just implement the functions as */
|
|
|
|
/* empty to resolve the link error. Also the `pic_init' and */
|
|
|
|
/* `pic_free' functions should be declared in `pic.h', to be referred */
|
|
|
|
/* by the renderer definition calling `FT_DEFINE_RENDERER' in the */
|
|
|
|
/* following. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
|
|
|
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
|
|
|
|
/* allocated in the global scope (or the scope where the macro */
|
|
|
|
/* is used). */
|
|
|
|
/* */
|
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_RENDERER( class_ ) \
|
|
|
|
FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
|
|
|
|
|
|
|
|
#define FT_DEFINE_RENDERER( \
|
|
|
|
class_, \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_, \
|
|
|
|
glyph_format_, \
|
|
|
|
render_glyph_, \
|
|
|
|
transform_glyph_, \
|
|
|
|
get_glyph_cbox_, \
|
|
|
|
set_mode_, \
|
|
|
|
raster_class_ ) \
|
|
|
|
FT_CALLBACK_TABLE_DEF \
|
|
|
|
const FT_Renderer_Class class_ = \
|
|
|
|
{ \
|
|
|
|
FT_DEFINE_ROOT_MODULE( flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
glyph_format_, \
|
|
|
|
\
|
|
|
|
render_glyph_, \
|
|
|
|
transform_glyph_, \
|
|
|
|
get_glyph_cbox_, \
|
|
|
|
set_mode_, \
|
|
|
|
\
|
|
|
|
raster_class_ \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ )
|
|
|
|
|
|
|
|
#define FT_DEFINE_RENDERER( \
|
|
|
|
class_, \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_, \
|
|
|
|
glyph_format_, \
|
|
|
|
render_glyph_, \
|
|
|
|
transform_glyph_, \
|
|
|
|
get_glyph_cbox_, \
|
|
|
|
set_mode_, \
|
|
|
|
raster_class_ ) \
|
|
|
|
void \
|
|
|
|
FT_Destroy_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class* clazz ) \
|
|
|
|
{ \
|
|
|
|
FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
|
|
|
|
FT_Memory memory = library->memory; \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
class_ ## _pic_free( library ); \
|
|
|
|
if ( rclazz ) \
|
|
|
|
FT_FREE( rclazz ); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
FT_Error \
|
|
|
|
FT_Create_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class** output_class ) \
|
|
|
|
{ \
|
[FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
(FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
src/autofit/afpic.c (autofit_module_class_pic_init),
src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
(ft_create_default_module_classes), src/cff/cffparse.c
(FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
(cff_driver_class_pic_init), src/pshinter/pshpic.c
(pshinter_module_class_pic_init), src/psnames/pspic.c
(psnames_module_class_pic_init), src/raster/rastpic.c
(ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
(sfnt_module_class_pic_init), src/sfnt/ttcmap.c
(FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
(ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
(tt_driver_class_pic_init): Initialize allocation variable.
2012-08-27 11:23:41 +02:00
|
|
|
FT_Renderer_Class* clazz = NULL; \
|
2012-07-29 13:15:53 +02:00
|
|
|
FT_Error error; \
|
|
|
|
FT_Memory memory = library->memory; \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
|
|
|
|
return error; \
|
|
|
|
\
|
|
|
|
error = class_ ## _pic_init( library ); \
|
|
|
|
if ( error ) \
|
|
|
|
{ \
|
|
|
|
FT_FREE( clazz ); \
|
|
|
|
return error; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
FT_DEFINE_ROOT_MODULE( flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
\
|
|
|
|
clazz->glyph_format = glyph_format_; \
|
|
|
|
\
|
|
|
|
clazz->render_glyph = render_glyph_; \
|
|
|
|
clazz->transform_glyph = transform_glyph_; \
|
|
|
|
clazz->get_glyph_cbox = get_glyph_cbox_; \
|
|
|
|
clazz->set_mode = set_mode_; \
|
|
|
|
\
|
|
|
|
clazz->raster_class = raster_class_; \
|
|
|
|
\
|
|
|
|
*output_class = (FT_Module_Class*)clazz; \
|
|
|
|
\
|
|
|
|
return FT_Err_Ok; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
2009-04-05 16:59:26 +02:00
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2012-08-16 08:39:11 +02:00
|
|
|
/* PIC support macros for ftmodapi.h **/
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef FT_CONFIG_OPTION_PIC
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
|
|
|
/* FT_Module_Creator */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A function used to create (allocate) a new module class object. */
|
|
|
|
/* The object's members are initialized, but the module itself is */
|
|
|
|
/* not. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* memory :: A handle to the memory manager. */
|
|
|
|
/* output_class :: Initialized with the newly allocated class. */
|
|
|
|
/* */
|
|
|
|
typedef FT_Error
|
|
|
|
(*FT_Module_Creator)( FT_Memory memory,
|
|
|
|
FT_Module_Class** output_class );
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
|
|
|
/* FT_Module_Destroyer */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A function used to destroy (deallocate) a module class object. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* memory :: A handle to the memory manager. */
|
|
|
|
/* clazz :: Module class to destroy. */
|
|
|
|
/* */
|
|
|
|
typedef void
|
|
|
|
(*FT_Module_Destroyer)( FT_Memory memory,
|
|
|
|
FT_Module_Class* clazz );
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
|
2009-04-05 16:59:26 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DECLARE_MODULE */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Used to create a forward declaration of a */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* FT_Module_Class struct instance. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_MODULE */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* Used to initialize an instance of an FT_Module_Class struct. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to */
|
|
|
|
/* be called with a pointer where the allocated structure is */
|
|
|
|
/* returned. And when it is no longer needed a `destroy' function */
|
|
|
|
/* needs to be called to release that allocation. */
|
|
|
|
/* `fcinit.c' (ft_create_default_module_classes) already contains */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* a mechanism to call these functions for the default modules */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* described in `ftmodule.h'. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* Notice that the created `create' and `destroy' functions call */
|
|
|
|
/* `pic_init' and `pic_free' to allow you to manually allocate and */
|
|
|
|
/* initialize any additional global data, like a module specific */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* interface, and put them in the global pic container defined in */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* `ftpic.h'. If you don't need them just implement the functions as */
|
|
|
|
/* empty to resolve the link error. Also the `pic_init' and */
|
|
|
|
/* `pic_free' functions should be declared in `pic.h', to be referred */
|
|
|
|
/* by the module definition calling `FT_DEFINE_MODULE' in the */
|
|
|
|
/* following. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
|
|
|
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
|
|
|
|
/* allocated in the global scope (or the scope where the macro */
|
|
|
|
/* is used). */
|
|
|
|
/* */
|
|
|
|
/* <Macro> */
|
|
|
|
/* FT_DEFINE_ROOT_MODULE */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2012-07-29 13:15:53 +02:00
|
|
|
/* Used to initialize an instance of an FT_Module_Class struct inside */
|
|
|
|
/* another struct that contains it or in a function that initializes */
|
|
|
|
/* that containing struct. */
|
2009-04-05 16:59:26 +02:00
|
|
|
/* */
|
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_MODULE( class_ ) \
|
|
|
|
FT_CALLBACK_TABLE \
|
|
|
|
const FT_Module_Class class_;
|
|
|
|
|
|
|
|
#define FT_DEFINE_ROOT_MODULE( \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
{ \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
\
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
\
|
|
|
|
interface_, \
|
|
|
|
\
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_, \
|
2009-04-05 16:59:26 +02:00
|
|
|
},
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DEFINE_MODULE( \
|
|
|
|
class_, \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
FT_CALLBACK_TABLE_DEF \
|
|
|
|
const FT_Module_Class class_ = \
|
|
|
|
{ \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
\
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
\
|
|
|
|
interface_, \
|
|
|
|
\
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_, \
|
2009-04-05 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
2012-07-29 13:15:53 +02:00
|
|
|
#define FT_DECLARE_MODULE( class_ ) \
|
|
|
|
FT_Error \
|
|
|
|
FT_Create_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class** output_class ); \
|
|
|
|
void \
|
|
|
|
FT_Destroy_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class* clazz );
|
|
|
|
|
|
|
|
#define FT_DEFINE_ROOT_MODULE( \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
clazz->root.module_flags = flags_; \
|
|
|
|
clazz->root.module_size = size_; \
|
|
|
|
clazz->root.module_name = name_; \
|
|
|
|
clazz->root.module_version = version_; \
|
|
|
|
clazz->root.module_requires = requires_; \
|
|
|
|
\
|
|
|
|
clazz->root.module_interface = interface_; \
|
|
|
|
\
|
|
|
|
clazz->root.module_init = init_; \
|
|
|
|
clazz->root.module_done = done_; \
|
|
|
|
clazz->root.get_interface = get_interface_;
|
|
|
|
|
|
|
|
#define FT_DEFINE_MODULE( \
|
|
|
|
class_, \
|
|
|
|
flags_, \
|
|
|
|
size_, \
|
|
|
|
name_, \
|
|
|
|
version_, \
|
|
|
|
requires_, \
|
|
|
|
interface_, \
|
|
|
|
init_, \
|
|
|
|
done_, \
|
|
|
|
get_interface_ ) \
|
|
|
|
void \
|
|
|
|
FT_Destroy_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class* clazz ) \
|
|
|
|
{ \
|
|
|
|
FT_Memory memory = library->memory; \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
class_ ## _pic_free( library ); \
|
|
|
|
if ( clazz ) \
|
|
|
|
FT_FREE( clazz ); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
FT_Error \
|
|
|
|
FT_Create_Class_ ## class_( FT_Library library, \
|
|
|
|
FT_Module_Class** output_class ) \
|
|
|
|
{ \
|
|
|
|
FT_Memory memory = library->memory; \
|
[FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
(FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
src/autofit/afpic.c (autofit_module_class_pic_init),
src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
(ft_create_default_module_classes), src/cff/cffparse.c
(FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
(cff_driver_class_pic_init), src/pshinter/pshpic.c
(pshinter_module_class_pic_init), src/psnames/pspic.c
(psnames_module_class_pic_init), src/raster/rastpic.c
(ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
(sfnt_module_class_pic_init), src/sfnt/ttcmap.c
(FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
(ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
(tt_driver_class_pic_init): Initialize allocation variable.
2012-08-27 11:23:41 +02:00
|
|
|
FT_Module_Class* clazz = NULL; \
|
2012-07-29 13:15:53 +02:00
|
|
|
FT_Error error; \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
|
|
|
|
return error; \
|
|
|
|
error = class_ ## _pic_init( library ); \
|
|
|
|
if ( error ) \
|
|
|
|
{ \
|
|
|
|
FT_FREE( clazz ); \
|
|
|
|
return error; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
clazz->module_flags = flags_; \
|
|
|
|
clazz->module_size = size_; \
|
|
|
|
clazz->module_name = name_; \
|
|
|
|
clazz->module_version = version_; \
|
|
|
|
clazz->module_requires = requires_; \
|
|
|
|
\
|
|
|
|
clazz->module_interface = interface_; \
|
|
|
|
\
|
|
|
|
clazz->module_init = init_; \
|
|
|
|
clazz->module_done = done_; \
|
|
|
|
clazz->get_interface = get_interface_; \
|
|
|
|
\
|
|
|
|
*output_class = clazz; \
|
|
|
|
\
|
|
|
|
return FT_Err_Ok; \
|
2012-01-16 18:00:24 +01:00
|
|
|
}
|
2009-04-05 16:59:26 +02:00
|
|
|
|
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
2000-07-05 06:32:02 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#endif /* __FTOBJS_H__ */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|