From 6a53b04e26749ea61f690ece408f2a1c0a5ad5bb Mon Sep 17 00:00:00 2001 From: halcanary Date: Mon, 18 May 2015 10:18:58 -0700 Subject: [PATCH] SkPDF: Add Sfntly to DEPS, gyp Note: this can be disabled via: GYP_DEFINES='skia_pdf_use_sfntly=0 Warning: dm is 34% slower and uses 9% more memory. This is okay. Motivation: We want to test this code path in DM, since it is always used by Chromium and Android. BUG=skia:3563 Review URL: https://codereview.chromium.org/1134683006 --- DEPS | 5 ++ gyp/icu.gyp | 117 ++++++++++++++++++++++++++++++++++++++++++ gyp/pdf.gyp | 4 ++ gyp/sfntly.gyp | 55 ++++++++++++++++++++ src/pdf/SkPDFFont.cpp | 6 +-- 5 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 gyp/icu.gyp create mode 100644 gyp/sfntly.gyp diff --git a/DEPS b/DEPS index 549c1bf164..aee9e059a1 100644 --- a/DEPS +++ b/DEPS @@ -30,6 +30,11 @@ deps = { # The line below is needed for compiling SkV8Example. Do not delete. #"third_party/externals/v8": "https://chromium.googlesource.com/v8/v8.git@5f1ae66d5634e43563b2d25ea652dfb94c31a3b4", + + # sfntly is used by the PDF backend for font subsetting + "third_party/externals/sfntly" : "https://chromium.googlesource.com/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac", + # ICU is needed for sfntly. + "third_party/externals/icu" : "https://chromium.googlesource.com/chromium/deps/icu.git@ce41627e388fb46ab49671bd16a5db81dcd75a71", } recursedeps = [ "common" ] diff --git a/gyp/icu.gyp b/gyp/icu.gyp new file mode 100644 index 0000000000..9b11d39c2d --- /dev/null +++ b/gyp/icu.gyp @@ -0,0 +1,117 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'includes': [ + 'common_variables.gypi', + ], + 'variables': { + 'component%': 'static_library', + 'icu_directory': '../third_party/externals/icu' + }, + 'targets': [ + { + 'target_name': 'icuuc', + 'type': '<(component)', + 'sources': [ + '