1# Copyright 2016 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6declare_args() {
7}
8
9import("../third_party.gni")
10
11third_party("sfntly") {
12  public_include_dirs = [ "../externals/sfntly/cpp/src" ]
13  defines = [ "SFNTLY_NO_EXCEPTION" ]
14  deps = [
15    "//third_party/icu",
16  ]
17  sources = [
18    "../externals/sfntly/cpp/src/sample/chromium/font_subsetter.cc",
19    "../externals/sfntly/cpp/src/sample/chromium/subsetter_impl.cc",
20    "../externals/sfntly/cpp/src/sfntly/data/byte_array.cc",
21    "../externals/sfntly/cpp/src/sfntly/data/font_data.cc",
22    "../externals/sfntly/cpp/src/sfntly/data/font_input_stream.cc",
23    "../externals/sfntly/cpp/src/sfntly/data/font_output_stream.cc",
24    "../externals/sfntly/cpp/src/sfntly/data/growable_memory_byte_array.cc",
25    "../externals/sfntly/cpp/src/sfntly/data/memory_byte_array.cc",
26    "../externals/sfntly/cpp/src/sfntly/data/readable_font_data.cc",
27    "../externals/sfntly/cpp/src/sfntly/data/writable_font_data.cc",
28    "../externals/sfntly/cpp/src/sfntly/font.cc",
29    "../externals/sfntly/cpp/src/sfntly/font_factory.cc",
30    "../externals/sfntly/cpp/src/sfntly/port/file_input_stream.cc",
31    "../externals/sfntly/cpp/src/sfntly/port/lock.cc",
32    "../externals/sfntly/cpp/src/sfntly/port/memory_input_stream.cc",
33    "../externals/sfntly/cpp/src/sfntly/port/memory_output_stream.cc",
34    "../externals/sfntly/cpp/src/sfntly/table/bitmap/big_glyph_metrics.cc",
35    "../externals/sfntly/cpp/src/sfntly/table/bitmap/bitmap_glyph.cc",
36    "../externals/sfntly/cpp/src/sfntly/table/bitmap/bitmap_glyph_info.cc",
37    "../externals/sfntly/cpp/src/sfntly/table/bitmap/bitmap_size_table.cc",
38    "../externals/sfntly/cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.cc",
39    "../externals/sfntly/cpp/src/sfntly/table/bitmap/ebdt_table.cc",
40    "../externals/sfntly/cpp/src/sfntly/table/bitmap/eblc_table.cc",
41    "../externals/sfntly/cpp/src/sfntly/table/bitmap/ebsc_table.cc",
42    "../externals/sfntly/cpp/src/sfntly/table/bitmap/glyph_metrics.cc",
43    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table.cc",
44    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table_format1.cc",
45    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table_format2.cc",
46    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table_format3.cc",
47    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table_format4.cc",
48    "../externals/sfntly/cpp/src/sfntly/table/bitmap/index_sub_table_format5.cc",
49    "../externals/sfntly/cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.cc",
50    "../externals/sfntly/cpp/src/sfntly/table/bitmap/small_glyph_metrics.cc",
51    "../externals/sfntly/cpp/src/sfntly/table/byte_array_table_builder.cc",
52    "../externals/sfntly/cpp/src/sfntly/table/core/cmap_table.cc",
53    "../externals/sfntly/cpp/src/sfntly/table/core/font_header_table.cc",
54    "../externals/sfntly/cpp/src/sfntly/table/core/horizontal_device_metrics_table.cc",
55    "../externals/sfntly/cpp/src/sfntly/table/core/horizontal_header_table.cc",
56    "../externals/sfntly/cpp/src/sfntly/table/core/horizontal_metrics_table.cc",
57    "../externals/sfntly/cpp/src/sfntly/table/core/maximum_profile_table.cc",
58    "../externals/sfntly/cpp/src/sfntly/table/core/name_table.cc",
59    "../externals/sfntly/cpp/src/sfntly/table/core/os2_table.cc",
60    "../externals/sfntly/cpp/src/sfntly/table/font_data_table.cc",
61    "../externals/sfntly/cpp/src/sfntly/table/generic_table_builder.cc",
62    "../externals/sfntly/cpp/src/sfntly/table/header.cc",
63    "../externals/sfntly/cpp/src/sfntly/table/subtable.cc",
64    "../externals/sfntly/cpp/src/sfntly/table/table.cc",
65    "../externals/sfntly/cpp/src/sfntly/table/table_based_table_builder.cc",
66    "../externals/sfntly/cpp/src/sfntly/table/truetype/glyph_table.cc",
67    "../externals/sfntly/cpp/src/sfntly/table/truetype/loca_table.cc",
68    "../externals/sfntly/cpp/src/sfntly/tag.cc",
69    "../externals/sfntly/cpp/src/sfntly/tools/subsetter/glyph_table_subsetter.cc",
70    "../externals/sfntly/cpp/src/sfntly/tools/subsetter/subsetter.cc",
71    "../externals/sfntly/cpp/src/sfntly/tools/subsetter/table_subsetter_impl.cc",
72  ]
73
74  if (is_win) {
75    defines += [ "WIN32", ]
76  }
77}
78