mirror of
https://pdfium.googlesource.com/pdfium
synced 2026-07-31 02:43:52 +08:00
Roll build/ 613f5c13b..73c0fa98c (151 commits)613f5c13bc..73c0fa98c5Roll buildtools/ e06be5db4..0d39be5a3 (5 commits)e06be5db47..0d39be5a3fRoll tools/clang/ 06dd1f40d..66934666a (41 commits)06dd1f40dc..66934666a7Roll tools/rust/ 42fe71a81..1607679eb (12 commits)42fe71a815..1607679eb7Roll third_party/rust/ 19243287c..9bcbc5767 (49 commits)19243287cc..9bcbc57672Roll third_party/llvm-libc/src/ 9309c117e..9a821f4e5 (110 commits)9309c117eb..9a821f4e58Roll clang+rust llvmorg-23-init-10931-g20b6ec66-11:llvmorg-23-init-19482-g53d18800-1 Also update the Rust Fontations dependencies in core/fxge/BUILD.gn and skia/BUILD.gn. TAG=agy CONV=52c2b3b5-fc71-4c82-8800-c18d1daa8ca1 Change-Id: I46395a9c1cc5f6c10d0d1d1c85e29a437a783c8a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/151311 Commit-Queue: Andy Phan <andyphan@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
327 lines
8.4 KiB
Plaintext
327 lines
8.4 KiB
Plaintext
# Copyright 2018 The PDFium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/freetype/freetype.gni")
|
|
import("../../pdfium.gni")
|
|
import("../../testing/test.gni")
|
|
|
|
if (pdf_enable_fontations) {
|
|
import("//build/rust/rust_static_library.gni")
|
|
}
|
|
|
|
if (pdf_enable_fontations) {
|
|
config("skrifa_cxx_config") {
|
|
include_dirs = [
|
|
"//core/fxge/skrifa/src",
|
|
"$root_gen_dir/core/fxge/skrifa/src",
|
|
]
|
|
}
|
|
}
|
|
|
|
source_set("fxge") {
|
|
sources = [
|
|
"calculate_pitch.cpp",
|
|
"calculate_pitch.h",
|
|
"cfx_charmap_resolver.cpp",
|
|
"cfx_charmap_resolver.h",
|
|
"cfx_color.cpp",
|
|
"cfx_color.h",
|
|
"cfx_cttgsubtable.cpp",
|
|
"cfx_cttgsubtable.h",
|
|
"cfx_drawutils.cpp",
|
|
"cfx_drawutils.h",
|
|
"cfx_face.cpp",
|
|
"cfx_face.h",
|
|
"cfx_fillrenderoptions.h",
|
|
"cfx_folderfontinfo.cpp",
|
|
"cfx_folderfontinfo.h",
|
|
"cfx_font.cpp",
|
|
"cfx_font.h",
|
|
"cfx_fontmapper.cpp",
|
|
"cfx_fontmapper.h",
|
|
"cfx_fontmgr.cpp",
|
|
"cfx_fontmgr.h",
|
|
"cfx_gemodule.cpp",
|
|
"cfx_gemodule.h",
|
|
"cfx_glyphbitmap.cpp",
|
|
"cfx_glyphbitmap.h",
|
|
"cfx_glyphcache.cpp",
|
|
"cfx_glyphcache.h",
|
|
"cfx_graphstate.cpp",
|
|
"cfx_graphstate.h",
|
|
"cfx_graphstatedata.cpp",
|
|
"cfx_graphstatedata.h",
|
|
"cfx_path.cpp",
|
|
"cfx_path.h",
|
|
"cfx_renderdevice.cpp",
|
|
"cfx_renderdevice.h",
|
|
"cfx_standardfont.cpp",
|
|
"cfx_standardfont.h",
|
|
"cfx_substfont.cpp",
|
|
"cfx_substfont.h",
|
|
"cfx_textrenderoptions.h",
|
|
"dib/blend.cpp",
|
|
"dib/blend.h",
|
|
"dib/cfx_bitmapstorer.cpp",
|
|
"dib/cfx_bitmapstorer.h",
|
|
"dib/cfx_cmyk_to_srgb.cpp",
|
|
"dib/cfx_cmyk_to_srgb.h",
|
|
"dib/cfx_dibbase.cpp",
|
|
"dib/cfx_dibbase.h",
|
|
"dib/cfx_dibitmap.cpp",
|
|
"dib/cfx_dibitmap.h",
|
|
"dib/cfx_imagestretcher.cpp",
|
|
"dib/cfx_imagestretcher.h",
|
|
"dib/cfx_imagetransformer.cpp",
|
|
"dib/cfx_imagetransformer.h",
|
|
"dib/cfx_scanlinecompositor.cpp",
|
|
"dib/cfx_scanlinecompositor.h",
|
|
"dib/cstretchengine.cpp",
|
|
"dib/cstretchengine.h",
|
|
"dib/fx_dib.cpp",
|
|
"dib/fx_dib.h",
|
|
"dib/scanlinecomposer_iface.h",
|
|
"fontdata/chromefontdata/FoxitDingbats.cpp",
|
|
"fontdata/chromefontdata/FoxitFixed.cpp",
|
|
"fontdata/chromefontdata/FoxitFixedBold.cpp",
|
|
"fontdata/chromefontdata/FoxitFixedBoldItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitFixedItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitSans.cpp",
|
|
"fontdata/chromefontdata/FoxitSansBold.cpp",
|
|
"fontdata/chromefontdata/FoxitSansBoldItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitSansItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitSansMM.cpp",
|
|
"fontdata/chromefontdata/FoxitSerif.cpp",
|
|
"fontdata/chromefontdata/FoxitSerifBold.cpp",
|
|
"fontdata/chromefontdata/FoxitSerifBoldItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitSerifItalic.cpp",
|
|
"fontdata/chromefontdata/FoxitSerifMM.cpp",
|
|
"fontdata/chromefontdata/FoxitSymbol.cpp",
|
|
"fontdata/chromefontdata/chromefontdata.h",
|
|
"freetype/fx_freetype.cpp",
|
|
"freetype/fx_freetype.h",
|
|
"fx_font.cpp",
|
|
"fx_font.h",
|
|
"fx_fontencoding.h",
|
|
"renderdevicedriver_iface.cpp",
|
|
"renderdevicedriver_iface.h",
|
|
"systemfontinfo_iface.h",
|
|
"text_char_pos.cpp",
|
|
"text_char_pos.h",
|
|
"text_glyph_pos.cpp",
|
|
"text_glyph_pos.h",
|
|
]
|
|
|
|
configs += [
|
|
"../../:pdfium_strict_config",
|
|
"../../:pdfium_noshorten_config",
|
|
]
|
|
deps = [ "../fxcrt" ]
|
|
public_deps = []
|
|
defines = []
|
|
|
|
if (is_component_build || use_system_freetype) {
|
|
# ft_adobe_glyph_list is not exported from the Freetype shared library so we
|
|
# need it defined in component builds and builds using system freetype.
|
|
defines += [ "DEFINE_PS_TABLES_DATA" ]
|
|
}
|
|
|
|
if (pdf_use_agg) {
|
|
sources += [
|
|
"agg/cfx_agg_bitmapcomposer.cpp",
|
|
"agg/cfx_agg_bitmapcomposer.h",
|
|
"agg/cfx_agg_cliprgn.cpp",
|
|
"agg/cfx_agg_cliprgn.h",
|
|
"agg/cfx_agg_devicedriver.cpp",
|
|
"agg/cfx_agg_devicedriver.h",
|
|
"agg/cfx_agg_imagerenderer.cpp",
|
|
"agg/cfx_agg_imagerenderer.h",
|
|
]
|
|
deps += [ "../../third_party:fx_agg" ]
|
|
}
|
|
|
|
if (pdf_use_skia) {
|
|
sources += [
|
|
"skia/cfx_dibbase_skia.cpp",
|
|
"skia/fx_skia_device.cpp",
|
|
]
|
|
public_deps += [ "//skia" ]
|
|
|
|
if (pdf_skia_font_manager_target != "") {
|
|
defines += [ "PDF_USE_SKIA_CUSTOM_FONT_MANAGER" ]
|
|
deps += [ pdf_skia_font_manager_target ]
|
|
}
|
|
}
|
|
|
|
if (pdf_enable_fontations) {
|
|
configs += [ ":skrifa_cxx_config" ]
|
|
deps += [
|
|
":skrifa_cxx",
|
|
":skrifa_cxx_cpp",
|
|
"//build/rust:cxx_cppdeps",
|
|
]
|
|
}
|
|
|
|
if (is_android) {
|
|
sources += [
|
|
"android/cfx_androidfontinfo.cpp",
|
|
"android/cfx_androidfontinfo.h",
|
|
"android/fx_android_impl.cpp",
|
|
]
|
|
}
|
|
|
|
if (is_linux || is_chromeos) {
|
|
sources += [ "linux/fx_linux_impl.cpp" ]
|
|
}
|
|
|
|
if (is_mac) {
|
|
sources += [
|
|
"apple/capple_platform.cpp",
|
|
"apple/capple_platform.h",
|
|
"apple/cquartz_2d.cpp",
|
|
"apple/cquartz_2d.h",
|
|
"apple/fx_apple_impl.cpp",
|
|
]
|
|
frameworks = [ "CoreGraphics.framework" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
sources += [
|
|
"win32/cfx_psfonttracker.cpp",
|
|
"win32/cfx_psfonttracker.h",
|
|
"win32/cfx_psrenderer.cpp",
|
|
"win32/cfx_psrenderer.h",
|
|
"win32/cgdi_device_driver.cpp",
|
|
"win32/cgdi_device_driver.h",
|
|
"win32/cgdi_display_driver.cpp",
|
|
"win32/cgdi_display_driver.h",
|
|
"win32/cgdi_plus_ext.cpp",
|
|
"win32/cgdi_plus_ext.h",
|
|
"win32/cgdi_printer_driver.cpp",
|
|
"win32/cgdi_printer_driver.h",
|
|
"win32/cps_printer_driver.cpp",
|
|
"win32/cps_printer_driver.h",
|
|
"win32/cpsoutput.cpp",
|
|
"win32/cpsoutput.h",
|
|
"win32/ctext_only_printer_driver.cpp",
|
|
"win32/ctext_only_printer_driver.h",
|
|
"win32/cwin32_platform.cpp",
|
|
"win32/cwin32_platform.h",
|
|
]
|
|
configs -= [ "//build/config/win:lean_and_mean" ]
|
|
}
|
|
|
|
if (pdf_enable_xfa) {
|
|
sources += [
|
|
"cfx_cttnametable.cpp",
|
|
"cfx_cttnametable.h",
|
|
]
|
|
}
|
|
|
|
visibility = [ "../../*" ]
|
|
}
|
|
|
|
if (pdf_enable_fontations) {
|
|
rust_static_library("skrifa_cxx") {
|
|
crate_name = "skrifa_cxx"
|
|
allow_unsafe = true
|
|
crate_root = "skrifa/src/main.rs"
|
|
sources = [ crate_root ]
|
|
cxx_bindings = [ crate_root ]
|
|
features = [ "agl" ]
|
|
deps = [
|
|
"//build/rust:cxx_cppdeps",
|
|
"//third_party/rust/read_fonts/v0_40:lib",
|
|
"//third_party/rust/skrifa/v0_43:lib",
|
|
]
|
|
configs += [ ":skrifa_cxx_config" ]
|
|
}
|
|
|
|
source_set("skrifa_cxx_cpp") {
|
|
sources = [
|
|
"skrifa/src/outlines.cpp",
|
|
"skrifa/src/outlines.h",
|
|
]
|
|
deps = [
|
|
":skrifa_cxx",
|
|
"//build/rust:cxx_cppdeps",
|
|
]
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
configs += [
|
|
"//build/config/compiler:no_chromium_code",
|
|
":skrifa_cxx_config",
|
|
]
|
|
visibility = [ ":*" ]
|
|
}
|
|
}
|
|
|
|
pdfium_unittest_source_set("unittests") {
|
|
sources = [
|
|
"cfx_color_unittest.cpp",
|
|
"cfx_folderfontinfo_unittest.cpp",
|
|
"cfx_font_unittest.cpp",
|
|
"cfx_fontmapper_unittest.cpp",
|
|
"cfx_path_unittest.cpp",
|
|
"cfx_renderdevice_unittest.cpp",
|
|
"cfx_standardfont_unittest.cpp",
|
|
"cfx_substfont_unittest.cpp",
|
|
"dib/blend_unittest.cpp",
|
|
"dib/cfx_cmyk_to_srgb_unittest.cpp",
|
|
"dib/cfx_dibbase_unittest.cpp",
|
|
"dib/cfx_dibitmap_unittest.cpp",
|
|
"dib/cfx_scanlinecompositor_unittest.cpp",
|
|
"dib/cstretchengine_unittest.cpp",
|
|
"dib/fx_dib_unittest.cpp",
|
|
"fx_font_unittest.cpp",
|
|
]
|
|
deps = [
|
|
":fxge",
|
|
"../fpdfapi/page",
|
|
"../fpdfapi/parser",
|
|
]
|
|
configs = []
|
|
pdfium_root_dir = "../../"
|
|
|
|
if (is_win) {
|
|
sources += [ "win32/cfx_psrenderer_unittest.cpp" ]
|
|
}
|
|
|
|
# CFX_AndroidFontInfo contains cross-platform logic that can be tested on
|
|
# Linux without Android-specific APIs.
|
|
if (is_linux) {
|
|
sources += [
|
|
"android/cfx_androidfontinfo.cpp",
|
|
"android/cfx_androidfontinfo.h",
|
|
"android/cfx_androidfontinfo_unittest.cpp",
|
|
]
|
|
}
|
|
|
|
if (pdf_enable_fontations) {
|
|
sources += [ "skrifa/fx_skrifa_unittest.cpp" ]
|
|
deps += [
|
|
":skrifa_cxx",
|
|
":skrifa_cxx_cpp",
|
|
"//build/rust:cxx_cppdeps",
|
|
]
|
|
configs += [ ":skrifa_cxx_config" ]
|
|
}
|
|
}
|
|
|
|
pdfium_embeddertest_source_set("embeddertests") {
|
|
sources = [ "fx_ge_text_embeddertest.cpp" ]
|
|
deps = []
|
|
pdfium_root_dir = "../../"
|
|
|
|
if (pdf_use_skia) {
|
|
sources += [ "skia/fx_skia_device_embeddertest.cpp" ]
|
|
deps += [
|
|
":fxge",
|
|
"../../fpdfsdk",
|
|
"../fpdfapi/page",
|
|
"../fpdfapi/render",
|
|
"//skia",
|
|
]
|
|
}
|
|
}
|