moz.build (3765B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 DEFINES['FT2_BUILD_LIBRARY'] = True 8 9 LOCAL_INCLUDES += [ 10 'include', 11 ] 12 13 # We allow warnings for third-party code that can be updated from upstream. 14 AllowCompilerWarnings() 15 16 # base components 17 SOURCES += [ 18 'src/base/ftbase.c', 19 'src/base/ftdebug.c', 20 'src/base/ftinit.c', 21 'src/base/ftsystem.c', 22 ] 23 24 # font modules 25 SOURCES += [ 26 'src/bdf/bdf.c', # BDF font driver. 27 'src/cff/cff.c', # CFF/OpenType font driver. 28 'src/cid/type1cid.c', # Type 1 CID-keyed font driver. 29 'src/pcf/pcf.c', # PCF font driver. 30 'src/pfr/pfr.c', # PFR/TrueDoc font driver. 31 'src/sdf/sdf.c', # SDF font driver. 32 'src/sfnt/sfnt.c', # SFNT files support. 33 'src/svg/svg.c', # OT-SVG rendering support. 34 'src/truetype/truetype.c', # TrueType font driver. 35 'src/type1/type1.c', # PostScript Type 1 font driver. 36 'src/type42/type42.c', # PostScript Type 42 font driver. 37 'src/winfonts/winfnt.c', # Windows FONT/FNT font driver. 38 ] 39 40 # hinting modules 41 SOURCES += [ 42 'src/autofit/autofit.c', # FreeType's auto hinter. 43 'src/pshinter/pshinter.c', # PostScript hinter. 44 ] 45 46 # raster modules 47 SOURCES += [ 48 'src/raster/raster.c', # Monochrome rasterizer. 49 'src/smooth/smooth.c', # Anti-aliasing rasterizer. 50 ] 51 52 # auxiliary modules 53 SOURCES += [ 54 'src/bzip2/ftbzip2.c', # Support for streams compressed with bzip2 (files with suffix .bz2). 55 'src/cache/ftcache.c', # FreeType's cache sub-system. 56 'src/gzip/ftgzip.c', # Support for streams compressed with gzip (files with suffix .gz). 57 'src/lzw/ftlzw.c', # Support for streams compressed with LZW (files with suffix .Z). 58 'src/psaux/psaux.c', # Auxiliary PostScript driver component to share common code. 59 'src/psnames/psnames.c', # Support for PostScript glyph names. 60 ] 61 62 # base module extensions 63 SOURCES += [ 64 'src/base/ftbbox.c', # Exact bounding box calculation. 65 'src/base/ftbdf.c', # Access BDF-specific strings. 66 'src/base/ftbitmap.c', # Utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp bitmaps into 8bpp format, and for emboldening of bitmap glyphs. 67 'src/base/ftcid.c', # Access CID font information. 68 'src/base/ftfstype.c', # Access FSType information. 69 'src/base/ftgasp.c', # Support for GASP table queries. 70 'src/base/ftglyph.c', # Convenience functions to handle glyphs. 71 'src/base/ftgxval.c', # Interface for gxvalid module. 72 'src/base/ftmm.c', # Multiple Master font interface. 73 'src/base/ftotval.c', # Interface for otvalid module. 74 'src/base/ftpatent.c', # Support for FT_Face_CheckTrueTypePatents. 75 'src/base/ftpfr.c', # Interface for accessing PFR-specific data. 76 'src/base/ftstroke.c', # Path stroker. 77 'src/base/ftsynth.c', # Support for synthetic embolding and slanting of fonts. 78 'src/base/fttype1.c', # Interface to access data specific to PostScript Type 1 and Type 2 (CFF) 79 'src/base/ftwinfnt.c', # Interface for accessing data specific to Windows FNT files. 80 ] 81 82 # zlib library 83 DEFINES['FT_CONFIG_OPTION_SYSTEM_ZLIB'] = True 84 CFLAGS += CONFIG['MOZ_ZLIB_CFLAGS'] 85 if not CONFIG["USE_LIBZ_RS"]: 86 USE_LIBS += ['zlib'] 87 88 # png library 89 DEFINES['FT_CONFIG_OPTION_USE_PNG'] = True 90 CFLAGS += CONFIG['MOZ_PNG_CFLAGS'] 91 USE_LIBS += ['mozpng'] 92 93 FINAL_LIBRARY = 'freetype'