Formatting/Synchronizing.
Updating OS/2 bits in ttnameid.h to latest version (as posted on the opentype@ list).
This commit is contained in:
parent
e161ee449c
commit
2405d14f77
@ -8,8 +8,8 @@
|
||||
/* Copyright 1996-2000 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used */
|
||||
/* modified and distributed under the terms of the FreeType project */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
@ -42,7 +42,7 @@
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the source target. */
|
||||
/* */
|
||||
/* funcs :: A table of `emitters', i.e,. function pointers called */
|
||||
/* interface :: A table of `emitters', i.e,. function pointers called */
|
||||
/* during decomposition to indicate path operations. */
|
||||
/* */
|
||||
/* user :: A typeless pointer which is passed to each emitter */
|
||||
@ -52,9 +52,10 @@
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means sucess. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_Decompose( FT_Outline* outline,
|
||||
FT_Outline_Funcs* funcs,
|
||||
void* user );
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Decompose(
|
||||
FT_Outline* outline,
|
||||
FT_Outline_Funcs* interface,
|
||||
void* user );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -68,7 +69,7 @@
|
||||
/* <Input> */
|
||||
/* library :: A handle to the library object from where the */
|
||||
/* outline is allocated. Note however that the new */
|
||||
/* outline will NOT necessarily be FREED when */
|
||||
/* outline will NOT necessarily be FREED, when */
|
||||
/* destroying the library, by FT_Done_FreeType(). */
|
||||
/* */
|
||||
/* numPoints :: The maximal number of points within the outline. */
|
||||
@ -87,19 +88,19 @@
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The reason why this function takes a `library' parameter is simply */
|
||||
/* to use the library's memory allocator. You can copy the source */
|
||||
/* code of this function, replacing allocations with `malloc()' if */
|
||||
/* you want to control where the objects go. */
|
||||
/* to use the library's memory allocator. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_New( FT_Library library,
|
||||
FT_UInt numPoints,
|
||||
FT_Int numContours,
|
||||
FT_Outline* outline );
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_New( FT_Library library,
|
||||
FT_UInt numPoints,
|
||||
FT_Int numContours,
|
||||
FT_Outline* outline );
|
||||
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_New_Internal( FT_Memory memory,
|
||||
FT_UInt numPoints,
|
||||
FT_Int numContours,
|
||||
FT_Outline* outline );
|
||||
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_New_Internal(
|
||||
FT_Memory memory,
|
||||
FT_UInt numPoints,
|
||||
FT_Int numContours,
|
||||
FT_Outline* outline );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -127,16 +128,16 @@
|
||||
/* descriptor will be released. */
|
||||
/* */
|
||||
/* The reason why this function takes an `outline' parameter is */
|
||||
/* simply to use FT_Alloc()/FT_Free(). You can copy the source code */
|
||||
/* of this function, replacing allocations with `malloc()' in your */
|
||||
/* application if you want something simpler. */
|
||||
/* simply to use FT_Free(). */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline );
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline );
|
||||
|
||||
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Done_Internal( FT_Memory memory,
|
||||
FT_Outline* outline );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
@ -163,8 +164,8 @@
|
||||
/* <MT-Note> */
|
||||
/* Yes. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(void) FT_Outline_Get_CBox( FT_Outline* outline,
|
||||
FT_BBox* cbox );
|
||||
FT_EXPORT_DEF( void ) FT_Outline_Get_CBox( FT_Outline* outline,
|
||||
FT_BBox* cbox );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -177,16 +178,17 @@
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
/* */
|
||||
/* xOffset :: The horizontal offset. */
|
||||
/* */
|
||||
/* yOffset :: The vertical offset. */
|
||||
/* */
|
||||
/* <MT-Note> */
|
||||
/* Yes. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(void) FT_Outline_Translate( FT_Outline* outline,
|
||||
FT_Pos xOffset,
|
||||
FT_Pos yOffset );
|
||||
|
||||
FT_EXPORT_DEF( void ) FT_Outline_Translate( FT_Outline* outline,
|
||||
FT_Pos xOffset,
|
||||
FT_Pos yOffset );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -201,38 +203,40 @@
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* source :: A handle to the source outline. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* target :: A handle to the target outline. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_Copy( FT_Outline* source,
|
||||
FT_Outline* target );
|
||||
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Copy( FT_Outline* source,
|
||||
FT_Outline* target );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Outline_Transform */
|
||||
/* FT_Vector_Transform */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Applies a simple 2x2 matrix to all of an outline's points. Useful */
|
||||
/* for applying rotations, slanting, flipping, etc. */
|
||||
/* Transforms a single vector through a 2x2 matrix. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* vector :: The target vector to transform. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
/* matrix :: A pointer to the transformation matrix. */
|
||||
/* matrix :: A pointer to the source 2x2 matrix. */
|
||||
/* */
|
||||
/* <MT-Note> */
|
||||
/* Yes. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* You can use FT_Outline_Translate() if you need to translate the */
|
||||
/* outline's points. */
|
||||
/* The result is undefined if either `vector' or `matrix' is invalid. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(void) FT_Outline_Transform( FT_Outline* outline,
|
||||
FT_Matrix* matrix );
|
||||
FT_EXPORT_DEF( void ) FT_Outline_Transform( FT_Outline* outline,
|
||||
FT_Matrix* matrix );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -240,20 +244,20 @@
|
||||
/* FT_Outline_Reverse */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Reverse the drawing direction of an outline. This is used to */
|
||||
/* ensure consistent fill conventions for mirrored glyphs.. */
|
||||
/* Reverses the drawing direction of an outline. This is used to */
|
||||
/* ensure consistent fill conventions for mirrored glyphs. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* This functions toggles the bit flag ft_outline_reverse_fill in */
|
||||
/* the outline's "flags" field.. */
|
||||
/* This functions toggles the bit flag `ft_outline_reverse_fill' in */
|
||||
/* the outline's `flags' field. */
|
||||
/* */
|
||||
/* It shouldn't be used by a normal client application, unless it */
|
||||
/* knows what it's doing.. */
|
||||
/* knows what it is doing. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(void) FT_Outline_Reverse( FT_Outline* outline );
|
||||
FT_EXPORT_DEF( void ) FT_Outline_Reverse( FT_Outline* outline );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -263,12 +267,13 @@
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Renders an outline within a bitmap. The outline's image is simply */
|
||||
/* or-ed to the target bitmap. */
|
||||
/* */
|
||||
/* OR-ed to the target bitmap. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a FreeType library object. */
|
||||
/* */
|
||||
/* outline :: A pointer to the source outline descriptor. */
|
||||
/* */
|
||||
/* map :: A pointer to the target bitmap descriptor. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -284,9 +289,10 @@
|
||||
/* */
|
||||
/* It will use the raster correponding to the default glyph format. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_Get_Bitmap( FT_Library library,
|
||||
FT_Outline* outline,
|
||||
FT_Bitmap* bitmap );
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Get_Bitmap( FT_Library library,
|
||||
FT_Outline* outline,
|
||||
FT_Bitmap* bitmap );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -294,15 +300,18 @@
|
||||
/* FT_Outline_Render */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Renders an outline within a bitmap using the current scan-convert */
|
||||
/* This functions uses a FT_Raster_Params as argument, allowing */
|
||||
/* advanced features like direct composition/translucency, etc.. */
|
||||
/* Renders an outline within a bitmap using the current scan-convert. */
|
||||
/* This functions uses an FT_Raster_Params structure as an argument, */
|
||||
/* allowing advanced features like direct composition, translucency, */
|
||||
/* etc. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a FreeType library object. */
|
||||
/* */
|
||||
/* outline :: A pointer to the source outline descriptor. */
|
||||
/* params :: A pointer to a FT_Raster_Params used to describe */
|
||||
/* the rendering operation */
|
||||
/* */
|
||||
/* params :: A pointer to a FT_Raster_Params structure used to */
|
||||
/* describe the rendering operation. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
@ -312,16 +321,16 @@
|
||||
/* scan-line converter will be serialized. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* You should know what you're doing and the role of FT_Raster_Params */
|
||||
/* You should know what you are doing and how FT_Raster_Params works */
|
||||
/* to use this function. */
|
||||
/* */
|
||||
/* the field "params.source" will be set to "outline" before the */
|
||||
/* scan converter is called, which means that the value you give it */
|
||||
/* is actually ignored.. */
|
||||
/* The field `params.source' will be set to `outline' before the scan */
|
||||
/* converter is called, which means that the value you give to it is */
|
||||
/* actually ignored. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Outline_Render( FT_Library library,
|
||||
FT_Outline* outline,
|
||||
FT_Raster_Params* params );
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Outline_Render( FT_Library library,
|
||||
FT_Outline* outline,
|
||||
FT_Raster_Params* params );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -2,19 +2,20 @@
|
||||
/* */
|
||||
/* ftrender.h */
|
||||
/* */
|
||||
/* FreeType renderer modules public interface */
|
||||
/* FreeType renderer modules public interface */
|
||||
/* */
|
||||
/* Copyright 1996-2000 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used */
|
||||
/* modified and distributed under the terms of the FreeType project */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FTRENDER_H
|
||||
#define FTRENDER_H
|
||||
|
||||
@ -27,27 +28,27 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* create a new glyph object */
|
||||
typedef FT_Error (*FT_Glyph_Init_Func)( FT_Glyph glyph,
|
||||
FT_GlyphSlot slot );
|
||||
/* create a new glyph object */
|
||||
typedef FT_Error (*FT_Glyph_Init_Func)( FT_Glyph glyph,
|
||||
FT_GlyphSlot slot );
|
||||
|
||||
/* destroys a given glyph object */
|
||||
typedef void (*FT_Glyph_Done_Func)( FT_Glyph glyph );
|
||||
/* destroys a given glyph object */
|
||||
typedef void (*FT_Glyph_Done_Func)( FT_Glyph glyph );
|
||||
|
||||
typedef void (*FT_Glyph_Transform_Func)( FT_Glyph glyph,
|
||||
FT_Matrix* matrix,
|
||||
FT_Vector* delta );
|
||||
|
||||
typedef void (*FT_Glyph_BBox_Func)( FT_Glyph glyph,
|
||||
FT_BBox *abbox );
|
||||
typedef void (*FT_Glyph_Transform_Func)( FT_Glyph glyph,
|
||||
FT_Matrix* matrix,
|
||||
FT_Vector* delta );
|
||||
|
||||
typedef FT_Error (*FT_Glyph_Copy_Func)( FT_Glyph source,
|
||||
FT_Glyph target );
|
||||
|
||||
typedef FT_Error (*FT_Glyph_Prepare_Func)( FT_Glyph glyph,
|
||||
FT_GlyphSlot slot );
|
||||
typedef void (*FT_Glyph_BBox_Func)( FT_Glyph glyph,
|
||||
FT_BBox* abbox );
|
||||
|
||||
struct FT_Glyph_Class_
|
||||
typedef FT_Error (*FT_Glyph_Copy_Func)( FT_Glyph source,
|
||||
FT_Glyph target );
|
||||
|
||||
typedef FT_Error (*FT_Glyph_Prepare_Func)( FT_Glyph glyph,
|
||||
FT_GlyphSlot slot );
|
||||
|
||||
struct FT_Glyph_Class_
|
||||
{
|
||||
FT_UInt glyph_size;
|
||||
FT_Glyph_Format glyph_format;
|
||||
@ -57,37 +58,9 @@
|
||||
FT_Glyph_Transform_Func glyph_transform;
|
||||
FT_Glyph_BBox_Func glyph_bbox;
|
||||
FT_Glyph_Prepare_Func glyph_prepare;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Struct>
|
||||
* FT_Renderer_Class
|
||||
*
|
||||
* <Description>
|
||||
* The renderer module class descriptor.
|
||||
*
|
||||
* <Fields>
|
||||
* root :: the root FT_Module_Class fields
|
||||
*
|
||||
* glyph_format :: the glyph image format this renderer handles
|
||||
*
|
||||
* render_glyph :: a method used to render the image that is in a
|
||||
* given glyph slot into a bitmap.
|
||||
*
|
||||
* set_mode :: a method used to pass additional parameters
|
||||
*
|
||||
* raster_class :: for ft_glyph_format_outline renderers only, this
|
||||
* is a pointer to its raster's class.
|
||||
*
|
||||
* raster :: for ft_glyph_format_outline renderers only. this
|
||||
* is a pointer to the corresponding raster object,
|
||||
* if any..
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
typedef FT_Error (*FTRenderer_render)( FT_Renderer renderer,
|
||||
FT_GlyphSlot slot,
|
||||
FT_UInt mode,
|
||||
@ -98,20 +71,46 @@
|
||||
FT_Matrix* matrix,
|
||||
FT_Vector* delta );
|
||||
|
||||
typedef void (*FTRenderer_getCBox)( FT_Renderer renderer,
|
||||
FT_GlyphSlot slot,
|
||||
FT_BBox *cbox );
|
||||
typedef void (*FTRenderer_getCBox)( FT_Renderer renderer,
|
||||
FT_GlyphSlot slot,
|
||||
FT_BBox* cbox );
|
||||
|
||||
typedef FT_Error (*FTRenderer_setMode)( FT_Renderer renderer,
|
||||
FT_ULong mode_tag,
|
||||
FT_Pointer mode_ptr );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Renderer_Class */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The renderer module class descriptor. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* root :: The root FT_Module_Class fields. */
|
||||
/* */
|
||||
/* glyph_format :: The glyph image format this renderer handles. */
|
||||
/* */
|
||||
/* render_glyph :: A method used to render the image that is in a */
|
||||
/* given glyph slot into a bitmap. */
|
||||
/* */
|
||||
/* set_mode :: A method used to pass additional parameters. */
|
||||
/* */
|
||||
/* raster_class :: For `ft_glyph_format_outline' renderers only, this */
|
||||
/* is a pointer to its raster's class. */
|
||||
/* */
|
||||
/* raster :: For `ft_glyph_format_outline' renderers only. this */
|
||||
/* is a pointer to the corresponding raster object, */
|
||||
/* if any. */
|
||||
/* */
|
||||
typedef struct FT_Renderer_Class_
|
||||
{
|
||||
FT_Module_Class root;
|
||||
|
||||
|
||||
FT_Glyph_Format glyph_format;
|
||||
|
||||
|
||||
FTRenderer_render render_glyph;
|
||||
FTRenderer_transform transform_glyph;
|
||||
FTRenderer_getCBox get_glyph_cbox;
|
||||
@ -122,73 +121,71 @@
|
||||
} FT_Renderer_Class;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Function>
|
||||
* FT_Get_Renderer
|
||||
*
|
||||
* <Description>
|
||||
* retrieves the current renderer for a given glyph format.
|
||||
*
|
||||
* <Input>
|
||||
* library :: handle to library object
|
||||
* format :: glyph format
|
||||
*
|
||||
* <Return>
|
||||
* renderer handle. 0 if none found.
|
||||
*
|
||||
* <Note>
|
||||
* An error will be returned if a module already exists by that
|
||||
* name, or if the module requires a version of freetype that is
|
||||
* too great
|
||||
*
|
||||
* To add a new renderer, simply use FT_Add_Module. To retrieve
|
||||
* a renderer by its name, use FT_Get_Module
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
FT_EXPORT_DEF(FT_Renderer) FT_Get_Renderer( FT_Library library,
|
||||
FT_Glyph_Format format );
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Get_Renderer */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Retrieves the current renderer for a given glyph format. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to the library object. */
|
||||
/* */
|
||||
/* format :: The glyph format. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* A renderer handle. 0 if none found. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* An error will be returned if a module already exists by that name, */
|
||||
/* or if the module requires a version of FreeType that is too great. */
|
||||
/* */
|
||||
/* To add a new renderer, simply use FT_Add_Module(). To retrieve a */
|
||||
/* renderer by its name, use FT_Get_Module(). */
|
||||
/* */
|
||||
FT_EXPORT_DEF( FT_Renderer ) FT_Get_Renderer( FT_Library library,
|
||||
FT_Glyph_Format format );
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Function>
|
||||
* FT_Set_Renderer
|
||||
*
|
||||
* <Description>
|
||||
* Sets the current renderer to use, and set additional mode
|
||||
*
|
||||
* <Input>
|
||||
* library :: handle to library object
|
||||
* renderer :: handle to renderer object
|
||||
* num_params :: number of additional parameters
|
||||
* params :: additional parameters
|
||||
*
|
||||
* <Return>
|
||||
* Error code. 0 means success.
|
||||
*
|
||||
* <Note>
|
||||
* in case of success, the renderer will be used to convert glyph
|
||||
* images in the renderer's known format into bitmaps.
|
||||
*
|
||||
* This doesn't change the current renderer for other formats..
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Set_Renderer */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Sets the current renderer to use, and set additional mode. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to the library object. */
|
||||
/* */
|
||||
/* renderer :: A handle to the renderer object. */
|
||||
/* */
|
||||
/* num_params :: The number of additional parameters. */
|
||||
/* */
|
||||
/* parameters :: Additional parameters. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* In case of success, the renderer will be used to convert glyph */
|
||||
/* images in the renderer's known format into bitmaps. */
|
||||
/* */
|
||||
/* This doesn't change the current renderer for other formats. */
|
||||
/* */
|
||||
FT_EXPORT_DEF(FT_Error) FT_Set_Renderer( FT_Library library,
|
||||
FT_Renderer renderer,
|
||||
FT_UInt num_params,
|
||||
FT_Parameter* parameters );
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* FTMODULE_H */
|
||||
#endif /* FTRENDER_H */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -1,45 +1,46 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* ftsystem.h 1.0
|
||||
*
|
||||
* FreeType low-level system interface definition
|
||||
*
|
||||
* This file contains the definitions of the stream and memory interfaces
|
||||
* used by FreeType.
|
||||
*
|
||||
*
|
||||
* Copyright 1996-2000 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used
|
||||
* modified and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
**************************************************************************/
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftsystem.h */
|
||||
/* */
|
||||
/* FreeType low-level system interface definition */
|
||||
/* */
|
||||
/* Copyright 1996-2000 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FTSYSTEM_H
|
||||
#define FTSYSTEM_H
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* M E M O R Y M A N A G E M E N T
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* M E M O R Y M A N A G E M E N T */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
typedef struct FT_MemoryRec_* FT_Memory;
|
||||
|
||||
typedef void* (*FT_Alloc_Func)( FT_Memory memory,
|
||||
long size );
|
||||
|
||||
typedef void* (*FT_Alloc_Func)( FT_Memory memory,
|
||||
long size );
|
||||
|
||||
typedef void (*FT_Free_Func)( FT_Memory memory,
|
||||
void* block );
|
||||
|
||||
typedef void* (*FT_Realloc_Func)( FT_Memory memory,
|
||||
long cur_size,
|
||||
long new_size,
|
||||
void* block );
|
||||
typedef void* (*FT_Realloc_Func)( FT_Memory memory,
|
||||
long cur_size,
|
||||
long new_size,
|
||||
void* block );
|
||||
|
||||
|
||||
struct FT_MemoryRec_
|
||||
{
|
||||
@ -50,46 +51,51 @@
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* I / O M A N A G E M E N T */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* I / O M A N A G E M E N T
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
typedef union FT_StreamDesc_
|
||||
typedef union FT_StreamDesc_
|
||||
{
|
||||
long value;
|
||||
void* pointer;
|
||||
long value;
|
||||
void* pointer;
|
||||
|
||||
} FT_StreamDesc;
|
||||
|
||||
|
||||
typedef struct FT_StreamRec_* FT_Stream;
|
||||
|
||||
typedef unsigned long (*FT_Stream_IO)( FT_Stream stream,
|
||||
|
||||
typedef unsigned long (*FT_Stream_IO)( FT_Stream stream,
|
||||
unsigned long offset,
|
||||
unsigned char* buffer,
|
||||
unsigned long count );
|
||||
|
||||
typedef void (*FT_Stream_Close)( FT_Stream stream );
|
||||
typedef void (*FT_Stream_Close)( FT_Stream stream );
|
||||
|
||||
struct FT_StreamRec_
|
||||
|
||||
struct FT_StreamRec_
|
||||
{
|
||||
unsigned char* base;
|
||||
unsigned long size;
|
||||
unsigned long pos;
|
||||
unsigned char* base;
|
||||
unsigned long size;
|
||||
unsigned long pos;
|
||||
|
||||
FT_StreamDesc descriptor;
|
||||
FT_StreamDesc pathname; /* ignored by FreeType - useful for debugging */
|
||||
FT_StreamDesc descriptor;
|
||||
FT_StreamDesc pathname; /* ignored by FreeType -- */
|
||||
/* useful for debugging */
|
||||
FT_Stream_IO read;
|
||||
FT_Stream_Close close;
|
||||
|
||||
FT_Stream_IO read;
|
||||
FT_Stream_Close close;
|
||||
|
||||
FT_Memory memory;
|
||||
unsigned char* cursor;
|
||||
unsigned char* limit;
|
||||
FT_Memory memory;
|
||||
unsigned char* cursor;
|
||||
unsigned char* limit;
|
||||
};
|
||||
|
||||
|
||||
#endif /* FTSYSTEM_H */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -7,20 +7,23 @@
|
||||
/* Copyright 1996-2000 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used */
|
||||
/* modified and distributed under the terms of the FreeType project */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FTTYPES_H
|
||||
#define FTTYPES_H
|
||||
|
||||
|
||||
#include <freetype/ftsystem.h>
|
||||
#include <freetype/ftimage.h>
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
@ -41,7 +44,7 @@
|
||||
/* A signed 16-bit integer used to store a distance in original font */
|
||||
/* units. */
|
||||
/* */
|
||||
typedef signed short FT_FWord; /* Distance in FUnits */
|
||||
typedef signed short FT_FWord; /* distance in FUnits */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -53,7 +56,7 @@
|
||||
/* An unsigned 16-bit integer used to store a distance in original */
|
||||
/* font units. */
|
||||
/* */
|
||||
typedef unsigned short FT_UFWord; /* Unsigned distance */
|
||||
typedef unsigned short FT_UFWord; /* unsigned distance */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -212,17 +215,19 @@
|
||||
/* */
|
||||
typedef void* FT_Pointer;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_UnitVector */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to store a 2d vector unit vector. Uses */
|
||||
/* A simple structure used to store a 2D vector unit vector. Uses */
|
||||
/* FT_F2Dot14 types. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* x :: Horizontal coordinate. */
|
||||
/* */
|
||||
/* y :: Vertical coordinate. */
|
||||
/* */
|
||||
typedef struct FT_UnitVector_
|
||||
@ -249,8 +254,11 @@
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* xx :: Matrix coefficient. */
|
||||
/* */
|
||||
/* xy :: Matrix coefficient. */
|
||||
/* */
|
||||
/* yx :: Matrix coefficient. */
|
||||
/* */
|
||||
/* yy :: Matrix coefficient. */
|
||||
/* */
|
||||
typedef struct FT_Matrix_
|
||||
@ -273,8 +281,11 @@
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* xMin :: The horizontal minimum (left-most). */
|
||||
/* */
|
||||
/* yMin :: The vertical minimum (bottom-most). */
|
||||
/* */
|
||||
/* xMax :: The horizontal maximum (right-most). */
|
||||
/* */
|
||||
/* yMax :: The vertical maximum (top-most). */
|
||||
/* */
|
||||
typedef struct FT_BBox_
|
||||
@ -295,10 +306,10 @@
|
||||
/* TrueType tables into an unsigned long to be used within FreeType. */
|
||||
/* */
|
||||
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
||||
(((FT_ULong)_x1 << 24) | \
|
||||
((FT_ULong)_x2 << 16) | \
|
||||
((FT_ULong)_x3 << 8) | \
|
||||
(FT_ULong)_x4)
|
||||
( ( (FT_ULong)_x1 << 24 ) | \
|
||||
( (FT_ULong)_x2 << 16 ) | \
|
||||
( (FT_ULong)_x3 << 8 ) | \
|
||||
(FT_ULong)_x4 )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -343,9 +354,11 @@
|
||||
/* A structure used to hold a single list element. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* prev :: Previous element in the list. NULL if first. */
|
||||
/* next :: Next element in the list. NULL if last. */
|
||||
/* data :: Typeless pointer to the listed object. */
|
||||
/* prev :: The previous element in the list. NULL if first. */
|
||||
/* */
|
||||
/* next :: The next element in the list. NULL if last. */
|
||||
/* */
|
||||
/* data :: A typeless pointer to the listed object. */
|
||||
/* */
|
||||
typedef struct FT_ListNodeRec_
|
||||
{
|
||||
@ -366,8 +379,9 @@
|
||||
/* used in many parts of FreeType. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* head :: Head (first element) of doubly-linked list. */
|
||||
/* tail :: Tail (last element) of doubly-linked list. */
|
||||
/* head :: The head (first element) of doubly-linked list. */
|
||||
/* */
|
||||
/* tail :: The tail (last element) of doubly-linked list. */
|
||||
/* */
|
||||
typedef struct FT_ListRec_
|
||||
{
|
||||
@ -377,8 +391,10 @@
|
||||
} FT_ListRec;
|
||||
|
||||
|
||||
#define FT_IS_EMPTY(list) ( (list).head == 0 )
|
||||
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
||||
|
||||
|
||||
#endif /* FTTYPES_H */
|
||||
/* END */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -4,116 +4,113 @@
|
||||
/* */
|
||||
/* Basic Type 1/Type 2 tables definitions and interface */
|
||||
/* */
|
||||
/* */
|
||||
/* Copyright 1996-2000 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used */
|
||||
/* modified and distributed under the terms of the FreeType project */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef T1TABLES_H
|
||||
#define T1TABLES_H
|
||||
|
||||
|
||||
#include <freetype/freetype.h>
|
||||
|
||||
/* Note that we separate font data in T1_FontInfo and T1_Private structures */
|
||||
/* in order to later support multiple master fonts.. */
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Struct>
|
||||
* T1_FontInfo
|
||||
*
|
||||
* <Description>
|
||||
* A structure used to model a Type1/Type2 FontInfo dictionary
|
||||
* Note that for multiple-master fonts, each instance has its own
|
||||
* FontInfo.
|
||||
*
|
||||
*/
|
||||
/* Note that we separate font data in T1_FontInfo and T1_Private */
|
||||
/* structures in order to support Multiple Master fonts. */
|
||||
|
||||
typedef struct T1_FontInfo
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* T1_FontInfo */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
|
||||
/* that for Multiple Master fonts, each instance has its own */
|
||||
/* FontInfo. */
|
||||
/* */
|
||||
typedef struct T1_FontInfo
|
||||
{
|
||||
FT_String* version;
|
||||
FT_String* notice;
|
||||
FT_String* full_name;
|
||||
FT_String* family_name;
|
||||
FT_String* weight;
|
||||
FT_Long italic_angle;
|
||||
FT_Bool is_fixed_pitch;
|
||||
FT_Short underline_position;
|
||||
FT_UShort underline_thickness;
|
||||
FT_String* version;
|
||||
FT_String* notice;
|
||||
FT_String* full_name;
|
||||
FT_String* family_name;
|
||||
FT_String* weight;
|
||||
FT_Long italic_angle;
|
||||
FT_Bool is_fixed_pitch;
|
||||
FT_Short underline_position;
|
||||
FT_UShort underline_thickness;
|
||||
|
||||
} T1_FontInfo;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Struct>
|
||||
* T1_Private
|
||||
*
|
||||
* <Description>
|
||||
* A structure used to model a Type1/Type2 FontInfo dictionary
|
||||
* Note that for multiple-master fonts, each instance has its own
|
||||
* Private dict.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct T1_Private
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* T1_Private */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used to model a Type1/Type2 FontInfo dictionary. Note */
|
||||
/* that for Multiple Master fonts, each instance has its own Private */
|
||||
/* dict. */
|
||||
/*
|
||||
typedef struct T1_Private
|
||||
{
|
||||
FT_Int unique_id;
|
||||
FT_Int lenIV;
|
||||
|
||||
FT_Int unique_id;
|
||||
FT_Int lenIV;
|
||||
FT_Byte num_blue_values;
|
||||
FT_Byte num_other_blues;
|
||||
FT_Byte num_family_blues;
|
||||
FT_Byte num_family_other_blues;
|
||||
|
||||
FT_Byte num_blue_values;
|
||||
FT_Byte num_other_blues;
|
||||
FT_Byte num_family_blues;
|
||||
FT_Byte num_family_other_blues;
|
||||
FT_Short blue_values[14];
|
||||
FT_Short other_blues[10];
|
||||
|
||||
FT_Short blue_values[14];
|
||||
FT_Short other_blues[10];
|
||||
FT_Short family_blues [14];
|
||||
FT_Short family_other_blues[10];
|
||||
|
||||
FT_Short family_blues [14];
|
||||
FT_Short family_other_blues[10];
|
||||
FT_Fixed blue_scale;
|
||||
FT_Int blue_shift;
|
||||
FT_Int blue_fuzz;
|
||||
|
||||
FT_Fixed blue_scale;
|
||||
FT_Int blue_shift;
|
||||
FT_Int blue_fuzz;
|
||||
FT_UShort standard_width[1];
|
||||
FT_UShort standard_height[1];
|
||||
|
||||
FT_UShort standard_width[1];
|
||||
FT_UShort standard_height[1];
|
||||
FT_Byte num_snap_widths;
|
||||
FT_Byte num_snap_heights;
|
||||
FT_Bool force_bold;
|
||||
FT_Bool round_stem_up;
|
||||
|
||||
FT_Byte num_snap_widths;
|
||||
FT_Byte num_snap_heights;
|
||||
FT_Bool force_bold;
|
||||
FT_Bool round_stem_up;
|
||||
FT_Short snap_widths [13]; /* reserve one place for the std */
|
||||
FT_Short snap_heights[13]; /* reserve one place for the std */
|
||||
|
||||
FT_Short snap_widths [13]; /* reserve one place for the std */
|
||||
FT_Short snap_heights[13]; /* reserve one place for the std */
|
||||
FT_Long language_group;
|
||||
FT_Long password;
|
||||
|
||||
FT_Long language_group;
|
||||
FT_Long password;
|
||||
|
||||
FT_Short min_feature[2];
|
||||
FT_Short min_feature[2];
|
||||
|
||||
} T1_Private;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* <Enum>
|
||||
* T1_Blend_Flags
|
||||
*
|
||||
* <Description>
|
||||
* A set of flags used to indicate which fields are present in a
|
||||
* given blen dictionary (font info or private). Used to support
|
||||
* multiple masters..
|
||||
*
|
||||
*/
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* T1_Blend_Flags */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A set of flags used to indicate which fields are present in a */
|
||||
/* given blen dictionary (font info or private). Used to support */
|
||||
/* Multiple Masters fonts. */
|
||||
/* */
|
||||
typedef enum
|
||||
{
|
||||
/* required fields in a FontInfo blend dictionary */
|
||||
@ -139,17 +136,19 @@
|
||||
|
||||
} T1_Blend_Flags;
|
||||
|
||||
/* maximum number of multiple-masters designs, per-se the spec */
|
||||
#define T1_MAX_MM_DESIGNS 16
|
||||
|
||||
/* maximum number of Multiple Masters designs, as defined in the spec */
|
||||
#define T1_MAX_MM_DESIGNS 16
|
||||
|
||||
/* maximum number of multiple-masters axis, per-se the spec */
|
||||
/* maximum number of Multiple Masters axes, as defined in the spec */
|
||||
#define T1_MAX_MM_AXIS 4
|
||||
|
||||
/* maximum number of elements in a design map */
|
||||
#define T1_MAX_MM_MAP_POINTS 20
|
||||
#define T1_MAX_MM_MAP_POINTS 20
|
||||
|
||||
|
||||
/* this structure is used to store the BlendDesignMap entry for an axis */
|
||||
typedef struct T1_DesignMap_
|
||||
typedef struct T1_DesignMap_
|
||||
{
|
||||
FT_Byte num_points;
|
||||
FT_Fixed* design_points;
|
||||
@ -158,77 +157,78 @@
|
||||
} T1_DesignMap;
|
||||
|
||||
|
||||
typedef struct T1_Blend_
|
||||
typedef struct T1_Blend_
|
||||
{
|
||||
FT_UInt num_designs;
|
||||
FT_UInt num_axis;
|
||||
|
||||
FT_String* axis_names[ T1_MAX_MM_AXIS ];
|
||||
FT_Fixed* design_pos[ T1_MAX_MM_DESIGNS ];
|
||||
T1_DesignMap design_map[ T1_MAX_MM_AXIS ];
|
||||
FT_String* axis_names[T1_MAX_MM_AXIS];
|
||||
FT_Fixed* design_pos[T1_MAX_MM_DESIGNS];
|
||||
T1_DesignMap design_map[T1_MAX_MM_AXIS];
|
||||
|
||||
FT_Fixed* weight_vector;
|
||||
FT_Fixed* default_weight_vector;
|
||||
|
||||
T1_FontInfo* font_infos[ T1_MAX_MM_DESIGNS+1 ];
|
||||
T1_Private* privates [ T1_MAX_MM_DESIGNS+1 ];
|
||||
T1_FontInfo* font_infos[T1_MAX_MM_DESIGNS + 1];
|
||||
T1_Private* privates [T1_MAX_MM_DESIGNS + 1];
|
||||
|
||||
FT_ULong blend_bitflags;
|
||||
|
||||
} T1_Blend;
|
||||
|
||||
|
||||
|
||||
typedef struct CID_FontDict_
|
||||
typedef struct CID_FontDict_
|
||||
{
|
||||
T1_Private private_dict;
|
||||
T1_Private private_dict;
|
||||
|
||||
FT_UInt len_buildchar;
|
||||
FT_Fixed forcebold_threshold;
|
||||
FT_Pos stroke_width;
|
||||
FT_Fixed expansion_factor;
|
||||
FT_UInt len_buildchar;
|
||||
FT_Fixed forcebold_threshold;
|
||||
FT_Pos stroke_width;
|
||||
FT_Fixed expansion_factor;
|
||||
|
||||
FT_Byte paint_type;
|
||||
FT_Byte font_type;
|
||||
FT_Matrix font_matrix;
|
||||
FT_Byte paint_type;
|
||||
FT_Byte font_type;
|
||||
FT_Matrix font_matrix;
|
||||
|
||||
FT_UInt num_subrs;
|
||||
FT_ULong subrmap_offset;
|
||||
FT_Int sd_bytes;
|
||||
FT_UInt num_subrs;
|
||||
FT_ULong subrmap_offset;
|
||||
FT_Int sd_bytes;
|
||||
|
||||
} CID_FontDict;
|
||||
|
||||
|
||||
typedef struct CID_Info_
|
||||
typedef struct CID_Info_
|
||||
{
|
||||
FT_String* cid_font_name;
|
||||
FT_Fixed cid_version;
|
||||
FT_Int cid_font_type;
|
||||
FT_String* cid_font_name;
|
||||
FT_Fixed cid_version;
|
||||
FT_Int cid_font_type;
|
||||
|
||||
FT_String* registry;
|
||||
FT_String* ordering;
|
||||
FT_Int supplement;
|
||||
FT_String* registry;
|
||||
FT_String* ordering;
|
||||
FT_Int supplement;
|
||||
|
||||
T1_FontInfo font_info;
|
||||
FT_BBox font_bbox;
|
||||
FT_ULong uid_base;
|
||||
T1_FontInfo font_info;
|
||||
FT_BBox font_bbox;
|
||||
FT_ULong uid_base;
|
||||
|
||||
FT_Int num_xuid;
|
||||
FT_ULong xuid[16];
|
||||
FT_Int num_xuid;
|
||||
FT_ULong xuid[16];
|
||||
|
||||
|
||||
FT_ULong cidmap_offset;
|
||||
FT_Int fd_bytes;
|
||||
FT_Int gd_bytes;
|
||||
FT_ULong cid_count;
|
||||
FT_ULong cidmap_offset;
|
||||
FT_Int fd_bytes;
|
||||
FT_Int gd_bytes;
|
||||
FT_ULong cid_count;
|
||||
|
||||
FT_Int num_dicts;
|
||||
CID_FontDict* font_dicts;
|
||||
|
||||
FT_ULong data_offset;
|
||||
FT_ULong data_offset;
|
||||
|
||||
} CID_Info;
|
||||
|
||||
|
||||
|
||||
#endif /* T1TABLES_H */
|
||||
|
||||
|
||||
/* END */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2502,7 +2502,7 @@
|
||||
/* */
|
||||
/* num_params :: The number of additional parameters. */
|
||||
/* */
|
||||
/* params :: Additional parameters. */
|
||||
/* parameters :: Additional parameters. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
|
@ -530,7 +530,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
|
Loading…
Reference in New Issue
Block a user