Index: third_party/freetype/include/tttables.h |
diff --git a/core/include/thirdparties/freetype/freetype/tttables.h b/third_party/freetype/include/tttables.h |
similarity index 89% |
rename from core/include/thirdparties/freetype/freetype/tttables.h |
rename to third_party/freetype/include/tttables.h |
index c6205502547a6719bddeb4fa0121fdda7376e210..e1d8b05e79c3a47025de0dc50656847e79a20e96 100644 |
--- a/core/include/thirdparties/freetype/freetype/tttables.h |
+++ b/third_party/freetype/include/tttables.h |
@@ -5,7 +5,7 @@ |
/* Basic SFNT/TrueType tables definitions and interface */ |
/* (specification only). */ |
/* */ |
-/* Copyright 1996-2005, 2008-2012 by */ |
+/* Copyright 1996-2005, 2008-2014 by */ |
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
/* */ |
/* This file is part of the FreeType project, and may only be used, */ |
@@ -21,8 +21,8 @@ |
#define __TTTABLES_H__ |
-#include "../ft2build.h" |
-#include "freetype.h" |
+#include <ft2build.h> |
+#include FT_FREETYPE_H |
#ifdef FREETYPE_H |
#error "freetype.h of FreeType 1 has been loaded!" |
@@ -48,6 +48,25 @@ FT_BEGIN_HEADER |
/* This section contains the definition of TrueType-specific tables */ |
/* as well as some routines used to access and process them. */ |
/* */ |
+ /* <Order> */ |
+ /* TT_Header */ |
+ /* TT_HoriHeader */ |
+ /* TT_VertHeader */ |
+ /* TT_OS2 */ |
+ /* TT_Postscript */ |
+ /* TT_PCLT */ |
+ /* TT_MaxProfile */ |
+ /* */ |
+ /* FT_Sfnt_Tag */ |
+ /* FT_Get_Sfnt_Table */ |
+ /* FT_Load_Sfnt_Table */ |
+ /* FT_Sfnt_Table_Info */ |
+ /* */ |
+ /* FT_Get_CMap_Language_ID */ |
+ /* FT_Get_CMap_Format */ |
+ /* */ |
+ /* FT_PARAM_TAG_UNPATENTED_HINTING */ |
+ /* */ |
/*************************************************************************/ |
@@ -170,8 +189,8 @@ FT_BEGIN_HEADER |
/* */ |
/* <Note> */ |
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ |
- /* be identical except for the names of their fields which */ |
- /* are different. */ |
+ /* be identical except for the names of their fields, */ |
+ /* which are different. */ |
/* */ |
/* This ensures that a single function in the `ttload' */ |
/* module is able to read both the horizontal and vertical */ |
@@ -296,8 +315,8 @@ FT_BEGIN_HEADER |
/* */ |
/* <Note> */ |
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ |
- /* be identical except for the names of their fields which */ |
- /* are different. */ |
+ /* be identical except for the names of their fields, */ |
+ /* which are different. */ |
/* */ |
/* This ensures that a single function in the `ttload' */ |
/* module is able to read both the horizontal and vertical */ |
@@ -340,12 +359,11 @@ FT_BEGIN_HEADER |
/* TT_OS2 */ |
/* */ |
/* <Description> */ |
- /* A structure used to model a TrueType OS/2 table. This is the long */ |
- /* table version. All fields comply to the TrueType specification. */ |
+ /* A structure used to model a TrueType OS/2 table. All fields */ |
+ /* comply to the OpenType specification. */ |
/* */ |
- /* Note that we now support old Mac fonts which do not include an */ |
- /* OS/2 table. In this case, the `version' field is always set to */ |
- /* 0xFFFF. */ |
+ /* Note that we now support old Mac fonts that do not include an OS/2 */ |
+ /* table. In this case, the `version' field is always set to 0xFFFF. */ |
/* */ |
typedef struct TT_OS2_ |
{ |
@@ -384,12 +402,12 @@ FT_BEGIN_HEADER |
FT_UShort usWinAscent; |
FT_UShort usWinDescent; |
- /* only version 1 tables: */ |
+ /* only version 1 and higher: */ |
FT_ULong ulCodePageRange1; /* Bits 0-31 */ |
FT_ULong ulCodePageRange2; /* Bits 32-63 */ |
- /* only version 2 tables: */ |
+ /* only version 2 and higher: */ |
FT_Short sxHeight; |
FT_Short sCapHeight; |
@@ -397,6 +415,11 @@ FT_BEGIN_HEADER |
FT_UShort usBreakChar; |
FT_UShort usMaxContext; |
+ /* only version 5 and higher: */ |
+ |
+ FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */ |
+ FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */ |
+ |
} TT_OS2; |
@@ -465,7 +488,7 @@ FT_BEGIN_HEADER |
/* TT_MaxProfile */ |
/* */ |
/* <Description> */ |
- /* The maximum profile is a table containing many max values which */ |
+ /* The maximum profile is a table containing many max values, which */ |
/* can be used to pre-allocate arrays. This ensures that no memory */ |
/* allocation occurs during a glyph load. */ |
/* */ |
@@ -555,21 +578,44 @@ FT_BEGIN_HEADER |
/* An enumeration used to specify the index of an SFNT table. */ |
/* Used in the @FT_Get_Sfnt_Table API function. */ |
/* */ |
+ /* <Values> */ |
+ /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ |
+ /* */ |
+ /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */ |
+ /* */ |
+ /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */ |
+ /* */ |
+ /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */ |
+ /* */ |
+ /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture. */ |
+ /* */ |
+ /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */ |
+ /* */ |
+ /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */ |
+ /* */ |
typedef enum FT_Sfnt_Tag_ |
{ |
- ft_sfnt_head = 0, /* TT_Header */ |
- ft_sfnt_maxp = 1, /* TT_MaxProfile */ |
- ft_sfnt_os2 = 2, /* TT_OS2 */ |
- ft_sfnt_hhea = 3, /* TT_HoriHeader */ |
- ft_sfnt_vhea = 4, /* TT_VertHeader */ |
- ft_sfnt_post = 5, /* TT_Postscript */ |
- ft_sfnt_pclt = 6, /* TT_PCLT */ |
+ FT_SFNT_HEAD, |
+ FT_SFNT_MAXP, |
+ FT_SFNT_OS2, |
+ FT_SFNT_HHEA, |
+ FT_SFNT_VHEA, |
+ FT_SFNT_POST, |
+ FT_SFNT_PCLT, |
- sfnt_max /* internal end mark */ |
+ FT_SFNT_MAX |
} FT_Sfnt_Tag; |
- /* */ |
+ /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */ |
+ /* values instead */ |
+#define ft_sfnt_head FT_SFNT_HEAD |
+#define ft_sfnt_maxp FT_SFNT_MAXP |
+#define ft_sfnt_os2 FT_SFNT_OS2 |
+#define ft_sfnt_hhea FT_SFNT_HHEA |
+#define ft_sfnt_vhea FT_SFNT_VHEA |
+#define ft_sfnt_post FT_SFNT_POST |
+#define ft_sfnt_pclt FT_SFNT_PCLT |
/*************************************************************************/ |
@@ -607,7 +653,7 @@ FT_BEGIN_HEADER |
/* */ |
/* */ |
/* vert_header = */ |
- /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */ |
+ /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ |
/* } */ |
/* */ |
FT_EXPORT( void* ) |
@@ -672,6 +718,12 @@ FT_BEGIN_HEADER |
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); |
* if ( error ) { ... could not load table ... } |
* } |
+ * |
+ * Note that structures like @TT_Header or @TT_OS2 can't be used with |
+ * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that |
+ * those structures depend on the processor architecture, with varying |
+ * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). |
+ * |
*/ |
FT_EXPORT( FT_Error ) |
FT_Load_Sfnt_Table( FT_Face face, |
@@ -730,7 +782,7 @@ FT_BEGIN_HEADER |
/* */ |
/* <Description> */ |
/* Return TrueType/sfnt specific cmap language ID. Definitions of */ |
- /* language ID values are in `freetype/ttnameid.h'. */ |
+ /* language ID values are in `ttnameid.h'. */ |
/* */ |
/* <Input> */ |
/* charmap :: */ |