Roll pdfium/third_party/freetype/src/ 2c048a8a6..036bdc0c9 (53 commits)

https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/2c048a8a622e..036bdc0c9a4f

$ git log 2c048a8a6..036bdc0c9 --date=short --no-merges --format='%ad %ae %s'
2018-01-28 wl [truetype] Minor typo.
2018-01-27 wl [truetype] Better protection against invalid VF data.
2018-01-27 wl * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
2018-01-27 wl * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
2018-01-27 wl [truetype] Better trace VF instances.
2018-01-27 wl Fix comment.
2018-01-27 wl [truetype] Beautify tracing of VF axis records.
2018-01-26 wl [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
2018-01-23 apodtele [apinames] Anonymous version map for GNU linker.
2018-01-21 apodtele [unix] Call libtool to clean up.
2018-01-18 apodtele * src/base/ftver.rc: Fix mingw-w64 compilation.
2018-01-18 apodtele [build] Enable VERSIONINFO resource for Cygwin/MinGW.
2018-01-18 apodtele [build] Move VERSIONINFO resource.
2018-01-12 apodtele [build] Expand dllexport/dllimport to Cygwin/MinGW.
2018-01-12 apodtele [build] Improve and document MSVC build.
2018-01-10 ssrobins * CMakeLists.txt [win32]: Suppress warnings for POSIX functions.
2018-01-10 ewaldhew [psaux] Correctly handle Flex features (#52846).
2018-01-09 apodtele * builds/windows/vc2010/freetype.sln: Synchronize with the project.
2018-01-08 wl * Version 2.9 released. =======================
2018-01-08 wl Next release will be 2.9.
2018-01-07 wl Add check for librt, needed for `ftbench' (#52824).
2018-01-07 ewaldhew [psaux] Fix Type 1 glyphs with too many stem hints.
2018-01-06 wl Add `FT_Done_MM_Var'.
2018-01-06 wl Minor doc fixes.
2018-01-03 wl [truetype] Round offsets of glyph components only if hinting is on.
2018-01-03 wl * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
2018-01-02 apodtele Move internal LCD-related declarations.
2018-01-02 apodtele * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_MSC_VER]: Limit Visual C++ attributes.
2018-01-03 wl [truetype] Make blend/design coordinate round-tripping work.
2018-01-02 wl Update copyright year.
2017-12-31 wl Update `CHANGES' file with demo program news.
2017-12-31 wl * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
2017-12-31 wl Synchronize other Windows project files.
2017-12-31 wl Update Visual C 2010 project files.
2017-12-30 wl Updated `CHANGES' file.
2017-12-30 wl * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
2017-12-28 wl * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
2017-12-27 wl Fix compiler warnings.
2017-12-27 wl Fixes for `make multi'.
2017-12-27 wl Provide support for intra-module callback functions.
2017-12-27 wl Add missing ChangeLog entry, copyright notices, whitespace, formatting.
2017-12-25 ewaldhew Move PostScript drivers' property handlers to `base'
2017-12-20 wl Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
2017-12-18 wl Update incorrect ChangeLog entry.
2017-12-18 wl [sfnt] Fix charmap type 2 iterator (#52646).
2017-12-18 matthias.clasen [truetype] Minor code beautification.
2017-12-18 wl * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
2017-12-18 wl * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
2017-12-18 wl [truetype] Fix previous commit.
2017-12-18 wl [truetype] Don't apply HVAR and VVAR deltas twice (#52683).
2017-12-17 jfkthame [truetype] Correctly handle variation font phantom points (#52683).
2017-12-17 jfkthame Fix incorrect advance width scaling (#52683).
2017-12-16 apodtele * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. * objs/.gitignore: Ignore almost everything.

Created with:
  roll-dep pdfium/third_party/freetype/src
R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org

Bug: pdfium:995
Change-Id: I70cdf674d66390d4600a5438640b51f6b39c4d84
Reviewed-on: https://pdfium-review.googlesource.com/24370
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
1 file changed
tree: a8a856d4f4d5845fbd5378c2001465efc866744d
  1. build_overrides/
  2. core/
  3. docs/
  4. fpdfsdk/
  5. fxbarcode/
  6. fxjs/
  7. infra/
  8. public/
  9. samples/
  10. skia/
  11. testing/
  12. third_party/
  13. tools/
  14. xfa/
  15. .clang-format
  16. .gitignore
  17. .gn
  18. AUTHORS
  19. BUILD.gn
  20. codereview.settings
  21. DEPS
  22. LICENSE
  23. navbar.md
  24. OWNERS
  25. pdfium.gni
  26. PRESUBMIT.py
  27. README.md
README.md

PDFium

Prerequisites

Get the chromium depot tools via the instructions at http://www.chromium.org/developers/how-tos/install-depot-tools (this provides the gclient utility needed below).

Also install Python, Subversion, and Git and make sure they're in your path.

Windows development

PDFium uses the same build tool as Chromium:

Open source contributors

Please refer to Chromium's Visual Studio set up for requirements and instructions on build environment configuration.

Run set DEPOT_TOOLS_WIN_TOOLCHAIN=0, or set that variable in your global environment.

Compilation is done through ninja, not Visual Studio.

CPU Architectures supported

The default architecture for Windows, Linux, and Mac is "x64". On Windows, "x86" is also supported. GN parameter "target_cpu = "x86"" can be used to override the default value. If you specify Android build, the default CPU architecture will be "arm".

It is expected that there are still some places lurking in the code which will not function properly on big-endian architectures. Bugs and/or patches are welcome, however providing this support is not a priority at this time.

Google employees

Run: download_from_google_storage --config and follow the authentication instructions. Note that you must authenticate with your @google.com credentials. Enter "0" if asked for a project-id.

Once you've done this, the toolchain will be installed automatically for you in the Generate the build files step below.

The toolchain will be in depot_tools\win_toolchain\vs_files\<hash>, and windbg can be found in depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers.

If you want the IDE for debugging and editing, you will need to install it separately, but this is optional and not needed for building PDFium.

Get the code

The name of the top-level directory does not matter. In our examples, we use "repo". This directory must not have been used before by gclient config as each directory can only house a single gclient configuration.

mkdir repo
cd repo
gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
gclient sync
cd pdfium

Additional build dependencies need to be installed by running:

./build/install-build-deps.sh

Generate the build files

We use GN to generate the build files and Ninja to execute the build files. Both of these are included with the depot_tools checkout.

Selecting build configuration

PDFium may be built either with or without JavaScript support, and with or without XFA forms support. Both of these features are enabled by default. Also note that the XFA feature requires JavaScript.

Configuration is done by executing gn args <directory> to configure the build. This will launch an editor in which you can set the following arguments. A typical <directory> name is out/Debug.

use_goma = true  # Googlers only. Make sure goma is installed and running first.
is_debug = true  # Enable debugging features.

pdf_use_skia = false  # Set true to enable experimental skia backend.
pdf_use_skia_paths = false  # Set true to enable experimental skia backend (paths only).

pdf_enable_xfa = true  # Set false to remove XFA support (implies JS support).
pdf_enable_v8 = true  # Set false to remove Javascript support.
pdf_is_standalone = true  # Set for a non-embedded build.
is_component_build = false # Disable component build (must be false)

clang_use_chrome_plugins = false  # Currently must be false.

Note, you must set pdf_is_standalone = true if you want the sample applications like pdfium_test to build.

When complete the arguments will be stored in <directory>/args.gn, and GN will automatically use the new arguments to generate build files. Should your files fail to generate, please double-check that you have set use_sysroot as indicated above.

Building the code

You can build the sample program by running: ninja -C <directory> pdfium_test You can build the entire product (which includes a few unit tests) by running: ninja -C <directory> pdfium_all.

Running the sample program

The pdfium_test program supports reading, parsing, and rasterizing the pages of a .pdf file to .ppm or .png output image files (windows supports two other formats). For example: <directory>/pdfium_test --ppm path/to/myfile.pdf. Note that this will write output images to path/to/myfile.pdf.<n>.ppm.

Testing

There are currently several test suites that can be run:

  • pdfium_unittests
  • pdfium_embeddertests
  • testing/tools/run_corpus_tests.py
  • testing/tools/run_javascript_tests.py
  • testing/tools/run_pixel_tests.py

It is possible the tests in the testing directory can fail due to font differences on the various platforms. These tests are reliable on the bots. If you see failures, it can be a good idea to run the tests on the tip-of-tree checkout to see if the same failures appear.

Code Coverage

Code coverage reports for PDFium can be generated in Linux development environments. Details can be found here.

Waterfall

The current health of the source tree can be found at http://build.chromium.org/p/client.pdfium/console

Community

There are several mailing lists that are setup:

Note, the Reviews and Bugs lists are typically read-only.

Bugs

We use this bug tracker, but for security bugs, please use [Chromium's security bug template] (https://code.google.com/p/chromium/issues/entry?template=Security%20Bug) and add the "Cr-Internals-Plugins-PDF" label.

Contributing code

For contributing code, we will follow Chromium's process as much as possible. The main exceptions are:

  1. Code has to conform to the existing style and not Chromium/Google style.
  2. PDFium uses a different tool for code reviews, and credentials for the tool need to be generated before uploading a CL.
  3. PDFium is currently holding at C++11 compatibility, rejecting features that are only present in C++14 (onto which Chromium is now slowly moving).