summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/include/freetype
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-07-02 04:44:43 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-07-02 04:44:43 +0000
commitad5ffc75cdf78f6cf6160e4334d45be15dd48221 (patch)
tree7ca04b88be84c859c9d5f235758b69387929d667 /Build/source/libs/freetype2/freetype-src/include/freetype
parent5d1e6f4aeb765d13edda3c5c77f55614ff27c7fc (diff)
freetype 2.10.1
git-svn-id: svn://tug.org/texlive/trunk@51529 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype')
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h15
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h4
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h16
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h8
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h2
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h6
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h11
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h1
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h1
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h8
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h4
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h1
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h4
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h83
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/wofftypes.h112
18 files changed, 171 insertions, 111 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h b/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h
index 4f2eaca6919..a6bb667e3a4 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h
@@ -645,7 +645,7 @@ FT_BEGIN_HEADER
* FT_ENCODING_MS_SYMBOL ::
* Microsoft Symbol encoding, used to encode mathematical symbols and
* wingdings. For more information, see
- * 'https://www.microsoft.com/typography/otspec/recom.htm',
+ * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',
* 'http://www.kostis.net/charsets/symbol.htm', and
* 'http://www.kostis.net/charsets/wingding.htm'.
*
@@ -1766,6 +1766,13 @@ FT_BEGIN_HEADER
* transformed, distorted, emboldened, etc. However, it must not be
* freed.
*
+ * [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of
+ * OpenType variation fonts for a selected instance are internally
+ * handled as 26.6 fractional font units but returned as (rounded)
+ * integers, as expected. To get unrounded font units, don't use
+ * @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and
+ * scale it, using the font's `units_per_EM` value as the ppem.
+ *
* num_subglyphs ::
* The number of subglyphs in a composite glyph. This field is only
* valid for the composite glyph format that should normally only be
@@ -3932,8 +3939,8 @@ FT_BEGIN_HEADER
* The glyph index. 0~means 'undefined character code'.
*/
FT_EXPORT( FT_UInt )
- FT_Get_Name_Index( FT_Face face,
- FT_String* glyph_name );
+ FT_Get_Name_Index( FT_Face face,
+ const FT_String* glyph_name );
/**************************************************************************
@@ -4774,7 +4781,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 10
-#define FREETYPE_PATCH 0
+#define FREETYPE_PATCH 1
/**************************************************************************
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h
index 58f5a3ead12..2b47eb2096e 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h
@@ -244,6 +244,8 @@
#define FT_ERR_PROTOS_DEFINED
+FT_BEGIN_HEADER
+
/**************************************************************************
*
* @function:
@@ -274,6 +276,8 @@
FT_EXPORT( const char* )
FT_Error_String( FT_Error error_code );
+FT_END_HEADER
+
#endif /* FT_ERR_PROTOS_DEFINED */
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h
index 4067c2e62fa..fedab8491e7 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h
@@ -210,7 +210,7 @@ FT_BEGIN_HEADER
*
* As the outline is extracted from a glyph slot, its coordinates are
* expressed normally in 26.6 pixels, unless the flag @FT_LOAD_NO_SCALE
- * was used in @FT_Load_Glyph() or @FT_Load_Char().
+ * was used in @FT_Load_Glyph or @FT_Load_Char.
*
* The outline's tables are always owned by the object and are destroyed
* with it.
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h
index d640b0b0aa9..face34fe490 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h
@@ -869,7 +869,7 @@ FT_BEGIN_HEADER
*
* @input:
* y ::
- * The scanline's y~coordinate.
+ * The scanline's upward y~coordinate.
*
* count ::
* The number of spans to draw on this scanline.
@@ -945,19 +945,16 @@ FT_BEGIN_HEADER
* This flag is set to indicate direct rendering. In this mode, client
* applications must provide their own span callback. This lets them
* directly draw or compose over an existing bitmap. If this bit is
- * not set, the target pixmap's buffer _must_ be zeroed before
- * rendering.
+ * _not_ set, the target pixmap's buffer _must_ be zeroed before
+ * rendering and the output will be clipped to its size.
*
* Direct rendering is only possible with anti-aliased glyphs.
*
* FT_RASTER_FLAG_CLIP ::
* This flag is only used in direct rendering mode. If set, the output
* will be clipped to a box specified in the `clip_box` field of the
- * @FT_Raster_Params structure.
- *
- * Note that by default, the glyph bitmap is clipped to the target
- * pixmap, except in direct rendering mode where all spans are
- * generated if no clipping box is set.
+ * @FT_Raster_Params structure. Otherwise, the `clip_box` is
+ * effectively set to the bounding box and all spans are generated.
*/
#define FT_RASTER_FLAG_DEFAULT 0x0
#define FT_RASTER_FLAG_AA 0x1
@@ -978,7 +975,8 @@ FT_BEGIN_HEADER
* FT_Raster_Params
*
* @description:
- * A structure to hold the arguments used by a raster's render function.
+ * A structure to hold the parameters used by a raster's render function,
+ * passed as an argument to @FT_Outline_Render.
*
* @fields:
* target ::
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h
index 88488bfe89c..8d039c4f3a9 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h
@@ -623,7 +623,7 @@ FT_BEGIN_HEADER
* it is bytecode interpreter's execution context, `TT_ExecContext`,
* which is declared in FreeType's internal header file `tttypes.h`.
*/
- typedef void
+ typedef FT_Error
(*FT_DebugHook_Func)( void* arg );
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h
index 75c3d015968..b72327b7030 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h
@@ -466,8 +466,6 @@ FT_BEGIN_HEADER
*
* @description:
* Render an outline within a bitmap using the current scan-convert.
- * This function uses an @FT_Raster_Params structure as an argument,
- * allowing advanced features like direct composition, translucency, etc.
*
* @input:
* library ::
@@ -485,8 +483,10 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * You should know what you are doing and how @FT_Raster_Params works to
- * use this function.
+ * This advanced function uses @FT_Raster_Params as an argument,
+ * allowing FreeType rasterizer to be used for direct composition,
+ * translucency, etc. You should know how to set up @FT_Raster_Params
+ * for this function to work.
*
* 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
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h
index 3437913d53a..a2fba903d27 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h
@@ -58,7 +58,7 @@ FT_BEGIN_HEADER
* @description:
* A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec.
* Exact mapping tables for the various 'cpXXXX' encodings (except for
- * 'cp1361') can be found at 'ftp://ftp.unicode.org/Public' in the
+ * 'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the
* `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory. 'cp1361' is roughly a
* superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`.
*
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h
index 2986ec359b1..1811fcd1ea2 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h
@@ -378,6 +378,7 @@ FT_BEGIN_HEADER
#if FT_SIZEOF_INT == 4
#include <intrin.h>
+#pragma intrinsic( _BitScanReverse )
static __inline FT_Int32
FT_MSB_i386( FT_UInt32 x )
@@ -385,7 +386,6 @@ FT_BEGIN_HEADER
unsigned long where;
- /* not available in older VC versions */
_BitScanReverse( &where, x );
return (FT_Int32)where;
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h
index f3a41b35aba..0c1d3e5bf24 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h
@@ -278,14 +278,12 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
- FT_Render_Mode render_mode,
FT_Byte* weights );
/* This is the default LCD filter, an in-place, 5-tap FIR filter. */
FT_BASE( void )
ft_lcd_filter_fir( FT_Bitmap* bitmap,
- FT_Render_Mode mode,
FT_LcdFiveTapFilter weights );
#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@@ -941,8 +939,8 @@ FT_BEGIN_HEADER
FT_UInt buffer_max );
typedef FT_UInt
- (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
- FT_String* glyph_name );
+ (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
+ const FT_String* glyph_name );
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h
index e4dca0b0a5d..a579a039b9c 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h
@@ -166,6 +166,17 @@ FT_BEGIN_HEADER
/*
+ * function acts on increases does range for emits
+ * pointer checking frames error
+ * -------------------------------------------------------------------
+ * FT_PEEK_XXX buffer pointer no no no no
+ * FT_NEXT_XXX buffer pointer yes no no no
+ * FT_GET_XXX stream->cursor yes yes yes no
+ * FT_READ_XXX stream->pos yes yes no yes
+ */
+
+
+ /*
* `FT_PEEK_XXX' are generic macros to get data from a buffer position. No
* safety checks are performed.
*/
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h
index 8089babfb6c..f5f95980461 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h
@@ -48,6 +48,7 @@ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
/* SFNT driver components */
FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
+FT_TRACE_DEF( sfwoff ) /* WOFF format handler (sfwoff.c) */
FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h
index 173d8ad906d..3c8830f7e46 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h
@@ -40,6 +40,7 @@
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
+#define FT_INTERNAL_WOFF_TYPES_H <freetype/internal/wofftypes.h>
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h
index 3ab01c3e688..f962a973de8 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h
@@ -96,10 +96,10 @@ FT_BEGIN_HEADER
(*done)( PS_Table table );
FT_Error
- (*add)( PS_Table table,
- FT_Int idx,
- void* object,
- FT_UInt length );
+ (*add)( PS_Table table,
+ FT_Int idx,
+ const void* object,
+ FT_UInt length );
void
(*release)( PS_Table table );
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h
index ca8edf0eb55..09496218350 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h
@@ -41,8 +41,8 @@ FT_BEGIN_HEADER
FT_UInt buffer_max );
typedef FT_UInt
- (*FT_GlyphDict_NameIndexFunc)( FT_Face face,
- FT_String* glyph_name );
+ (*FT_GlyphDict_NameIndexFunc)( FT_Face face,
+ const FT_String* glyph_name );
FT_DEFINE_SERVICE( GlyphDict )
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h
index 225f40df6eb..b19241c3063 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h
@@ -23,6 +23,7 @@
#include <ft2build.h>
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include FT_INTERNAL_WOFF_TYPES_H
FT_BEGIN_HEADER
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h
index e197a1afca3..d94c8c12841 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h
@@ -76,8 +76,8 @@ FT_BEGIN_HEADER
FT_Int code_first;
FT_Int code_last;
- FT_UShort* char_index;
- FT_String** char_name;
+ FT_UShort* char_index;
+ const FT_String** char_name;
} T1_EncodingRec, *T1_Encoding;
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h
index 5e9f40ec3f7..23db240e7c5 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h
@@ -153,81 +153,6 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @struct:
- * WOFF_HeaderRec
- *
- * @description:
- * WOFF file format header.
- *
- * @fields:
- * See
- *
- * https://www.w3.org/TR/WOFF/#WOFFHeader
- */
- typedef struct WOFF_HeaderRec_
- {
- FT_ULong signature;
- FT_ULong flavor;
- FT_ULong length;
- FT_UShort num_tables;
- FT_UShort reserved;
- FT_ULong totalSfntSize;
- FT_UShort majorVersion;
- FT_UShort minorVersion;
- FT_ULong metaOffset;
- FT_ULong metaLength;
- FT_ULong metaOrigLength;
- FT_ULong privOffset;
- FT_ULong privLength;
-
- } WOFF_HeaderRec, *WOFF_Header;
-
-
- /**************************************************************************
- *
- * @struct:
- * WOFF_TableRec
- *
- * @description:
- * This structure describes a given table of a WOFF font.
- *
- * @fields:
- * Tag ::
- * A four-bytes tag describing the table.
- *
- * Offset ::
- * The offset of the table from the start of the WOFF font in its
- * resource.
- *
- * CompLength ::
- * Compressed table length (in bytes).
- *
- * OrigLength ::
- * Uncompressed table length (in bytes).
- *
- * CheckSum ::
- * The table checksum. This value can be ignored.
- *
- * OrigOffset ::
- * The uncompressed table file offset. This value gets computed while
- * constructing the (uncompressed) SFNT header. It is not contained in
- * the WOFF file.
- */
- typedef struct WOFF_TableRec_
- {
- FT_ULong Tag; /* table ID */
- FT_ULong Offset; /* table file offset */
- FT_ULong CompLength; /* compressed table length */
- FT_ULong OrigLength; /* uncompressed table length */
- FT_ULong CheckSum; /* uncompressed checksum */
-
- FT_ULong OrigOffset; /* uncompressed table file offset */
- /* (not in the WOFF file) */
- } WOFF_TableRec, *WOFF_Table;
-
-
- /**************************************************************************
- *
- * @struct:
* TT_LongMetricsRec
*
* @description:
@@ -1395,8 +1320,10 @@ FT_BEGIN_HEADER
*
* cvt ::
* The face's original control value table. Coordinates are expressed
- * in unscaled font units. Comes from the 'cvt~' table. Ignored for
- * Type 2 fonts.
+ * in unscaled font units (in 26.6 format). Comes from the 'cvt~'
+ * table. Ignored for Type 2 fonts.
+ *
+ * If varied by the `CVAR' table, non-integer values are possible.
*
* interpreter ::
* A pointer to the TrueType bytecode interpreters field is also used
@@ -1633,7 +1560,7 @@ FT_BEGIN_HEADER
/* the original, unscaled, control value table */
FT_ULong cvt_size;
- FT_Short* cvt;
+ FT_Int32* cvt;
/* A pointer to the bytecode interpreter to use. This is also */
/* used to hook the debugger for the `ttdebug' utility. */
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/wofftypes.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/wofftypes.h
new file mode 100644
index 00000000000..ba55bf883e4
--- /dev/null
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/wofftypes.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+ *
+ * wofftypes.h
+ *
+ * Basic WOFF/WOFF2 type definitions and interface (specification
+ * only).
+ *
+ * Copyright (C) 1996-2019 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 WOFFTYPES_H_
+#define WOFFTYPES_H_
+
+
+#include <ft2build.h>
+#include FT_TRUETYPE_TABLES_H
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF_HeaderRec
+ *
+ * @description:
+ * WOFF file format header.
+ *
+ * @fields:
+ * See
+ *
+ * https://www.w3.org/TR/WOFF/#WOFFHeader
+ */
+ typedef struct WOFF_HeaderRec_
+ {
+ FT_ULong signature;
+ FT_ULong flavor;
+ FT_ULong length;
+ FT_UShort num_tables;
+ FT_UShort reserved;
+ FT_ULong totalSfntSize;
+ FT_UShort majorVersion;
+ FT_UShort minorVersion;
+ FT_ULong metaOffset;
+ FT_ULong metaLength;
+ FT_ULong metaOrigLength;
+ FT_ULong privOffset;
+ FT_ULong privLength;
+
+ } WOFF_HeaderRec, *WOFF_Header;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * WOFF_TableRec
+ *
+ * @description:
+ * This structure describes a given table of a WOFF font.
+ *
+ * @fields:
+ * Tag ::
+ * A four-bytes tag describing the table.
+ *
+ * Offset ::
+ * The offset of the table from the start of the WOFF font in its
+ * resource.
+ *
+ * CompLength ::
+ * Compressed table length (in bytes).
+ *
+ * OrigLength ::
+ * Uncompressed table length (in bytes).
+ *
+ * CheckSum ::
+ * The table checksum. This value can be ignored.
+ *
+ * OrigOffset ::
+ * The uncompressed table file offset. This value gets computed while
+ * constructing the (uncompressed) SFNT header. It is not contained in
+ * the WOFF file.
+ */
+ typedef struct WOFF_TableRec_
+ {
+ FT_ULong Tag; /* table ID */
+ FT_ULong Offset; /* table file offset */
+ FT_ULong CompLength; /* compressed table length */
+ FT_ULong OrigLength; /* uncompressed table length */
+ FT_ULong CheckSum; /* uncompressed checksum */
+
+ FT_ULong OrigOffset; /* uncompressed table file offset */
+ /* (not in the WOFF file) */
+ } WOFF_TableRec, *WOFF_Table;
+
+
+FT_END_HEADER
+
+#endif /* WOFFTYPES_H_ */
+
+
+/* END */