• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15licenses(["notice"])
16
17# We can't just glob *.c, since Freetype has .c files that include other .c
18# files all over the place.  In order to simplify the process of listing them
19# manually, we patch out the non-TrueType drivers from the configuration file,
20# since the only font we ship is TrueType.
21sources = [
22    "src/autofit/afangles.c",
23    "src/autofit/afblue.c",
24    "src/autofit/afcjk.c",
25    "src/autofit/afdummy.c",
26    "src/autofit/afglobal.c",
27    "src/autofit/afhints.c",
28    "src/autofit/afindic.c",
29    "src/autofit/aflatin.c",
30    "src/autofit/afloader.c",
31    "src/autofit/afmodule.c",
32    "src/autofit/afpic.c",
33    "src/autofit/afranges.c",
34    "src/autofit/afshaper.c",
35    "src/autofit/afwarp.c",
36    "src/base/basepic.c",
37    "src/base/ftadvanc.c",
38    "src/base/ftapi.c",
39    "src/base/ftbbox.c",
40    "src/base/ftbdf.c",
41    "src/base/ftbitmap.c",
42    "src/base/ftcalc.c",
43    "src/base/ftcid.c",
44    "src/base/ftdbgmem.c",
45    "src/base/ftdebug.c",
46    "src/base/ftfntfmt.c",
47    "src/base/ftfstype.c",
48    "src/base/ftgasp.c",
49    "src/base/ftgloadr.c",
50    "src/base/ftglyph.c",
51    "src/base/ftgxval.c",
52    "src/base/fthash.c",
53    "src/base/ftinit.c",
54    "src/base/ftlcdfil.c",
55    "src/base/ftmm.c",
56    "src/base/ftobjs.c",
57    "src/base/ftotval.c",
58    "src/base/ftoutln.c",
59    "src/base/ftpatent.c",
60    "src/base/ftpfr.c",
61    "src/base/ftpic.c",
62    "src/base/ftrfork.c",
63    "src/base/ftsnames.c",
64    "src/base/ftstream.c",
65    "src/base/ftstroke.c",
66    "src/base/ftsynth.c",
67    "src/base/ftsystem.c",
68    "src/base/fttrigon.c",
69    "src/base/fttype1.c",
70    "src/base/ftutil.c",
71    "src/base/ftwinfnt.c",
72    "src/gzip/ftgzip.c",
73    "src/raster/ftraster.c",
74    "src/raster/ftrend1.c",
75    "src/raster/rastpic.c",
76    "src/sfnt/pngshim.c",
77    "src/sfnt/sfdriver.c",
78    "src/sfnt/sfntpic.c",
79    "src/sfnt/sfobjs.c",
80    "src/sfnt/ttbdf.c",
81    "src/sfnt/ttcmap.c",
82    "src/sfnt/ttkern.c",
83    "src/sfnt/ttload.c",
84    "src/sfnt/ttmtx.c",
85    "src/sfnt/ttpost.c",
86    "src/sfnt/ttsbit.c",
87    "src/smooth/ftgrays.c",
88    "src/smooth/ftsmooth.c",
89    "src/smooth/ftspic.c",
90    "src/truetype/ttdriver.c",
91    "src/truetype/ttgload.c",
92    "src/truetype/ttgxvar.c",
93    "src/truetype/ttinterp.c",
94    "src/truetype/ttobjs.c",
95    "src/truetype/ttpic.c",
96    "src/truetype/ttpload.c",
97    "src/truetype/ttsubpix.c",
98]
99
100cc_library(
101    name = "freetype",
102    srcs = sources,
103    hdrs = glob([
104        "src/**/*.h",
105        "include/**/*.h",
106    ]),
107    copts = [
108        "-DFT2_BUILD_LIBRARY",
109        "-UDEBUG",
110    ],
111    includes = ["include"],
112    textual_hdrs = glob(["src/**/*.c"]),
113    visibility = ["//visibility:public"],
114)
115