-/***************************************************************************/
-/* */
-/* ftmm.h */
-/* */
-/* FreeType Multiple Master font interface (specification). */
-/* */
-/* Copyright 1996-2001, 2003, 2004, 2006 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 __FTMM_H__
-#define __FTMM_H__
-
-
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
- /*************************************************************************/
- /* */
- /* <Section> */
- /* multiple_masters */
- /* */
- /* <Title> */
- /* Multiple Masters */
- /* */
- /* <Abstract> */
- /* How to manage Multiple Masters fonts. */
- /* */
- /* <Description> */
- /* The following types and functions are used to manage Multiple */
- /* Master fonts, i.e., the selection of specific design instances by */
- /* setting design axis coordinates. */
- /* */
- /* George Williams has extended this interface to make it work with */
- /* both Type 1 Multiple Masters fonts and GX distortable (var) */
- /* fonts. Some of these routines only work with MM fonts, others */
- /* will work with both types. They are similar enough that a */
- /* consistent interface makes sense. */
- /* */
- /*************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_MM_Axis */
- /* */
- /* <Description> */
- /* A simple structure used to model a given axis in design space for */
- /* Multiple Masters fonts. */
- /* */
- /* This structure can't be used for GX var fonts. */
- /* */
- /* <Fields> */
- /* name :: The axis's name. */
- /* */
- /* minimum :: The axis's minimum design coordinate. */
- /* */
- /* maximum :: The axis's maximum design coordinate. */
- /* */
- typedef struct FT_MM_Axis_
- {
- FT_String* name;
- FT_Long minimum;
- FT_Long maximum;
-
- } FT_MM_Axis;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Multi_Master */
- /* */
- /* <Description> */
- /* A structure used to model the axes and space of a Multiple Masters */
- /* font. */
- /* */
- /* This structure can't be used for GX var fonts. */
- /* */
- /* <Fields> */
- /* num_axis :: Number of axes. Cannot exceed 4. */
- /* */
- /* num_designs :: Number of designs; should be normally 2^num_axis */
- /* even though the Type 1 specification strangely */
- /* allows for intermediate designs to be present. This */
- /* number cannot exceed 16. */
- /* */
- /* axis :: A table of axis descriptors. */
- /* */
- typedef struct FT_Multi_Master_
- {
- FT_UInt num_axis;
- FT_UInt num_designs;
- FT_MM_Axis axis[T1_MAX_MM_AXIS];
-
- } FT_Multi_Master;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Var_Axis */
- /* */
- /* <Description> */
- /* A simple structure used to model a given axis in design space for */
- /* Multiple Masters and GX var fonts. */
- /* */
- /* <Fields> */
- /* name :: The axis's name. */
- /* Not always meaningful for GX. */
- /* */
- /* minimum :: The axis's minimum design coordinate. */
- /* */
- /* def :: The axis's default design coordinate. */
- /* FreeType computes meaningful default values for MM; it */
- /* is then an integer value, not in 16.16 format. */
- /* */
- /* maximum :: The axis's maximum design coordinate. */
- /* */
- /* tag :: The axis's tag (the GX equivalent to `name'). */
- /* FreeType provides default values for MM if possible. */
- /* */
- /* strid :: The entry in `name' table (another GX version of */
- /* `name'). */
- /* Not meaningful for MM. */
- /* */
- typedef struct FT_Var_Axis_
- {
- FT_String* name;
-
- FT_Fixed minimum;
- FT_Fixed def;
- FT_Fixed maximum;
-
- FT_ULong tag;
- FT_UInt strid;
-
- } FT_Var_Axis;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Var_Named_Style */
- /* */
- /* <Description> */
- /* A simple structure used to model a named style in a GX var font. */
- /* */
- /* This structure can't be used for MM fonts. */
- /* */
- /* <Fields> */
- /* coords :: The design coordinates for this style. */
- /* This is an array with one entry for each axis. */
- /* */
- /* strid :: The entry in `name' table identifying this style. */
- /* */
- typedef struct FT_Var_Named_Style_
- {
- FT_Fixed* coords;
- FT_UInt strid;
-
- } FT_Var_Named_Style;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_MM_Var */
- /* */
- /* <Description> */
- /* A structure used to model the axes and space of a Multiple Masters */
- /* or GX var distortable font. */
- /* */
- /* Some fields are specific to one format and not to the other. */
- /* */
- /* <Fields> */
- /* num_axis :: The number of axes. The maximum value is 4 for */
- /* MM; no limit in GX. */
- /* */
- /* num_designs :: The number of designs; should be normally */
- /* 2^num_axis for MM fonts. Not meaningful for GX */
- /* (where every glyph could have a different */
- /* number of designs). */
- /* */
- /* num_namedstyles :: The number of named styles; only meaningful for */
- /* GX which allows certain design coordinates to */
- /* have a string ID (in the `name' table) */
- /* associated with them. The font can tell the */
- /* user that, for example, Weight=1.5 is `Bold'. */
- /* */
- /* axis :: A table of axis descriptors. */
- /* GX fonts contain slightly more data than MM. */
- /* */
- /* namedstyles :: A table of named styles. */
- /* Only meaningful with GX. */
- /* */
- typedef struct FT_MM_Var_
- {
- FT_UInt num_axis;
- FT_UInt num_designs;
- FT_UInt num_namedstyles;
- FT_Var_Axis* axis;
- FT_Var_Named_Style* namedstyle;
-
- } FT_MM_Var;
-
-
- /* */
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Multi_Master */
- /* */
- /* <Description> */
- /* Retrieves the Multiple Master descriptor of a given font. */
- /* */
- /* This function can't be used with GX fonts. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* <Output> */
- /* amaster :: The Multiple Masters descriptor. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Get_Multi_Master( FT_Face face,
- FT_Multi_Master *amaster );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_MM_Var */
- /* */
- /* <Description> */
- /* Retrieves the Multiple Master/GX var descriptor of a given font. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* <Output> */
- /* amaster :: The Multiple Masters descriptor. */
- /* Allocates a data structure, which the user must free */
- /* (a single call to FT_FREE will do it). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Get_MM_Var( FT_Face face,
- FT_MM_Var* *amaster );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_MM_Design_Coordinates */
- /* */
- /* <Description> */
- /* For Multiple Masters fonts, choose an interpolated font design */
- /* through design coordinates. */
- /* */
- /* This function can't be used with GX fonts. */
- /* */
- /* <InOut> */
- /* face :: A handle to the source face. */
- /* */
- /* <Input> */
- /* num_coords :: The number of design coordinates (must be equal to */
- /* the number of axes in the font). */
- /* */
- /* coords :: An array of design coordinates. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Set_MM_Design_Coordinates( FT_Face face,
- FT_UInt num_coords,
- FT_Long* coords );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Var_Design_Coordinates */
- /* */
- /* <Description> */
- /* For Multiple Master or GX Var fonts, choose an interpolated font */
- /* design through design coordinates. */
- /* */
- /* <InOut> */
- /* face :: A handle to the source face. */
- /* */
- /* <Input> */
- /* num_coords :: The number of design coordinates (must be equal to */
- /* the number of axes in the font). */
- /* */
- /* coords :: An array of design coordinates. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Set_Var_Design_Coordinates( FT_Face face,
- FT_UInt num_coords,
- FT_Fixed* coords );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_MM_Blend_Coordinates */
- /* */
- /* <Description> */
- /* For Multiple Masters and GX var fonts, choose an interpolated font */
- /* design through normalized blend coordinates. */
- /* */
- /* <InOut> */
- /* face :: A handle to the source face. */
- /* */
- /* <Input> */
- /* num_coords :: The number of design coordinates (must be equal to */
- /* the number of axes in the font). */
- /* */
- /* coords :: The design coordinates array (each element must be */
- /* between 0 and 1.0). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Set_MM_Blend_Coordinates( FT_Face face,
- FT_UInt num_coords,
- FT_Fixed* coords );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Var_Blend_Coordinates */
- /* */
- /* <Description> */
- /* This is another name of @FT_Set_MM_Blend_Coordinates. */
- /* */
- FT_EXPORT( FT_Error )
- FT_Set_Var_Blend_Coordinates( FT_Face face,
- FT_UInt num_coords,
- FT_Fixed* coords );
-
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTMM_H__ */
-
-
-/* END */
+/***************************************************************************/\r
+/* */\r
+/* ftmm.h */\r
+/* */\r
+/* FreeType Multiple Master font interface (specification). */\r
+/* */\r
+/* Copyright 1996-2001, 2003, 2004, 2006 by */\r
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */\r
+/* */\r
+/* This file is part of the FreeType project, and may only be used, */\r
+/* modified, and distributed under the terms of the FreeType project */\r
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */\r
+/* this file you indicate that you have read the license and */\r
+/* understand and accept it fully. */\r
+/* */\r
+/***************************************************************************/\r
+\r
+\r
+#ifndef __FTMM_H__\r
+#define __FTMM_H__\r
+\r
+\r
+#include <ft2build.h>\r
+#include FT_TYPE1_TABLES_H\r
+\r
+\r
+FT_BEGIN_HEADER\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Section> */\r
+ /* multiple_masters */\r
+ /* */\r
+ /* <Title> */\r
+ /* Multiple Masters */\r
+ /* */\r
+ /* <Abstract> */\r
+ /* How to manage Multiple Masters fonts. */\r
+ /* */\r
+ /* <Description> */\r
+ /* The following types and functions are used to manage Multiple */\r
+ /* Master fonts, i.e., the selection of specific design instances by */\r
+ /* setting design axis coordinates. */\r
+ /* */\r
+ /* George Williams has extended this interface to make it work with */\r
+ /* both Type 1 Multiple Masters fonts and GX distortable (var) */\r
+ /* fonts. Some of these routines only work with MM fonts, others */\r
+ /* will work with both types. They are similar enough that a */\r
+ /* consistent interface makes sense. */\r
+ /* */\r
+ /*************************************************************************/\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Struct> */\r
+ /* FT_MM_Axis */\r
+ /* */\r
+ /* <Description> */\r
+ /* A simple structure used to model a given axis in design space for */\r
+ /* Multiple Masters fonts. */\r
+ /* */\r
+ /* This structure can't be used for GX var fonts. */\r
+ /* */\r
+ /* <Fields> */\r
+ /* name :: The axis's name. */\r
+ /* */\r
+ /* minimum :: The axis's minimum design coordinate. */\r
+ /* */\r
+ /* maximum :: The axis's maximum design coordinate. */\r
+ /* */\r
+ typedef struct FT_MM_Axis_\r
+ {\r
+ FT_String* name;\r
+ FT_Long minimum;\r
+ FT_Long maximum;\r
+\r
+ } FT_MM_Axis;\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Struct> */\r
+ /* FT_Multi_Master */\r
+ /* */\r
+ /* <Description> */\r
+ /* A structure used to model the axes and space of a Multiple Masters */\r
+ /* font. */\r
+ /* */\r
+ /* This structure can't be used for GX var fonts. */\r
+ /* */\r
+ /* <Fields> */\r
+ /* num_axis :: Number of axes. Cannot exceed 4. */\r
+ /* */\r
+ /* num_designs :: Number of designs; should be normally 2^num_axis */\r
+ /* even though the Type 1 specification strangely */\r
+ /* allows for intermediate designs to be present. This */\r
+ /* number cannot exceed 16. */\r
+ /* */\r
+ /* axis :: A table of axis descriptors. */\r
+ /* */\r
+ typedef struct FT_Multi_Master_\r
+ {\r
+ FT_UInt num_axis;\r
+ FT_UInt num_designs;\r
+ FT_MM_Axis axis[T1_MAX_MM_AXIS];\r
+\r
+ } FT_Multi_Master;\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Struct> */\r
+ /* FT_Var_Axis */\r
+ /* */\r
+ /* <Description> */\r
+ /* A simple structure used to model a given axis in design space for */\r
+ /* Multiple Masters and GX var fonts. */\r
+ /* */\r
+ /* <Fields> */\r
+ /* name :: The axis's name. */\r
+ /* Not always meaningful for GX. */\r
+ /* */\r
+ /* minimum :: The axis's minimum design coordinate. */\r
+ /* */\r
+ /* def :: The axis's default design coordinate. */\r
+ /* FreeType computes meaningful default values for MM; it */\r
+ /* is then an integer value, not in 16.16 format. */\r
+ /* */\r
+ /* maximum :: The axis's maximum design coordinate. */\r
+ /* */\r
+ /* tag :: The axis's tag (the GX equivalent to `name'). */\r
+ /* FreeType provides default values for MM if possible. */\r
+ /* */\r
+ /* strid :: The entry in `name' table (another GX version of */\r
+ /* `name'). */\r
+ /* Not meaningful for MM. */\r
+ /* */\r
+ typedef struct FT_Var_Axis_\r
+ {\r
+ FT_String* name;\r
+\r
+ FT_Fixed minimum;\r
+ FT_Fixed def;\r
+ FT_Fixed maximum;\r
+\r
+ FT_ULong tag;\r
+ FT_UInt strid;\r
+\r
+ } FT_Var_Axis;\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Struct> */\r
+ /* FT_Var_Named_Style */\r
+ /* */\r
+ /* <Description> */\r
+ /* A simple structure used to model a named style in a GX var font. */\r
+ /* */\r
+ /* This structure can't be used for MM fonts. */\r
+ /* */\r
+ /* <Fields> */\r
+ /* coords :: The design coordinates for this style. */\r
+ /* This is an array with one entry for each axis. */\r
+ /* */\r
+ /* strid :: The entry in `name' table identifying this style. */\r
+ /* */\r
+ typedef struct FT_Var_Named_Style_\r
+ {\r
+ FT_Fixed* coords;\r
+ FT_UInt strid;\r
+\r
+ } FT_Var_Named_Style;\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Struct> */\r
+ /* FT_MM_Var */\r
+ /* */\r
+ /* <Description> */\r
+ /* A structure used to model the axes and space of a Multiple Masters */\r
+ /* or GX var distortable font. */\r
+ /* */\r
+ /* Some fields are specific to one format and not to the other. */\r
+ /* */\r
+ /* <Fields> */\r
+ /* num_axis :: The number of axes. The maximum value is 4 for */\r
+ /* MM; no limit in GX. */\r
+ /* */\r
+ /* num_designs :: The number of designs; should be normally */\r
+ /* 2^num_axis for MM fonts. Not meaningful for GX */\r
+ /* (where every glyph could have a different */\r
+ /* number of designs). */\r
+ /* */\r
+ /* num_namedstyles :: The number of named styles; only meaningful for */\r
+ /* GX which allows certain design coordinates to */\r
+ /* have a string ID (in the `name' table) */\r
+ /* associated with them. The font can tell the */\r
+ /* user that, for example, Weight=1.5 is `Bold'. */\r
+ /* */\r
+ /* axis :: A table of axis descriptors. */\r
+ /* GX fonts contain slightly more data than MM. */\r
+ /* */\r
+ /* namedstyles :: A table of named styles. */\r
+ /* Only meaningful with GX. */\r
+ /* */\r
+ typedef struct FT_MM_Var_\r
+ {\r
+ FT_UInt num_axis;\r
+ FT_UInt num_designs;\r
+ FT_UInt num_namedstyles;\r
+ FT_Var_Axis* axis;\r
+ FT_Var_Named_Style* namedstyle;\r
+\r
+ } FT_MM_Var;\r
+\r
+\r
+ /* */\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Get_Multi_Master */\r
+ /* */\r
+ /* <Description> */\r
+ /* Retrieves the Multiple Master descriptor of a given font. */\r
+ /* */\r
+ /* This function can't be used with GX fonts. */\r
+ /* */\r
+ /* <Input> */\r
+ /* face :: A handle to the source face. */\r
+ /* */\r
+ /* <Output> */\r
+ /* amaster :: The Multiple Masters descriptor. */\r
+ /* */\r
+ /* <Return> */\r
+ /* FreeType error code. 0 means success. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Get_Multi_Master( FT_Face face,\r
+ FT_Multi_Master *amaster );\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Get_MM_Var */\r
+ /* */\r
+ /* <Description> */\r
+ /* Retrieves the Multiple Master/GX var descriptor of a given font. */\r
+ /* */\r
+ /* <Input> */\r
+ /* face :: A handle to the source face. */\r
+ /* */\r
+ /* <Output> */\r
+ /* amaster :: The Multiple Masters descriptor. */\r
+ /* Allocates a data structure, which the user must free */\r
+ /* (a single call to FT_FREE will do it). */\r
+ /* */\r
+ /* <Return> */\r
+ /* FreeType error code. 0 means success. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Get_MM_Var( FT_Face face,\r
+ FT_MM_Var* *amaster );\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Set_MM_Design_Coordinates */\r
+ /* */\r
+ /* <Description> */\r
+ /* For Multiple Masters fonts, choose an interpolated font design */\r
+ /* through design coordinates. */\r
+ /* */\r
+ /* This function can't be used with GX fonts. */\r
+ /* */\r
+ /* <InOut> */\r
+ /* face :: A handle to the source face. */\r
+ /* */\r
+ /* <Input> */\r
+ /* num_coords :: The number of design coordinates (must be equal to */\r
+ /* the number of axes in the font). */\r
+ /* */\r
+ /* coords :: An array of design coordinates. */\r
+ /* */\r
+ /* <Return> */\r
+ /* FreeType error code. 0 means success. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Set_MM_Design_Coordinates( FT_Face face,\r
+ FT_UInt num_coords,\r
+ FT_Long* coords );\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Set_Var_Design_Coordinates */\r
+ /* */\r
+ /* <Description> */\r
+ /* For Multiple Master or GX Var fonts, choose an interpolated font */\r
+ /* design through design coordinates. */\r
+ /* */\r
+ /* <InOut> */\r
+ /* face :: A handle to the source face. */\r
+ /* */\r
+ /* <Input> */\r
+ /* num_coords :: The number of design coordinates (must be equal to */\r
+ /* the number of axes in the font). */\r
+ /* */\r
+ /* coords :: An array of design coordinates. */\r
+ /* */\r
+ /* <Return> */\r
+ /* FreeType error code. 0 means success. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Set_Var_Design_Coordinates( FT_Face face,\r
+ FT_UInt num_coords,\r
+ FT_Fixed* coords );\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Set_MM_Blend_Coordinates */\r
+ /* */\r
+ /* <Description> */\r
+ /* For Multiple Masters and GX var fonts, choose an interpolated font */\r
+ /* design through normalized blend coordinates. */\r
+ /* */\r
+ /* <InOut> */\r
+ /* face :: A handle to the source face. */\r
+ /* */\r
+ /* <Input> */\r
+ /* num_coords :: The number of design coordinates (must be equal to */\r
+ /* the number of axes in the font). */\r
+ /* */\r
+ /* coords :: The design coordinates array (each element must be */\r
+ /* between 0 and 1.0). */\r
+ /* */\r
+ /* <Return> */\r
+ /* FreeType error code. 0 means success. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Set_MM_Blend_Coordinates( FT_Face face,\r
+ FT_UInt num_coords,\r
+ FT_Fixed* coords );\r
+\r
+\r
+ /*************************************************************************/\r
+ /* */\r
+ /* <Function> */\r
+ /* FT_Set_Var_Blend_Coordinates */\r
+ /* */\r
+ /* <Description> */\r
+ /* This is another name of @FT_Set_MM_Blend_Coordinates. */\r
+ /* */\r
+ FT_EXPORT( FT_Error )\r
+ FT_Set_Var_Blend_Coordinates( FT_Face face,\r
+ FT_UInt num_coords,\r
+ FT_Fixed* coords );\r
+\r
+\r
+ /* */\r
+\r
+\r
+FT_END_HEADER\r
+\r
+#endif /* __FTMM_H__ */\r
+\r
+\r
+/* END */\r