summaryrefslogtreecommitdiff
path: root/include/freetype/internal
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-09-26 12:53:41 +0200
committerWerner Lemberg <wl@gnu.org>2017-09-26 12:53:41 +0200
commit12ae57d9929e36201fb1007721a7f8b50c7aa585 (patch)
treeaec049c4cb8bafa0a336a0ed5415c2d25be52b1a /include/freetype/internal
parent4cdbac05b9a17645cbecfcb18f7d1bcd573b67d6 (diff)
downloadfreetype2-12ae57d9929e36201fb1007721a7f8b50c7aa585.tar.gz
Copyright notices, formatting, whitespace, minor doc fixes.
Diffstat (limited to 'include/freetype/internal')
-rw-r--r--include/freetype/internal/cffotypes.h19
-rw-r--r--include/freetype/internal/ftserv.h47
-rw-r--r--include/freetype/internal/psaux.h189
-rw-r--r--include/freetype/internal/services/svcfftl.h12
4 files changed, 144 insertions, 123 deletions
diff --git a/include/freetype/internal/cffotypes.h b/include/freetype/internal/cffotypes.h
index 570a92edf..6fd1e1c7a 100644
--- a/include/freetype/internal/cffotypes.h
+++ b/include/freetype/internal/cffotypes.h
@@ -4,7 +4,14 @@
/* */
/* Basic OpenType/CFF object type definitions (specification). */
/* */
-/* Copyright notice here. */
+/* Copyright 2017 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. */
/* */
/***************************************************************************/
@@ -54,11 +61,11 @@ FT_BEGIN_HEADER
{
FT_GlyphSlotRec root;
- FT_Bool hint;
- FT_Bool scaled;
+ FT_Bool hint;
+ FT_Bool scaled;
- FT_Fixed x_scale;
- FT_Fixed y_scale;
+ FT_Fixed x_scale;
+ FT_Fixed y_scale;
} CFF_GlyphSlotRec, *CFF_GlyphSlot;
@@ -87,7 +94,7 @@ FT_BEGIN_HEADER
{
FT_Fixed xx, xy; /* transformation matrix coefficients */
FT_Fixed yx, yy;
- FT_F26Dot6 ox, oy; /* offsets */
+ FT_F26Dot6 ox, oy; /* offsets */
} CFF_Transform;
diff --git a/include/freetype/internal/ftserv.h b/include/freetype/internal/ftserv.h
index 23f2878cc..5d95ee52c 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -815,26 +815,26 @@ FT_BEGIN_HEADER
if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 11 ) ) \
return error; \
\
- clazz[0].serv_id = serv_id_1; \
- clazz[0].serv_data = serv_data_1; \
- clazz[1].serv_id = serv_id_2; \
- clazz[1].serv_data = serv_data_2; \
- clazz[2].serv_id = serv_id_3; \
- clazz[2].serv_data = serv_data_3; \
- clazz[3].serv_id = serv_id_4; \
- clazz[3].serv_data = serv_data_4; \
- clazz[4].serv_id = serv_id_5; \
- clazz[4].serv_data = serv_data_5; \
- clazz[5].serv_id = serv_id_6; \
- clazz[5].serv_data = serv_data_6; \
- clazz[6].serv_id = serv_id_7; \
- clazz[6].serv_data = serv_data_7; \
- clazz[7].serv_id = serv_id_8; \
- clazz[7].serv_data = serv_data_8; \
- clazz[8].serv_id = serv_id_9; \
- clazz[8].serv_data = serv_data_9; \
- clazz[9].serv_id = serv_id_10; \
- clazz[9].serv_data = serv_data_10; \
+ clazz[ 0].serv_id = serv_id_1; \
+ clazz[ 0].serv_data = serv_data_1; \
+ clazz[ 1].serv_id = serv_id_2; \
+ clazz[ 1].serv_data = serv_data_2; \
+ clazz[ 2].serv_id = serv_id_3; \
+ clazz[ 2].serv_data = serv_data_3; \
+ clazz[ 3].serv_id = serv_id_4; \
+ clazz[ 3].serv_data = serv_data_4; \
+ clazz[ 4].serv_id = serv_id_5; \
+ clazz[ 4].serv_data = serv_data_5; \
+ clazz[ 5].serv_id = serv_id_6; \
+ clazz[ 5].serv_data = serv_data_6; \
+ clazz[ 6].serv_id = serv_id_7; \
+ clazz[ 6].serv_data = serv_data_7; \
+ clazz[ 7].serv_id = serv_id_8; \
+ clazz[ 7].serv_data = serv_data_8; \
+ clazz[ 8].serv_id = serv_id_9; \
+ clazz[ 8].serv_data = serv_data_9; \
+ clazz[ 9].serv_id = serv_id_10; \
+ clazz[ 9].serv_data = serv_data_10; \
clazz[10].serv_id = NULL; \
clazz[10].serv_data = NULL; \
\
@@ -986,7 +986,9 @@ FT_BEGIN_HEADER
*/
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
+#define FT_SERVICE_CFF_TABLE_LOAD_H <freetype/internal/services/svcfftl.h>
#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
+#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
@@ -1000,11 +1002,10 @@ FT_BEGIN_HEADER
#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
-#define FT_SERVICE_CFF_TABLE_LOAD_H <freetype/internal/services/svcfftl.h>
+
/* */
FT_END_HEADER
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 25535475a..46c238a5c 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -467,6 +467,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
+
typedef struct PS_Builder_ PS_Builder;
typedef const struct PS_Builder_FuncsRec_* PS_Builder_Funcs;
@@ -478,7 +479,7 @@ FT_BEGIN_HEADER
FT_Bool is_t1 );
void
- (*done)( PS_Builder* builder );
+ (*done)( PS_Builder* builder );
} PS_Builder_FuncsRec;
@@ -524,6 +525,8 @@ FT_BEGIN_HEADER
/* the metrics of a given glyph, not load all of its */
/* points. */
/* */
+ /* is_t1 :: Set if current font type is Type 1. */
+ /* */
/* funcs :: An array of function pointers for the builder. */
/* */
struct PS_Builder_
@@ -535,20 +538,19 @@ FT_BEGIN_HEADER
FT_Outline* base;
FT_Outline* current;
- FT_Pos* pos_x;
- FT_Pos* pos_y;
+ FT_Pos* pos_x;
+ FT_Pos* pos_y;
- FT_Vector* left_bearing;
- FT_Vector* advance;
-
- FT_BBox* bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
+ FT_Vector* left_bearing;
+ FT_Vector* advance;
- FT_Bool metrics_only;
+ FT_BBox* bbox; /* bounding box */
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
- FT_Bool is_t1;
+ FT_Bool metrics_only;
+ FT_Bool is_t1;
PS_Builder_FuncsRec funcs;
@@ -596,64 +598,64 @@ FT_BEGIN_HEADER
typedef struct PS_Decoder_
{
- PS_Builder builder;
+ PS_Builder builder;
- FT_Fixed stack[PS_MAX_OPERANDS + 1];
- FT_Fixed* top;
+ FT_Fixed stack[PS_MAX_OPERANDS + 1];
+ FT_Fixed* top;
- PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS + 1];
- PS_Decoder_Zone* zone;
+ PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS + 1];
+ PS_Decoder_Zone* zone;
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
+ FT_Int flex_state;
+ FT_Int num_flex_vectors;
+ FT_Vector flex_vectors[7];
- CFF_Font cff;
- CFF_SubFont current_subfont; /* for current glyph_index */
- FT_Generic* cf2_instance;
+ CFF_Font cff;
+ CFF_SubFont current_subfont; /* for current glyph_index */
+ FT_Generic* cf2_instance;
- FT_Pos glyph_width;
- FT_Pos nominal_width;
+ FT_Pos glyph_width;
+ FT_Pos nominal_width;
- FT_Bool read_width;
- FT_Bool width_only;
- FT_Int num_hints;
+ FT_Bool read_width;
+ FT_Bool width_only;
+ FT_Int num_hints;
- FT_UInt num_locals;
- FT_UInt num_globals;
+ FT_UInt num_locals;
+ FT_UInt num_globals;
- FT_Int locals_bias;
- FT_Int globals_bias;
+ FT_Int locals_bias;
+ FT_Int globals_bias;
- FT_Byte** locals;
- FT_Byte** globals;
+ FT_Byte** locals;
+ FT_Byte** globals;
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
+ FT_Byte** glyph_names; /* for pure CFF fonts only */
+ FT_UInt num_glyphs; /* number of glyphs in font */
- FT_Render_Mode hint_mode;
+ FT_Render_Mode hint_mode;
- FT_Bool seac;
+ FT_Bool seac;
CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
/* Type 1 stuff */
- FT_Service_PsCMaps psnames; /* for seac */
+ FT_Service_PsCMaps psnames; /* for seac */
- FT_Int lenIV; /* internal for sub routine calls */
- FT_UInt* locals_len; /* array of subrs length (optional) */
- FT_Hash locals_hash; /* used if `num_subrs' was massaged */
+ FT_Int lenIV; /* internal for sub routine calls */
+ FT_UInt* locals_len; /* array of subrs length (optional) */
+ FT_Hash locals_hash; /* used if `num_subrs' was massaged */
- FT_Matrix font_matrix;
- FT_Vector font_offset;
+ FT_Matrix font_matrix;
+ FT_Vector font_offset;
- PS_Blend blend; /* for multiple master support */
+ PS_Blend blend; /* for multiple master support */
- FT_Long* buildchar;
- FT_UInt len_buildchar;
+ FT_Long* buildchar;
+ FT_UInt len_buildchar;
- void* t1_parse_callback;
+ void* t1_parse_callback;
} PS_Decoder;
@@ -929,6 +931,7 @@ FT_BEGIN_HEADER
} T1_DecoderRec;
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -938,7 +941,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
- typedef struct CFF_Builder_ CFF_Builder;
+ typedef struct CFF_Builder_ CFF_Builder;
typedef FT_Error
@@ -1033,6 +1036,8 @@ FT_BEGIN_HEADER
/* */
/* hints_globals :: Auxiliary pointer for hinting. */
/* */
+ /* funcs :: A table of method pointers for this object. */
+ /* */
struct CFF_Builder_
{
FT_Memory memory;
@@ -1042,24 +1047,24 @@ FT_BEGIN_HEADER
FT_Outline* base;
FT_Outline* current;
- FT_Pos pos_x;
- FT_Pos pos_y;
+ FT_Pos pos_x;
+ FT_Pos pos_y;
- FT_Vector left_bearing;
- FT_Vector advance;
+ FT_Vector left_bearing;
+ FT_Vector advance;
- FT_BBox bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
+ FT_BBox bbox; /* bounding box */
- FT_Bool metrics_only;
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
- void* hints_funcs; /* hinter-specific */
- void* hints_globals; /* hinter-specific */
+ FT_Bool metrics_only;
- CFF_Builder_FuncsRec funcs;
+ void* hints_funcs; /* hinter-specific */
+ void* hints_globals; /* hinter-specific */
+ CFF_Builder_FuncsRec funcs;
};
@@ -1071,6 +1076,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
+
#define CFF_MAX_OPERANDS 48
#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
/* only 10 are allowed but there exist */
@@ -1093,61 +1099,62 @@ FT_BEGIN_HEADER
typedef struct CFF_Decoder_
{
- CFF_Builder builder;
- CFF_Font cff;
+ CFF_Builder builder;
+ CFF_Font cff;
- FT_Fixed stack[CFF_MAX_OPERANDS + 1];
- FT_Fixed* top;
+ FT_Fixed stack[CFF_MAX_OPERANDS + 1];
+ FT_Fixed* top;
CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS + 1];
CFF_Decoder_Zone* zone;
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
+ FT_Int flex_state;
+ FT_Int num_flex_vectors;
+ FT_Vector flex_vectors[7];
- FT_Pos glyph_width;
- FT_Pos nominal_width;
+ FT_Pos glyph_width;
+ FT_Pos nominal_width;
- FT_Bool read_width;
- FT_Bool width_only;
- FT_Int num_hints;
- FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
+ FT_Bool read_width;
+ FT_Bool width_only;
+ FT_Int num_hints;
+ FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
- FT_UInt num_locals;
- FT_UInt num_globals;
+ FT_UInt num_locals;
+ FT_UInt num_globals;
- FT_Int locals_bias;
- FT_Int globals_bias;
+ FT_Int locals_bias;
+ FT_Int globals_bias;
- FT_Byte** locals;
- FT_Byte** globals;
+ FT_Byte** locals;
+ FT_Byte** globals;
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
+ FT_Byte** glyph_names; /* for pure CFF fonts only */
+ FT_UInt num_glyphs; /* number of glyphs in font */
- FT_Render_Mode hint_mode;
+ FT_Render_Mode hint_mode;
- FT_Bool seac;
+ FT_Bool seac;
- CFF_SubFont current_subfont; /* for current glyph_index */
+ CFF_SubFont current_subfont; /* for current glyph_index */
CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
} CFF_Decoder;
+
typedef const struct CFF_Decoder_FuncsRec_* CFF_Decoder_Funcs;
typedef struct CFF_Decoder_FuncsRec_
{
void
- (*init)( CFF_Decoder* decoder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot slot,
- FT_Bool hinting,
- FT_Render_Mode hint_mode,
+ (*init)( CFF_Decoder* decoder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot,
+ FT_Bool hinting,
+ FT_Render_Mode hint_mode,
CFF_Decoder_Get_Glyph_Callback get_callback,
CFF_Decoder_Free_Glyph_Callback free_callback );
diff --git a/include/freetype/internal/services/svcfftl.h b/include/freetype/internal/services/svcfftl.h
index a47debf1f..851bcde3a 100644
--- a/include/freetype/internal/services/svcfftl.h
+++ b/include/freetype/internal/services/svcfftl.h
@@ -4,7 +4,14 @@
/* */
/* The FreeType CFF tables loader service (specification). */
/* */
-/* Copyright notice here */
+/* Copyright 2017 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. */
/* */
/***************************************************************************/
@@ -96,10 +103,9 @@ FT_BEGIN_HEADER
#endif /* FT_CONFIG_OPTION_PIC */
-
-
FT_END_HEADER
+
#endif