# 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("../../../pdfium.gni")
import("../../../testing/test.gni")

source_set("font") {
  sources = [
    "cfx_cttgsubtable.cpp",
    "cfx_cttgsubtable.h",
    "cfx_stockfontarray.cpp",
    "cfx_stockfontarray.h",
    "cpdf_cid2unicodemap.cpp",
    "cpdf_cid2unicodemap.h",
    "cpdf_cidfont.cpp",
    "cpdf_cidfont.h",
    "cpdf_cmap.cpp",
    "cpdf_cmap.h",
    "cpdf_cmapparser.cpp",
    "cpdf_cmapparser.h",
    "cpdf_font.cpp",
    "cpdf_font.h",
    "cpdf_fontencoding.cpp",
    "cpdf_fontencoding.h",
    "cpdf_fontglobals.cpp",
    "cpdf_fontglobals.h",
    "cpdf_simplefont.cpp",
    "cpdf_simplefont.h",
    "cpdf_tounicodemap.cpp",
    "cpdf_tounicodemap.h",
    "cpdf_truetypefont.cpp",
    "cpdf_truetypefont.h",
    "cpdf_type1font.cpp",
    "cpdf_type1font.h",
    "cpdf_type3char.cpp",
    "cpdf_type3char.h",
    "cpdf_type3font.cpp",
    "cpdf_type3font.h",
  ]
  configs += [
    "../../../:pdfium_strict_config",
    "../../../:pdfium_noshorten_config",
  ]
  deps = [
    "../../../constants",
    "../../fxcrt",
    "../../fxge",
    "../cmaps",
    "../parser",
  ]
  visibility = [ "../../../*" ]
  if (is_mac) {
    frameworks = [ "CoreFoundation.framework" ]
  }
}

pdfium_unittest_source_set("unittests") {
  sources = [
    "cpdf_cidfont_unittest.cpp",
    "cpdf_cmapparser_unittest.cpp",
    "cpdf_simplefont_unittest.cpp",
    "cpdf_tounicodemap_unittest.cpp",
  ]
  deps = [
    ":font",
    "../../fxge",
    "../page:unit_test_support",
    "../parser",
    "../parser:unit_test_support",
    "../render",
  ]
  pdfium_root_dir = "../../../"
}
