aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-03-27 11:56:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-28 16:06:34 +0000
commit3aa8bfe0d5de3fb68e978f6b0fadf70267c64b9d (patch)
tree60ffb2cd0d0c54d737ce2cfab82cde9eebe9714b /third_party
parenta567e3315bddeff2cad37c14c050fb85cf99caca (diff)
Roll FreeType.
Change-Id: I3fe4e27e70270f4dc31610f98741c63b3574cf96 Reviewed-on: https://skia-review.googlesource.com/116628 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/freetype2/BUILD.gn7
-rw-r--r--third_party/freetype2/include/freetype-android/ftmodule.h (renamed from third_party/freetype/include/freetype-android/ftmodule.h)21
-rw-r--r--third_party/freetype2/include/freetype-android/ftoption.h (renamed from third_party/freetype/include/freetype-android/ftoption.h)136
3 files changed, 82 insertions, 82 deletions
diff --git a/third_party/freetype2/BUILD.gn b/third_party/freetype2/BUILD.gn
index 7ccaa1dc96..b76c2df34a 100644
--- a/third_party/freetype2/BUILD.gn
+++ b/third_party/freetype2/BUILD.gn
@@ -25,7 +25,7 @@ if (skia_use_system_freetype2) {
"//third_party/libpng",
]
- include_dirs = [ "../freetype" ]
+ include_dirs = [ "." ]
defines = [
"FT2_BUILD_LIBRARY",
"FT_CONFIG_MODULES_H=<include/freetype-android/ftmodule.h>",
@@ -38,12 +38,10 @@ if (skia_use_system_freetype2) {
"../externals/freetype/src/base/ftbbox.c",
"../externals/freetype/src/base/ftbitmap.c",
"../externals/freetype/src/base/ftdebug.c",
- "../externals/freetype/src/base/ftfntfmt.c",
"../externals/freetype/src/base/ftfstype.c",
"../externals/freetype/src/base/ftgasp.c",
"../externals/freetype/src/base/ftglyph.c",
"../externals/freetype/src/base/ftinit.c",
- "../externals/freetype/src/base/ftlcdfil.c",
"../externals/freetype/src/base/ftmm.c",
"../externals/freetype/src/base/ftpatent.c",
"../externals/freetype/src/base/ftstroke.c",
@@ -52,13 +50,16 @@ if (skia_use_system_freetype2) {
"../externals/freetype/src/base/fttype1.c",
"../externals/freetype/src/base/ftwinfnt.c",
"../externals/freetype/src/cff/cff.c",
+ "../externals/freetype/src/cid/type1cid.c",
"../externals/freetype/src/gzip/ftgzip.c",
+ "../externals/freetype/src/psaux/psaux.c",
"../externals/freetype/src/pshinter/pshinter.c",
"../externals/freetype/src/psnames/psnames.c",
"../externals/freetype/src/raster/raster.c",
"../externals/freetype/src/sfnt/sfnt.c",
"../externals/freetype/src/smooth/smooth.c",
"../externals/freetype/src/truetype/truetype.c",
+ "../externals/freetype/src/type1/type1.c",
]
}
}
diff --git a/third_party/freetype/include/freetype-android/ftmodule.h b/third_party/freetype2/include/freetype-android/ftmodule.h
index 445c3b6ac4..139014404c 100644
--- a/third_party/freetype/include/freetype-android/ftmodule.h
+++ b/third_party/freetype2/include/freetype-android/ftmodule.h
@@ -12,7 +12,14 @@
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
+FT_USE_MODULE( FT_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
@@ -20,18 +27,6 @@ FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
-
-/*
-FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
-FT_USE_MODULE( FT_Module_Class, psaux_module_class )
-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
- */
-
-
+//FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
/* EOF */
diff --git a/third_party/freetype/include/freetype-android/ftoption.h b/third_party/freetype2/include/freetype-android/ftoption.h
index eaabd5a1a5..aa2b589732 100644
--- a/third_party/freetype/include/freetype-android/ftoption.h
+++ b/third_party/freetype2/include/freetype-android/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2017 by */
+/* Copyright 1996-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,19 +75,17 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /*************************************************************************/
+ /*#***********************************************************************/
/* */
/* If you enable this configuration option, FreeType recognizes an */
/* environment variable called `FREETYPE_PROPERTIES', which can be used */
/* to control the various font drivers and modules. The controllable */
- /* properties are listed in the section `Controlling FreeType Modules' */
- /* in the reference's table of contents; currently there are properties */
- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */
- /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */
+ /* properties are listed in the section @properties. */
/* */
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
/* multiple lines for better readability). */
/* */
+ /* { */
/* <optional whitespace> */
/* <module-name1> ':' */
/* <property-name1> '=' <property-value1> */
@@ -95,6 +93,7 @@ FT_BEGIN_HEADER
/* <module-name2> ':' */
/* <property-name2> '=' <property-value2> */
/* ... */
+ /* } */
/* */
/* Example: */
/* */
@@ -107,20 +106,17 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Uncomment the line below if you want to activate sub-pixel rendering */
- /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
+ /* Uncomment the line below if you want to activate LCD rendering */
+ /* technology similar to ClearType in this build of the library. This */
+ /* technology triples the resolution in the direction color subpixels. */
+ /* To mitigate color fringes inherent to this technology, you also need */
+ /* to explicitly set up LCD filtering. */
/* */
/* Note that this feature is covered by several Microsoft patents */
/* and should not be activated in any default build of the library. */
- /* */
- /* This macro has no impact on the FreeType API, only on its */
- /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
- /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
- /* the original size in case this macro isn't defined; however, each */
- /* triplet of subpixels has R=G=B. */
- /* */
- /* This is done to allow FreeType clients to run unmodified, forcing */
- /* them to display normal gray-level anti-aliased glyphs. */
+ /* When this macro is not defined, FreeType offers alternative LCD */
+ /* rendering technology that produces excellent output without LCD */
+ /* filtering. */
/* */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@@ -214,6 +210,10 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
@@ -230,6 +230,10 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
@@ -255,6 +259,10 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
#define FT_CONFIG_OPTION_USE_PNG
@@ -268,49 +276,11 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
-/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
-
-
- /*************************************************************************/
- /* */
- /* DLL export compilation */
- /* */
- /* When compiling FreeType as a DLL, some systems/compilers need a */
- /* special keyword in front OR after the return type of function */
- /* declarations. */
- /* */
- /* Two macros are used within the FreeType source code to define */
- /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
- /* */
- /* FT_EXPORT( return_type ) */
- /* */
- /* is used in a function declaration, as in */
- /* */
- /* FT_EXPORT( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ); */
- /* */
- /* */
- /* FT_EXPORT_DEF( return_type ) */
- /* */
- /* is used in a function definition, as in */
- /* */
- /* FT_EXPORT_DEF( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ) */
- /* { */
- /* ... some code ... */
- /* return FT_Err_Ok; */
- /* } */
- /* */
- /* You can provide your own implementation of FT_EXPORT and */
- /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
- /* will be later automatically defined as `extern return_type' to */
- /* allow normal compilation. */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
/* */
- /* Do not #undef these macros here since the build system might define */
- /* them for certain configurations only. */
- /* */
-/* #define FT_EXPORT(x) extern x */
-/* #define FT_EXPORT_DEF(x) x */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
/*************************************************************************/
@@ -327,7 +297,7 @@ FT_BEGIN_HEADER
/* */
/* - The TrueType driver will provide its own set of glyph names, */
/* if you build it to support postscript names in the TrueType */
- /* `post' table. */
+ /* `post' table, but will not synthesize a missing Unicode charmap. */
/* */
/* - The Type 1 driver will not be able to synthesize a Unicode */
/* charmap out of the glyphs found in the fonts. */
@@ -681,7 +651,7 @@ FT_BEGIN_HEADER
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
- /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
@@ -701,7 +671,7 @@ FT_BEGIN_HEADER
/* composite flags array which can be used to disambiguate, but old */
/* fonts will not have them. */
/* */
- /* http://www.microsoft.com/typography/otspec/glyf.htm */
+ /* https://www.microsoft.com/typography/otspec/glyf.htm */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -799,6 +769,16 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* */
+ /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the type1 driver module. */
+ /* */
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
/*************************************************************************/
/**** ****/
/**** C F F D R I V E R C O N F I G U R A T I O N ****/
@@ -813,8 +793,8 @@ FT_BEGIN_HEADER
/* possible to set up the default values of the four control points that */
/* define the stem darkening behaviour of the (new) CFF engine. For */
/* more details please read the documentation of the */
- /* `darkening-parameters' property of the cff driver module (file */
- /* `ftcffdrv.h'), which allows the control at run-time. */
+ /* `darkening-parameters' property (file `ftdriver.h'), which allows the */
+ /* control at run-time. */
/* */
/* Do *not* undefine these macros! */
/* */
@@ -886,7 +866,9 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Compile autofit module with Indic script support. */
+ /* Compile autofit module with fallback Indic script support, covering */
+ /* some scripts that the `latin' submodule of the autofit module doesn't */
+ /* (yet) handle. */
/* */
#define AF_CONFIG_OPTION_INDIC
@@ -900,11 +882,31 @@ FT_BEGIN_HEADER
/* */
/* This experimental option is active only if the rendering mode is */
/* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */
- /* `warping' property of the auto-hinter (see file `ftautoh.h' for more */
+ /* `warping' property of the auto-hinter (see file `ftdriver.h' for more */
/* information; by default it is switched off). */
/* */
/* #define AF_CONFIG_OPTION_USE_WARPER */
+ /*************************************************************************/
+ /* */
+ /* Use TrueType-like size metrics for `light' auto-hinting. */
+ /* */
+ /* It is strongly recommended to avoid this option, which exists only to */
+ /* help some legacy applications retain its appearance and behaviour */
+ /* with respect to auto-hinted TrueType fonts. */
+ /* */
+ /* The very reason this option exists at all are GNU/Linux distributions */
+ /* like Fedora that did not un-patch the following change (which was */
+ /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */
+ /* */
+ /* 2011-07-16 Steven Chu <steven.f.chu@gmail.com> */
+ /* */
+ /* [truetype] Fix metrics on size request for scalable fonts. */
+ /* */
+ /* This problematic commit is now reverted (more or less). */
+ /* */
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
+
/* */
@@ -922,6 +924,7 @@ FT_BEGIN_HEADER
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_USE_BYTECODE_INTERPRETER
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
#endif
@@ -930,6 +933,7 @@ FT_BEGIN_HEADER
#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
#endif
#endif
+#endif
/*