Compare commits
5 Commits
master
...
gsoc-anura
Author | SHA1 | Date | |
---|---|---|---|
|
d1eaaa9e2b | ||
|
64b2b80bcc | ||
|
45d3ff99d5 | ||
|
c0ceb0541a | ||
|
f48a8bc3e7 |
@ -654,7 +654,7 @@ endif ()
|
||||
# Packaging
|
||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
|
107
README
107
README
@ -1,107 +0,0 @@
|
||||
FreeType 2.13.1
|
||||
===============
|
||||
|
||||
Homepage: https://www.freetype.org
|
||||
|
||||
FreeType is a freely available software library to render fonts.
|
||||
|
||||
It is written in C, designed to be small, efficient, highly
|
||||
customizable, and portable while capable of producing high-quality
|
||||
output (glyph images) of most vector and bitmap font formats.
|
||||
|
||||
Please read the `docs/CHANGES` file, it contains IMPORTANT
|
||||
INFORMATION.
|
||||
|
||||
Read the files `docs/INSTALL*` for installation instructions; see the
|
||||
file `docs/LICENSE.TXT` for the available licenses.
|
||||
|
||||
For using FreeType's git repository instead of a distribution bundle,
|
||||
please read file `README.git`. Note that you have to actually clone
|
||||
the repository; using a snapshot will not work (in other words, don't
|
||||
use gitlab's 'Download' button).
|
||||
|
||||
The FreeType 2 API reference is located in directory `docs/reference`;
|
||||
use the file `index.html` as the top entry point. [Please note that
|
||||
currently the search function for locally installed documentation
|
||||
doesn't work due to cross-site scripting issues.]
|
||||
|
||||
Additional documentation is available as a separate package from our
|
||||
sites. Go to
|
||||
|
||||
https://download.savannah.gnu.org/releases/freetype/
|
||||
|
||||
and download one of the following files.
|
||||
|
||||
freetype-doc-2.13.1.tar.xz
|
||||
freetype-doc-2.13.1.tar.gz
|
||||
ftdoc2131.zip
|
||||
|
||||
To view the documentation online, go to
|
||||
|
||||
https://www.freetype.org/freetype2/docs/
|
||||
|
||||
|
||||
Mailing Lists
|
||||
-------------
|
||||
|
||||
The preferred way of communication with the FreeType team is using
|
||||
e-mail lists.
|
||||
|
||||
general use and discussion: freetype@nongnu.org
|
||||
engine internals, porting, etc.: freetype-devel@nongnu.org
|
||||
announcements: freetype-announce@nongnu.org
|
||||
git repository tracker: freetype-commit@nongnu.org
|
||||
|
||||
The lists are moderated; see
|
||||
|
||||
https://www.freetype.org/contact.html
|
||||
|
||||
how to subscribe.
|
||||
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
||||
Please submit bug reports at
|
||||
|
||||
https://gitlab.freedesktop.org/freetype/freetype/-/issues
|
||||
|
||||
Alternatively, you might report bugs by e-mail to
|
||||
`freetype-devel@nongnu.org`. Don't forget to send a detailed
|
||||
explanation of the problem -- there is nothing worse than receiving a
|
||||
terse message that only says 'it doesn't work'.
|
||||
|
||||
|
||||
Patches
|
||||
-------
|
||||
|
||||
For larger changes please provide merge requests at
|
||||
|
||||
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
|
||||
|
||||
Alternatively, you can send patches to the `freetype-devel@nongnu.org`
|
||||
mailing list -- and thank you in advance for your work on improving
|
||||
FreeType!
|
||||
|
||||
Details on the process can be found here:
|
||||
|
||||
https://www.freetype.org/developer.html#patches
|
||||
|
||||
|
||||
Enjoy!
|
||||
|
||||
The FreeType Team
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2006-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README ---
|
102
README.git
102
README.git
@ -1,102 +0,0 @@
|
||||
README.git
|
||||
==========
|
||||
|
||||
|
||||
repository issues
|
||||
-----------------
|
||||
|
||||
FreeType's official repository site is
|
||||
|
||||
https://gitlab.freedesktop.org/freetype ,
|
||||
|
||||
from which the 'freetype.git' and 'freetype-demos.git' repositories
|
||||
can be cloned in the usual way.
|
||||
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype.git
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git
|
||||
|
||||
If you want to use the Savannah mirror instead, you have to do a
|
||||
slightly different incantation because the repository names contain
|
||||
digit '2' for historical reasons.
|
||||
|
||||
git clone \
|
||||
https://git.savannah.nongnu.org/git/freetype/freetype2.git \
|
||||
freetype
|
||||
git clone \
|
||||
https://git.savannah.nongnu.org/git/freetype/freetype2-demos.git \
|
||||
freetype-demos
|
||||
|
||||
|
||||
standard builds with `configure`
|
||||
--------------------------------
|
||||
|
||||
The git repository doesn't contain pre-built configuration scripts for
|
||||
UNIXish platforms. To generate them say
|
||||
|
||||
sh autogen.sh
|
||||
|
||||
which in turn depends on the following packages:
|
||||
|
||||
automake (1.10.1)
|
||||
libtool (2.2.4)
|
||||
autoconf (2.62)
|
||||
|
||||
The versions given in parentheses are known to work. Newer versions
|
||||
should work too, of course. Note that `autogen.sh` also sets up
|
||||
proper file permissions for the `configure` and auxiliary scripts.
|
||||
|
||||
The `autogen.sh` script checks whether the versions of the above three
|
||||
tools match the numbers above. Otherwise it will complain and suggest
|
||||
either upgrading or using environment variables to point to more
|
||||
recent versions of the required tools.
|
||||
|
||||
Note that `aclocal` is provided by the 'automake' package on Linux,
|
||||
and that `libtoolize` is called `glibtoolize` on Darwin (OS X).
|
||||
|
||||
|
||||
alternative build methods
|
||||
-------------------------
|
||||
|
||||
For static builds that don't use platform-specific optimizations, no
|
||||
configure script is necessary at all; saying
|
||||
|
||||
make setup ansi
|
||||
make
|
||||
|
||||
should work on all platforms that have GNU `make` (or `makepp`).
|
||||
|
||||
A build with `cmake` or `meson` can be done directly from the git
|
||||
repository. However, if you want to use the `FT_DEBUG_LOGGING` macro
|
||||
(see file `docs/DEBUG` for more information) it is currently mandatory
|
||||
to execute `autogen.sh` in advance; this script clones the 'dlg' git
|
||||
submodule and copies some files into FreeType's source tree.
|
||||
|
||||
|
||||
Code of Conduct
|
||||
---------------
|
||||
|
||||
Please note that this project is released with a Contributor Code of
|
||||
Conduct (CoC). By participating in this project you agree to abide by
|
||||
its terms, which you can find in the following link:
|
||||
|
||||
https://www.freedesktop.org/wiki/CodeOfConduct
|
||||
|
||||
CoC issues may be raised to the project maintainers at the following
|
||||
address:
|
||||
|
||||
wl@gnu.org
|
||||
apodtele@gmail.com
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2005-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README.git ---
|
161
README.md
Normal file
161
README.md
Normal file
@ -0,0 +1,161 @@
|
||||
# FreeType ![Badge Version]
|
||||
|
||||
*A freely available software library to render fonts.*
|
||||
|
||||
---
|
||||
|
||||
**[❮ Website ❯][Website]**
|
||||
**[❮ Install ❯][INSTALL]**
|
||||
**[❮ Changes ❯][CHANGES]**
|
||||
**[❮ Documentation ❯][Documentation]**
|
||||
**[❮ API ❯][API]**
|
||||
**[❮ License ❯][LICENSE]**
|
||||
|
||||
---
|
||||
|
||||
**FreeType** is a **C** library, designed to be small, efficient, highly
|
||||
customizable, and portable while capable of producing high-quality
|
||||
output (glyph images) of most vector and bitmap font formats.
|
||||
|
||||
---
|
||||
![alt text](https://freetype.org/image/fond3.png "Title Text")
|
||||
|
||||
# Documentation
|
||||
The FreeType 2 API reference for the latest release, along with additional
|
||||
documentation can be found online at:
|
||||
|
||||
>https://freetype.org/freetype2/docs/documentation.html
|
||||
|
||||
Refer to [DOCGUIDE] for more information.
|
||||
|
||||
|
||||
# Repo Mirrors
|
||||
|
||||
FreeType's official git repository is located at
|
||||
|
||||
>https://gitlab.freedesktop.org/freetype
|
||||
|
||||
from which the 'freetype.git' and 'freetype-demos.git' repositories
|
||||
can be cloned in the usual way.
|
||||
|
||||
FreeType:
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype.git
|
||||
```
|
||||
|
||||
FreeType-demos:
|
||||
```bash
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git
|
||||
```
|
||||
|
||||
If you want to use the Savannah mirror instead, you have to do a
|
||||
slightly different incantation because the repository names contain
|
||||
digit '2' for historical reasons.
|
||||
|
||||
```bash
|
||||
git clone https://git.savannah.nongnu.org/git/freetype/freetype2.git
|
||||
```
|
||||
|
||||
```bash
|
||||
git clone https://git.savannah.nongnu.org/git/freetype/freetype2-demos.git
|
||||
```
|
||||
|
||||
|
||||
# Compiling FreeType
|
||||
FreeType supports compilation via meson, GNU make and CMake
|
||||
|
||||
Refer to [INSTALL] for more information.
|
||||
|
||||
|
||||
# Licensing
|
||||
FreeType is dual-licensed under the FTL and GPLv2.
|
||||
|
||||
Refer to [LICENSE] for more information.
|
||||
|
||||
|
||||
# Reporting Issues
|
||||
Please submit bug reports at
|
||||
|
||||
>https://gitlab.freedesktop.org/freetype/freetype/-/issues
|
||||
|
||||
If you have suggestions for improving FreeType, they should be sent
|
||||
to the `freetype-devel` mailing list.
|
||||
|
||||
|
||||
# Improving FreeType
|
||||
For instructions on compiling FreeType, see [INSTALL].
|
||||
|
||||
Please send merge requests to our gitlab repo at:
|
||||
|
||||
>https://gitlab.freedesktop.org/freetype/freetype/
|
||||
|
||||
Alternatively, you can send patches to the `freetype-devel` mailing list.
|
||||
Details on the process can be found here:
|
||||
|
||||
>https://www.freetype.org/developer.html#patches
|
||||
|
||||
Any non-trivial contribution should first be discussed with the maintainers
|
||||
via the `freetype-devel` mailing list.
|
||||
|
||||
|
||||
# Contact
|
||||
The preferred way of communication with the FreeType team is using
|
||||
mailing lists.
|
||||
|
||||
*↳* [*How do I subscribe?*][Contact]
|
||||
|
||||
|
||||
| Email | Details |
|
||||
|------------------------------|-------------------------------|
|
||||
| freetype@nongnu.org | General use and discussion |
|
||||
| freetype-devel@nongnu.org | Engine internals, Porting etc |
|
||||
| freetype-announce@nongnu.org | Announcements |
|
||||
| freetype-commit@nongnu.org | Git repository track |
|
||||
|
||||
**The lists are moderated**
|
||||
|
||||
|
||||
# Code of Conduct
|
||||
Please note that this project is released with a Contributor Code of
|
||||
Conduct (CoC). By participating in this project you agree to abide by
|
||||
its terms, which you can find in the following link:
|
||||
|
||||
>https://www.freedesktop.org/wiki/CodeOfConduct
|
||||
|
||||
CoC issues may be raised to the project maintainers at the following
|
||||
address:
|
||||
|
||||
- wl@gnu.org
|
||||
- apodtele@gmail.com
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2006-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
|
||||
<!-------------------------------------------------------------------------->
|
||||
|
||||
[Website]: https://www.freetype.org
|
||||
[Issues]: https://gitlab.freedesktop.org/freetype/freetype/-/issues
|
||||
[Contact]: https://www.freetype.org/contact.html
|
||||
[Merge Request]: https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
|
||||
[Patches]: https://www.freetype.org/developer.html#patches
|
||||
[Documentation]: https://freetype.org/freetype2/docs/documentation.html
|
||||
[Releases]: https://download.savannah.gnu.org/releases/freetype/
|
||||
[API]: https://freetype.org/freetype2/docs/reference/index.html
|
||||
|
||||
[INSTALL]: ./docs/INSTALL.md
|
||||
[CHANGES]: ./docs/CHANGES
|
||||
[LICENSE]: ./LICENSE.TXT
|
||||
[DOCGUIDE]: ./docs/DOCGUIDE
|
||||
|
||||
[Badge Version]: https://gitlab.freedesktop.org/freetype/freetype/-/badges/release.svg
|
10
docs/.gitignore
vendored
10
docs/.gitignore
vendored
@ -5,6 +5,16 @@ reference/
|
||||
*.html
|
||||
*.md
|
||||
|
||||
!INSTALL.md
|
||||
!INSTALL_ANY.md
|
||||
!INSTALL_CROSS.md
|
||||
!INSTALL_GNU.md
|
||||
!INSTALL_MAC.md
|
||||
!INSTALL_UNIX.md
|
||||
!INSTALL_VMS.md
|
||||
!INSTALL_ANDROID.md
|
||||
!MODIFYING.md
|
||||
|
||||
# MkDocs Config file
|
||||
mkdocs.yml
|
||||
|
||||
|
114
docs/INSTALL
114
docs/INSTALL
@ -1,114 +0,0 @@
|
||||
|
||||
There are several ways to build the FreeType library, depending on
|
||||
your system and the level of customization you need. Here is a short
|
||||
overview of the documentation available:
|
||||
|
||||
|
||||
I. Prerequisites and dependencies
|
||||
=================================
|
||||
|
||||
FreeType is a low level C library that only depends on the standard
|
||||
C library with very few platform-dependent optimizations utilized at
|
||||
build time. Any C99-compliant compiler should be able to compile
|
||||
FreeType. System libraries, such as zlib, Gzip, bzip2, Brotli,
|
||||
and libpng, might be used to handle compressed fonts or decode
|
||||
embedded PNG glyphs.
|
||||
|
||||
FreeType auto-configuration scripts should be able to detect the
|
||||
prerequisites if the necessary headers are available at the default
|
||||
locations. Otherwise, modify `include/freetype/config/ftoption.h`
|
||||
to control how the FreeType library gets built. Normally, you don't
|
||||
need to change anything.
|
||||
|
||||
Applications have very limited control over FreeType's behaviour at
|
||||
run-time; look at the documentation of function `FT_Property_Set`.
|
||||
|
||||
|
||||
II. Normal installation and upgrades
|
||||
====================================
|
||||
|
||||
1. Unix and Unix-like systems
|
||||
|
||||
This also includes MacOS, Cygwin, MinGW + MSYS, Mingw-w64 + MSYS2,
|
||||
and possibly other, similar environments.
|
||||
|
||||
Please read `INSTALL.UNIX` to install or upgrade FreeType 2 on a
|
||||
Unix system. Note that you *need* GNU Make for automatic
|
||||
compilation, since other make tools won't work (this includes BSD
|
||||
Make).
|
||||
|
||||
GNU Make VERSION 3.81 OR NEWER IS NEEDED!
|
||||
|
||||
|
||||
2. Other systems using GNU Make
|
||||
|
||||
On some non-Unix platforms, it is possible to build the library
|
||||
using only the GNU Make utility. Note that *NO OTHER MAKE TOOL
|
||||
WILL WORK*[1]! This methods supports several compilers on
|
||||
Windows, OS/2, and BeOS, including MinGW* (without MSYS*), Visual
|
||||
C++, Borland C++, and more.
|
||||
|
||||
Instructions are provided in the file `INSTALL.GNU`.
|
||||
|
||||
|
||||
3. Other build tools and platforms.
|
||||
|
||||
A few other tools can be used to build FreeType. You can find
|
||||
the corresponding instruction files in the FreeType root folder
|
||||
or the builds/ sub-folder.
|
||||
|
||||
CMake :: see `CMakeLists.txt` for more information
|
||||
Meson :: see `meson.build` for more information
|
||||
MSBuild :: see `builds/windows/vc2010/freetype.vcxproj`
|
||||
MMS :: see `vms_make.com` and `docs/INSTALL.VMS`
|
||||
|
||||
|
||||
4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
|
||||
|
||||
We provide a small number of 'project files' for various IDEs to
|
||||
automatically build the library as well. Note that these files
|
||||
are not actively supported by FreeType developers, they can break
|
||||
or become obsolete.
|
||||
|
||||
To find them, have a look at the content of the `builds/<system>`
|
||||
directory, where <system> stands for your OS or environment.
|
||||
|
||||
|
||||
5. From you own IDE, or own Makefiles
|
||||
|
||||
If you want to create your own project file, follow the
|
||||
instructions given in the `INSTALL.ANY` document of this
|
||||
directory.
|
||||
|
||||
|
||||
III. Custom builds of the library
|
||||
=================================
|
||||
|
||||
Customizing the compilation of FreeType is easy, and allows you to
|
||||
select only the components of the font engine that you really need.
|
||||
For more details read the file `CUSTOMIZE`.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
[1] make++, a make tool written in Perl, has sufficient support of GNU
|
||||
make extensions to build FreeType. See
|
||||
|
||||
https://makepp.sourceforge.net
|
||||
|
||||
for more information; you need version 2.0 or newer, and you must
|
||||
pass option `--norc-substitution`.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2000-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL ---
|
157
docs/INSTALL.ANY
157
docs/INSTALL.ANY
@ -1,157 +0,0 @@
|
||||
Instructions on how to build FreeType with your own build tool
|
||||
==============================================================
|
||||
|
||||
See the file `CUSTOMIZE' to learn how to customize FreeType to
|
||||
specific environments.
|
||||
|
||||
|
||||
I. Standard procedure
|
||||
---------------------
|
||||
|
||||
* If you use macro names for FreeType header files (while mandatory
|
||||
in earlier versions, this is now optional since FreeType version
|
||||
2.6.1) it is necessary to disable pre-compiled headers. This is
|
||||
very important for Visual C++, because lines like
|
||||
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
are not correctly supported by this compiler while being ISO C
|
||||
compliant!
|
||||
|
||||
* You need to add the directory `include' to your include path when
|
||||
compiling the library.
|
||||
|
||||
* FreeType 2 is made of several components; each of them is located
|
||||
in a subdirectory of `freetype/src'. For example,
|
||||
`freetype/src/truetype/' contains the TrueType font driver.
|
||||
|
||||
* DO NOT COMPILE ALL C FILES! Rather, compile the following ones.
|
||||
|
||||
-- base components (required)
|
||||
|
||||
src/base/ftsystem.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftdebug.c
|
||||
|
||||
src/base/ftbase.c
|
||||
|
||||
src/base/ftbbox.c -- recommended, see <ftbbox.h>
|
||||
src/base/ftglyph.c -- recommended, see <ftglyph.h>
|
||||
|
||||
src/base/ftbdf.c -- optional, see <ftbdf.h>
|
||||
src/base/ftbitmap.c -- optional, see <ftbitmap.h>
|
||||
src/base/ftcid.c -- optional, see <ftcid.h>
|
||||
src/base/ftfstype.c -- optional
|
||||
src/base/ftgasp.c -- optional, see <ftgasp.h>
|
||||
src/base/ftgxval.c -- optional, see <ftgxval.h>
|
||||
src/base/ftmm.c -- optional, see <ftmm.h>
|
||||
src/base/ftotval.c -- optional, see <ftotval.h>
|
||||
src/base/ftpatent.c -- optional
|
||||
src/base/ftpfr.c -- optional, see <ftpfr.h>
|
||||
src/base/ftstroke.c -- optional, see <ftstroke.h>
|
||||
src/base/ftsynth.c -- optional, see <ftsynth.h>
|
||||
src/base/fttype1.c -- optional, see <t1tables.h>
|
||||
src/base/ftwinfnt.c -- optional, see <ftwinfnt.h>
|
||||
|
||||
src/base/ftmac.c -- only on the Macintosh
|
||||
|
||||
-- font drivers (optional; at least one is needed)
|
||||
|
||||
src/bdf/bdf.c -- BDF font driver
|
||||
src/cff/cff.c -- CFF/OpenType font driver
|
||||
src/cid/type1cid.c -- Type 1 CID-keyed font driver
|
||||
src/pcf/pcf.c -- PCF font driver
|
||||
src/pfr/pfr.c -- PFR/TrueDoc font driver
|
||||
src/sfnt/sfnt.c -- SFNT files support
|
||||
(TrueType & OpenType)
|
||||
src/truetype/truetype.c -- TrueType font driver
|
||||
src/type1/type1.c -- Type 1 font driver
|
||||
src/type42/type42.c -- Type 42 font driver
|
||||
src/winfonts/winfnt.c -- Windows FONT / FNT font driver
|
||||
|
||||
-- rasterizers (optional; at least one is needed for vector
|
||||
formats)
|
||||
|
||||
src/raster/raster.c -- monochrome rasterizer
|
||||
src/sdf/sdf.c -- Signed Distance Field driver
|
||||
src/smooth/smooth.c -- anti-aliasing rasterizer
|
||||
|
||||
-- auxiliary modules (optional)
|
||||
|
||||
src/autofit/autofit.c -- auto hinting module
|
||||
src/cache/ftcache.c -- cache sub-system (in beta)
|
||||
src/gzip/ftgzip.c -- support for compressed fonts (.gz)
|
||||
src/lzw/ftlzw.c -- support for compressed fonts (.Z)
|
||||
src/bzip2/ftbzip2.c -- support for compressed fonts (.bz2)
|
||||
src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation
|
||||
src/otvalid/otvalid.c -- OpenType table validation
|
||||
src/psaux/psaux.c -- PostScript Type 1 parsing
|
||||
src/pshinter/pshinter.c -- PS hinting module
|
||||
src/psnames/psnames.c -- PostScript glyph names support
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
`ftcache.c' needs `ftglyph.c'
|
||||
`ftfstype.c' needs `fttype1.c'
|
||||
`ftglyph.c' needs `ftbitmap.c'
|
||||
`ftstroke.c' needs `ftglyph.c'
|
||||
`ftsynth.c' needs `ftbitmap.c'
|
||||
|
||||
`cff.c' needs `sfnt.c', `pshinter.c', and `psnames.c'
|
||||
`truetype.c' needs `sfnt.c' and `psnames.c'
|
||||
`type1.c' needs `psaux.c' `pshinter.c', and `psnames.c'
|
||||
`type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
|
||||
`type42.c' needs `truetype.c'
|
||||
|
||||
Please consult the central `include/freetype/config/ftoption.h'
|
||||
configuration file for details on additional libraries necessary
|
||||
for some optional features.
|
||||
|
||||
|
||||
Read the file `CUSTOMIZE' in case you want to compile only a subset
|
||||
of the drivers, renderers, and optional modules; a detailed
|
||||
description of the various base extension is given in the top-level
|
||||
file `modules.cfg'.
|
||||
|
||||
You are done. In case of problems, see the archives of the FreeType
|
||||
development mailing list.
|
||||
|
||||
|
||||
II. Support for flat-directory compilation
|
||||
------------------------------------------
|
||||
|
||||
It is possible to put all FreeType 2 source files into a single
|
||||
directory, with the *exception* of the `include' hierarchy.
|
||||
|
||||
1. Copy all files in current directory
|
||||
|
||||
cp freetype/src/base/*.[hc] .
|
||||
cp freetype/src/raster1/*.[hc] .
|
||||
cp freetype/src/smooth/*.[hc] .
|
||||
etc.
|
||||
|
||||
2. Compile sources
|
||||
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c
|
||||
etc.
|
||||
|
||||
You don't need to define the FT_FLAT_COMPILATION macro (as this
|
||||
was required in previous releases of FreeType 2).
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL.ANY ---
|
@ -1,177 +0,0 @@
|
||||
This document contains instructions on how to cross-build the FreeType
|
||||
library on Unix systems, for example, building binaries for Linux/MIPS
|
||||
on FreeBSD/i386. Before reading this document, please consult the
|
||||
file `INSTALL.UNIX' for required tools and the basic self-building
|
||||
procedure.
|
||||
|
||||
|
||||
1. Required Tools
|
||||
-----------------
|
||||
|
||||
For self-building the FreeType library on a Unix system, GNU Make
|
||||
3.81 or newer is required. `INSTALL.UNIX' contains hints how to
|
||||
check the installed `make'.
|
||||
|
||||
The GNU C compiler to cross-build the target system is required.
|
||||
Currently, using a non-GNU cross compiler is untested. The cross
|
||||
compiler is expected to be installed with a system prefix. For
|
||||
example, if your building system is FreeBSD/i386 and the target
|
||||
system is Linux/MIPS, the cross compiler should be installed with
|
||||
the name `mips-ip22-linuxelf-gcc'.
|
||||
|
||||
A C compiler for a self-build is required also, to build a tool
|
||||
(`apinames') that is executed during the build procedure. Non-GNU
|
||||
self compilers are acceptable, but such a setup is untested.
|
||||
|
||||
|
||||
2. Configuration
|
||||
----------------
|
||||
|
||||
2.1. Building and target system
|
||||
|
||||
To configure a cross-build, the options `--host=<system>' and
|
||||
`--build=<system>' must be passed to the `configure' script.
|
||||
For example, if your build system is FreeBSD/i386 and the target
|
||||
system is Linux/MIPS, say
|
||||
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
[other options]
|
||||
|
||||
It should be noted that `--host=<system>' specifies the system
|
||||
where the built binaries will be executed, not the system where
|
||||
the build actually happens. Older versions of GNU autoconf use
|
||||
the option pair `--host=' and `--target='. This is broken and
|
||||
doesn't work. Similarly, an explicit CC specification like
|
||||
|
||||
env CC=mips-ip22-linux-gcc ./configure # BAD
|
||||
|
||||
or
|
||||
|
||||
env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure # BAD
|
||||
|
||||
doesn't work either; such a configuration confuses the
|
||||
`configure' script while trying to find the cross and native C
|
||||
compilers.
|
||||
|
||||
|
||||
2.2. The prefix to install FreeType2
|
||||
|
||||
Setting `--prefix=<prefix>' properly is important. The prefix
|
||||
to install FreeType2 is written into the `freetype-config'
|
||||
script and `freetype2.pc' configuration file.
|
||||
|
||||
If the built FreeType 2 library is used as a part of the
|
||||
cross-building system, the prefix is expected to be different
|
||||
from the self-building system. For example, a configuration
|
||||
with `--prefix=/usr/local' installs binaries into the
|
||||
system-wide `/usr/local' directory, which then can't be executed
|
||||
due to the incorrect architecture. This causes confusion in
|
||||
configuration of all applications that use FreeType2. Instead,
|
||||
use a prefix to install the cross-build into a separate system
|
||||
tree, for example, `--prefix=/usr/local/mips-ip22-linux/'.
|
||||
|
||||
On the other hand, if the built FreeType 2 library is used as a
|
||||
part of the target system, the prefix to install should reflect
|
||||
the file system structure of the target system.
|
||||
|
||||
|
||||
2.3. Library dependencies
|
||||
|
||||
FreeType normally depends on external libraries like `libpng' or
|
||||
`libharfbuzz'. The easiest case is to deactivate all such
|
||||
dependencies using the `--without-XXX' configuration options.
|
||||
However, if you want to use those libraries, you should ensure
|
||||
that they are available both on the target system and as
|
||||
(cross-compiled) libraries on the build system.
|
||||
|
||||
FreeType uses `pkg-config' to find most of the libraries; the
|
||||
other libraries it links to are expected in the standard system
|
||||
directories. Since the default pkg-config's meta-information
|
||||
files (like `harfbuzz.pc') of the build platform don't work, use
|
||||
one of the two possible solutions below.
|
||||
|
||||
o Use pkg-config's meta-information files that are adjusted to
|
||||
cross-compile and cross-link with the target platform's
|
||||
libraries. Make sure those files are found before the build
|
||||
system's default files. Example:
|
||||
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \
|
||||
[other options]
|
||||
|
||||
See the manpage of `pkg-config' for more details.
|
||||
|
||||
o Set variables like LIBPNG_LIBS as additional options to the
|
||||
`configure' script, overriding the values `pkg-config' would
|
||||
provide. `configure --help' shows the available environment
|
||||
variables. Example:
|
||||
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \
|
||||
LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \
|
||||
[other options]
|
||||
|
||||
|
||||
3. Building command
|
||||
-------------------
|
||||
|
||||
If the configuration finishes successfully, invoking GNU make
|
||||
builds FreeType2. Just say
|
||||
|
||||
make
|
||||
|
||||
or
|
||||
|
||||
gmake
|
||||
|
||||
depending on the name the GNU make binary actually has.
|
||||
|
||||
|
||||
4. Installation
|
||||
---------------
|
||||
|
||||
Saying
|
||||
|
||||
make install
|
||||
|
||||
as usual to install FreeType2 into the directory tree specified by
|
||||
the argument of the `--prefix' option.
|
||||
|
||||
As noted in section 2.2, FreeType2 is sometimes configured to be
|
||||
installed into the system directory of the target system, and
|
||||
should not be installed in the cross-building system. In such
|
||||
cases, the make variable `DESTDIR' is useful to change the root
|
||||
directory in the installation. For example, after
|
||||
|
||||
make DESTDIR=/mnt/target_system_root/ install
|
||||
|
||||
the built FreeType2 library files are installed into the directory
|
||||
`/mnt/target_system_root/<prefix_in_configure>/lib'.
|
||||
|
||||
|
||||
5. TODO
|
||||
-------
|
||||
|
||||
Cross building between Cygwin (or MSys) and Unix must be tested.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2006-2023 by
|
||||
suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL.CROSS ---
|
181
docs/INSTALL.GNU
181
docs/INSTALL.GNU
@ -1,181 +0,0 @@
|
||||
This document contains instructions how to build the FreeType library
|
||||
on non-Unix systems with the help of GNU Make. Note that if you are
|
||||
running Cygwin or MinGW/MSYS in Windows, you should follow the
|
||||
instructions in the file `INSTALL.UNIX' instead.
|
||||
|
||||
|
||||
FreeType 2 includes a powerful and flexible build system that allows
|
||||
you to easily compile it on a great variety of platforms from the
|
||||
command line. To do so, just follow these simple instructions.
|
||||
|
||||
1. Install GNU Make
|
||||
-------------------
|
||||
|
||||
The FreeType 2 build system relies on many features special to GNU
|
||||
Make.
|
||||
|
||||
NEARLY ALL OTHER MAKE TOOLS FAIL, INCLUDING `BSD MAKE', SO REALLY
|
||||
INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
|
||||
|
||||
Note that make++, a make tool written in Perl, supports enough
|
||||
features of GNU make to compile FreeType. See
|
||||
|
||||
https://makepp.sourceforge.net
|
||||
|
||||
for more information; you need version 2.0 or newer, and you must
|
||||
pass option `--norc-substitution'.
|
||||
|
||||
Make sure that you are invoking GNU Make from the command line, by
|
||||
typing something like:
|
||||
|
||||
make -v
|
||||
|
||||
to display its version number.
|
||||
|
||||
VERSION 3.81 OR NEWER IS NEEDED!
|
||||
|
||||
|
||||
2. Invoke `make'
|
||||
----------------
|
||||
|
||||
Go to the root directory of FreeType 2, then simply invoke GNU
|
||||
Make from the command line. This will launch the FreeType 2 host
|
||||
platform detection routines. A summary will be displayed, for
|
||||
example, on Win32.
|
||||
|
||||
|
||||
==============================================================
|
||||
FreeType build system -- automatic system detection
|
||||
|
||||
The following settings are used:
|
||||
|
||||
platform windows
|
||||
compiler gcc
|
||||
configuration directory .\builds\windows
|
||||
configuration rules .\builds\windows\w32-gcc.mk
|
||||
|
||||
If this does not correspond to your system or settings please
|
||||
remove the file 'config.mk' from this directory then read the
|
||||
INSTALL file for help.
|
||||
|
||||
Otherwise, simply type 'make' again to build the library
|
||||
or 'make refdoc' to build the API reference (the latter needs
|
||||
Python >= 3.5).
|
||||
=============================================================
|
||||
|
||||
|
||||
If the detected settings correspond to your platform and compiler,
|
||||
skip to step 5. Note that if your platform is completely alien to
|
||||
the build system, the detected platform will be `ansi'.
|
||||
|
||||
|
||||
3. Configure the build system for a different compiler
|
||||
------------------------------------------------------
|
||||
|
||||
If the build system correctly detected your platform, but you want
|
||||
to use a different compiler than the one specified in the summary
|
||||
(for most platforms, gcc is the default compiler), invoke GNU Make
|
||||
with
|
||||
|
||||
make setup <compiler>
|
||||
|
||||
Examples:
|
||||
|
||||
to use Visual C++ on Win32, type: `make setup visualc'
|
||||
to use Borland C++ on Win32, type `make setup bcc32'
|
||||
to use Watcom C++ on Win32, type `make setup watcom'
|
||||
to use Intel C++ on Win32, type `make setup intelc'
|
||||
to use LCC-Win32 on Win32, type: `make setup lcc'
|
||||
to use Watcom C++ on OS/2, type `make setup watcom'
|
||||
to use VisualAge C++ on OS/2, type `make setup visualage'
|
||||
|
||||
The <compiler> name to use is platform-dependent. The list of
|
||||
available compilers for your system is available in the file
|
||||
`builds/<system>/detect.mk'.
|
||||
|
||||
If you are satisfied by the new configuration summary, skip to
|
||||
step 5.
|
||||
|
||||
|
||||
3a. Use clang instead of gcc
|
||||
----------------------------
|
||||
|
||||
The `clang' compiler can use FreeType's setup for `gcc'; it is
|
||||
sufficient to set the `CC' variable, for example
|
||||
|
||||
make CC=clang
|
||||
|
||||
|
||||
3b. Compiling with a C++ compiler
|
||||
---------------------------------
|
||||
|
||||
FreeType can be built with a C++ compiler, for example
|
||||
|
||||
make CC="g++"
|
||||
|
||||
If `clang++' should be used it is necessary to also override the
|
||||
`ANSIFLAGS' variable:
|
||||
|
||||
make CC="clang++" ANSIFLAGS=""
|
||||
|
||||
|
||||
4. Configure the build system for an unknown platform/compiler
|
||||
--------------------------------------------------------------
|
||||
|
||||
The auto-detection/setup phase of the build system copies a file
|
||||
to the current directory under the name `config.mk'.
|
||||
|
||||
For example, on OS/2+gcc, it would simply copy
|
||||
`builds/os2/os2-gcc.mk' to `./config.mk'.
|
||||
|
||||
If for some reason your platform isn't correctly detected, copy
|
||||
manually the configuration sub-makefile to `./config.mk' and go to
|
||||
step 5.
|
||||
|
||||
Note that this file is a sub-Makefile used to specify Make
|
||||
variables for compiler and linker invocation during the build.
|
||||
You can easily create your own version from one of the existing
|
||||
configuration files, then copy it to the current directory under
|
||||
the name `./config.mk'.
|
||||
|
||||
|
||||
5. Build the library
|
||||
--------------------
|
||||
|
||||
The auto-detection/setup phase should have copied a file in the
|
||||
current directory, called `./config.mk'. This file contains
|
||||
definitions of various Make variables used to invoke the compiler
|
||||
and linker during the build. [It has also generated a file called
|
||||
`ftmodule.h' in the objects directory (which is normally
|
||||
`<toplevel>/objs/'); please read the file `docs/CUSTOMIZE' for
|
||||
customization of FreeType.]
|
||||
|
||||
To launch the build, simply invoke GNU Make again: The top
|
||||
Makefile will detect the configuration file and run the build with
|
||||
it. If you have used variables in step 3, you must use the same
|
||||
variables here, too.
|
||||
|
||||
|
||||
Final note
|
||||
|
||||
The above instructions build a _statically_ linked library of the
|
||||
font engine in the `objs' directory. On Windows, you can build a
|
||||
DLL either with MinGW (within an MSYS shell, following the
|
||||
instructions in `INSTALL.UNIX'), or you use one of the Visual C++
|
||||
project files; see the subdirectories of `builds/windows'. For
|
||||
everything else, you are on your own, and you might follow the
|
||||
instructions in `INSTALL.ANY' to create your own Makefiles.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL.GNU ---
|
@ -1,32 +0,0 @@
|
||||
Please follow the instructions in INSTALL.UNIX to install FreeType on
|
||||
Mac OS X.
|
||||
|
||||
Currently FreeType2 functions based on some deprecated Carbon APIs
|
||||
return `FT_Err_Unimplemented_Feature' always, even if FreeType2 is
|
||||
configured and built on the system that deprecated Carbon APIs are
|
||||
available. To enable deprecated FreeType2 functions as far as
|
||||
possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'.
|
||||
|
||||
Starting with Mac OS X 10.5, gcc defaults the deployment target to
|
||||
10.5. In previous versions of Mac OS X, this defaulted to 10.1. If
|
||||
you want your built binaries to run only on 10.5, this change does not
|
||||
concern you. If you want them to also run on older versions of Mac
|
||||
OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET
|
||||
environment variable or pass `-mmacosx-version-min' to gcc. You
|
||||
should specify the oldest version of Mac OS you want the code to run
|
||||
on. For example, if you use Bourne shell:
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.2
|
||||
|
||||
or, if you use C shell:
|
||||
|
||||
setenv MACOSX_DEPLOYMENT_TARGET 10.2
|
||||
|
||||
Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc.
|
||||
|
||||
Here the number 10.2 is the lowest version that the built binaries can
|
||||
run on. In the above cases, the built binaries will run on Mac OS X
|
||||
10.2 and later, but _not_ earlier. If you want to run on earlier, you
|
||||
have to set lower version, e.g., 10.0.
|
||||
|
||||
For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
|
@ -1,139 +0,0 @@
|
||||
This document contains instructions on how to build the FreeType
|
||||
library on Unix systems. This also works for emulations like Cygwin
|
||||
or MSys on Win32:
|
||||
|
||||
|
||||
1. Ensure that you are using GNU Make
|
||||
-------------------------------------
|
||||
|
||||
The FreeType build system _exclusively_ works with GNU Make. You
|
||||
will not be able to compile the library with the instructions
|
||||
below using any other alternative (including BSD Make).
|
||||
|
||||
Check that you have GNU make by running the command:
|
||||
|
||||
make -v
|
||||
|
||||
This should dump some text that begins with:
|
||||
|
||||
GNU Make <version number>
|
||||
Copyright (C) <year> Free Software Foundation Inc.
|
||||
|
||||
Note that version 3.81 or higher is *required* or the build will
|
||||
fail.
|
||||
|
||||
It is also fine to have GNU Make under another name (e.g. 'gmake')
|
||||
if you use the MAKE variable as described below.
|
||||
|
||||
As a special exception, 'makepp' can also be used to build
|
||||
FreeType 2. See the file docs/MAKEPP for details.
|
||||
|
||||
For builds with `cmake' please check file `CMakeLists.txt'; this
|
||||
is a contributed file not directly supported by the FreeType team.
|
||||
|
||||
|
||||
2. Regenerate the configure script if needed
|
||||
--------------------------------------------
|
||||
|
||||
This only applies if you are building a git snapshot or checkout,
|
||||
*not* if you grabbed the sources of an official release.
|
||||
|
||||
You need to invoke the `autogen.sh' script in the top-level
|
||||
directory in order to create the `configure' script for your
|
||||
platform. Normally, this simply means typing:
|
||||
|
||||
sh autogen.sh
|
||||
|
||||
In case of problems, you may need to install or upgrade Automake,
|
||||
Autoconf or Libtool. See `README.git' in the top-level directory
|
||||
for more information.
|
||||
|
||||
|
||||
3. Build and install the library
|
||||
--------------------------------
|
||||
|
||||
Say
|
||||
|
||||
./configure --help
|
||||
|
||||
to see the list of possible configuration options and important
|
||||
environment variables. The ./configure script will detect some
|
||||
prerequisite system libraries (libpng, brotli, etc.) if their
|
||||
headers are available at the default locations.
|
||||
|
||||
The following should work on all Unix systems where the `make'
|
||||
command invokes GNU Make:
|
||||
|
||||
./configure [options]
|
||||
make
|
||||
make install (as root)
|
||||
|
||||
The default installation path is `/usr/local'. It can be changed
|
||||
with the `--prefix=<path>' option. Example:
|
||||
|
||||
./configure --prefix=/usr
|
||||
|
||||
When using a different command to invoke GNU Make, use the MAKE
|
||||
variable. For example, if `gmake' is the command to use on your
|
||||
system, do something like:
|
||||
|
||||
MAKE=gmake ./configure [options]
|
||||
gmake
|
||||
gmake install (as root)
|
||||
|
||||
If this still doesn't work, there must be a problem with your
|
||||
system (e.g., you are using a very old version of GNU Make).
|
||||
|
||||
For library identification, FreeType's `configure' script uses the
|
||||
`pkg-config' interface: Assuming it needs library `foo', it calls
|
||||
the `pkg-config' program to find information on library `foo',
|
||||
which in turn looks for a `foo.pc' file installed at the system.
|
||||
Some platforms, however, don't come with `pkg-support'; you then
|
||||
have to use environment variables as described by `configure
|
||||
--help'. Example:
|
||||
|
||||
LIBPNG_CFLAGS="-I/path/to/libpng/include/directory" \
|
||||
LIBPNG_LIBS="-L/path/to/libpng/lib/directory" \
|
||||
configure ...
|
||||
|
||||
It is possible to compile FreeType in a different directory.
|
||||
Assuming the FreeType source files in directory `/src/freetype' a
|
||||
compilation in directory `foo' works as follows:
|
||||
|
||||
cd foo
|
||||
/src/freetype/configure [options]
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
3.1 Interdependency with HarfBuzz
|
||||
.................................
|
||||
|
||||
Note that there is a chicken-and-egg problem currently since the
|
||||
HarfBuzz library (used by the auto-hinter to improve support of
|
||||
OpenType fonts) depends on FreeType, which can be solved as
|
||||
follows in case HarfBuzz is not yet installed on your system.
|
||||
|
||||
1. Call FreeType's `configure' script with option
|
||||
`--without-harfbuzz', then compile and install FreeType.
|
||||
|
||||
2. Compile and install HarfBuzz.
|
||||
|
||||
3. Call FreeType's `configure' script without option
|
||||
`--without-harfbuzz' (after executing `make distclean'), then
|
||||
compile and install FreeType again.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL.UNIX ---
|
164
docs/INSTALL.md
Normal file
164
docs/INSTALL.md
Normal file
@ -0,0 +1,164 @@
|
||||
# Building FreeType
|
||||
|
||||
There are several ways to build the FreeType library, depending on
|
||||
your system and the level of customization you need. Here is a short
|
||||
overview of the documentation available:
|
||||
|
||||
|
||||
## A. Prerequisites and dependencies
|
||||
|
||||
FreeType is a low level C library that only depends on the standard
|
||||
C library with very few platform-dependent optimizations utilized at
|
||||
build time. Any C99-compliant compiler should be able to compile
|
||||
FreeType. System libraries, such as zlib, Gzip, bzip2, Brotli,
|
||||
and libpng, might be used to handle compressed fonts or decode
|
||||
embedded PNG glyphs.
|
||||
|
||||
FreeType auto-configuration scripts should be able to detect the
|
||||
prerequisites if the necessary headers are available at the default
|
||||
locations. Otherwise, modify `include/freetype/config/ftoption.h`
|
||||
to control how the FreeType library gets built. Normally, you don't
|
||||
need to change anything.
|
||||
|
||||
Applications have very limited control over FreeType's behaviour at
|
||||
run-time; look at the documentation of function `FT_Property_Set`.
|
||||
|
||||
|
||||
## B. Normal installation and upgrades
|
||||
|
||||
1. Unix and Unix-like systems
|
||||
|
||||
This also includes MacOS, Cygwin, MinGW + MSYS, Mingw-w64 + MSYS2,
|
||||
and possibly other, similar environments.
|
||||
|
||||
Please read [INSTALL.UNIX] to install or upgrade FreeType 2 on a
|
||||
Unix system. Note that you *need* GNU Make for automatic
|
||||
compilation, since other make tools won't work (this includes BSD
|
||||
Make).
|
||||
|
||||
**GNU Make VERSION 3.81 OR NEWER IS NEEDED!**
|
||||
|
||||
2. Other systems using GNU Make
|
||||
|
||||
On some non-Unix platforms, it is possible to build the library
|
||||
using only the GNU Make utility. Note that *NO OTHER MAKE TOOL
|
||||
WILL WORK*[1]! This methods supports several compilers on
|
||||
Windows, OS/2, and BeOS, including MinGW* (without MSYS*), Visual
|
||||
C++, Borland C++, and more.
|
||||
|
||||
Instructions are provided in the file [INSTALL.GNU].
|
||||
|
||||
3. Other build tools and platforms.
|
||||
|
||||
A few other tools can be used to build FreeType. You can find
|
||||
the corresponding instruction files in the FreeType root folder
|
||||
or the builds/ sub-folder.
|
||||
|
||||
| Build Tool | Details |
|
||||
|------------|-------------------------------------------|
|
||||
| CMake | see [CMakeLists.txt] for more information |
|
||||
| Meson | see [meson.build] for more information |
|
||||
| MSBuild | see [freetype.vcxproj] |
|
||||
| MMS | see [vms_make.com] and [INSTALL.VMS] |
|
||||
|
||||
4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
|
||||
|
||||
We provide a small number of 'project files' for various IDEs to
|
||||
automatically build the library as well. Note that these files
|
||||
are not actively supported by FreeType developers, they can break
|
||||
or become obsolete.
|
||||
|
||||
To find them, have a look at the content of the `builds/<system>`
|
||||
directory, where <system> stands for your OS or environment.
|
||||
|
||||
5. From you own IDE, or own Makefiles
|
||||
|
||||
If you want to create your own project file, follow the
|
||||
instructions given in the [INSTALL.ANY] document of this
|
||||
directory.
|
||||
|
||||
|
||||
## C. Custom builds of the library
|
||||
|
||||
Customizing the compilation of FreeType is easy, and allows you to
|
||||
select only the components of the font engine that you really need.
|
||||
For more details read the file [docs/CUSTOMIZE][CUSTOMIZE].
|
||||
|
||||
|
||||
## D. Standard builds with `configure`
|
||||
|
||||
The git repository doesn't contain pre-built configuration scripts for
|
||||
UNIXish platforms. To generate them say
|
||||
|
||||
sh autogen.sh
|
||||
|
||||
which in turn depends on the following packages:
|
||||
|
||||
automake (1.10.1)
|
||||
libtool (2.2.4)
|
||||
autoconf (2.62)
|
||||
|
||||
The versions given in parentheses are known to work. Newer versions
|
||||
should work too, of course. Note that `autogen.sh` also sets up
|
||||
proper file permissions for the `configure` and auxiliary scripts.
|
||||
|
||||
The `autogen.sh` script checks whether the versions of the above three
|
||||
tools match the numbers above. Otherwise it will complain and suggest
|
||||
either upgrading or using environment variables to point to more
|
||||
recent versions of the required tools.
|
||||
|
||||
Note that `aclocal` is provided by the 'automake' package on Linux,
|
||||
and that `libtoolize` is called `glibtoolize` on Darwin (OS X).
|
||||
|
||||
|
||||
## E. Alternative build methods
|
||||
|
||||
For static builds that don't use platform-specific optimizations, no
|
||||
configure script is necessary at all; saying
|
||||
|
||||
make setup ansi
|
||||
make
|
||||
|
||||
should work on all platforms that have GNU `make` (or `makepp`).
|
||||
|
||||
A build with `cmake` or `meson` can be done directly from the git
|
||||
repository. However, if you want to use the `FT_DEBUG_LOGGING` macro
|
||||
(see file [docs/DEBUG][DEBUG] for more information) it is currently mandatory
|
||||
to execute `autogen.sh` in advance; this script clones the 'dlg' git
|
||||
submodule and copies some files into FreeType's source tree.
|
||||
|
||||
|
||||
---
|
||||
|
||||
[1] make++, a make tool written in Perl, has sufficient support of GNU
|
||||
make extensions to build FreeType. See
|
||||
|
||||
https://makepp.sourceforge.net
|
||||
|
||||
for more information; you need version 2.0 or newer, and you must
|
||||
pass option `--norc-substitution`.
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2000-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
<!--------------------------------------------------------------------------->
|
||||
|
||||
[CMakeLists.txt]: ../CMakeLists.txt
|
||||
[meson.build]: ../meson.build
|
||||
[freetype.vcxproj]: ../builds/windows/vc2010/freetype.vcxproj
|
||||
[vms_make.com]: ../vms_make.com
|
||||
[INSTALL.VMS]: ./INSTALL.VMS
|
||||
[INSTALL.ANY]: ./INSTALL.ANY
|
||||
[INSTALL.GNU]: ./INSTALL.GNU
|
||||
[INSTALL.UNIX]: ./INSTALL.UNIX
|
||||
[CUSTOMIZE]: ./CUSTOMIZE
|
||||
[DEBUG]: ./DEBUG
|
85
docs/INSTALL_ANDROID.md
Normal file
85
docs/INSTALL_ANDROID.md
Normal file
@ -0,0 +1,85 @@
|
||||
# Compiling FreeType on Android using Termux
|
||||
|
||||
If you want to test FreeType on arm devices, compiling it on an Android
|
||||
phone is one of the easiest ways.
|
||||
|
||||
## 1. Compiling FreeType
|
||||
|
||||
1. Install and open termux
|
||||
|
||||
2. Update termux packages using:
|
||||
|
||||
```bash
|
||||
pkg update
|
||||
pkg upgrade
|
||||
```
|
||||
Select `y` if any configuration changes are asked
|
||||
|
||||
3. Install `git`:
|
||||
|
||||
```bash
|
||||
pkg install git
|
||||
```
|
||||
4. Install packages required for compilation:
|
||||
|
||||
```bash
|
||||
pkg install automake autoconf libtool make clang binutils
|
||||
```
|
||||
|
||||
5. Clone FreeType's git repository:
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype.git
|
||||
```
|
||||
|
||||
6. Enter into the source directory:
|
||||
|
||||
```
|
||||
cd freetype/
|
||||
```
|
||||
|
||||
7. Now you can compile FreeType according to [INSTALL_UNIX.md]:
|
||||
|
||||
```bash
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j$(nproc)
|
||||
```
|
||||
The compiled binaries can be accessed under `objs/.libs`
|
||||
|
||||
## 2. Compiling FreeType Demo programs
|
||||
If you need to test your changes you may want to use ft-demo
|
||||
programs. They can be compiled and run by follwing these steps:
|
||||
|
||||
1. First compile FreeType using the steps above.
|
||||
|
||||
2. Clone FreeType demos adjacent to the `freetype/` directory:
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git
|
||||
```
|
||||
i.e. If you can access FreeType repo under `~/freetype`, you should
|
||||
be able to access `~/freetype-demos`.
|
||||
|
||||
3. Enter into the ft-demos directory:
|
||||
|
||||
```bash
|
||||
cd freetype-demos
|
||||
```
|
||||
|
||||
4. Compile the programs:
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
5. The compiled binaries can be accessed and executed under `bin/` like:
|
||||
|
||||
```bash
|
||||
cd bin
|
||||
./ftlint
|
||||
```
|
||||
|
||||
<!---->
|
||||
|
||||
[INSTALL_UNIX.md]: ./INSTALL_UNIX.md
|
154
docs/INSTALL_ANY.md
Normal file
154
docs/INSTALL_ANY.md
Normal file
@ -0,0 +1,154 @@
|
||||
# Instructions on how to build FreeType with your own build tool
|
||||
|
||||
See the file [docs/CUSTOMIZE][CUSTOMIZE] to learn how to
|
||||
customize FreeType to specific environments.
|
||||
|
||||
|
||||
## A. Standard procedure
|
||||
|
||||
If you use macro names for FreeType header files (while mandatory
|
||||
in earlier versions, this is now optional since FreeType version
|
||||
2.6.1) it is necessary to disable pre-compiled headers. This is
|
||||
very important for Visual C++, because lines like
|
||||
|
||||
```C
|
||||
#include FT_FREETYPE_H
|
||||
```
|
||||
are not correctly supported by this compiler while being ISO C
|
||||
compliant!
|
||||
|
||||
You need to add the directory `include` to your include path when
|
||||
compiling the library.
|
||||
|
||||
FreeType 2 is made of several components; each of them is located
|
||||
in a subdirectory of `freetype/src`. For example,
|
||||
`freetype/src/truetype/` contains the TrueType font driver.
|
||||
|
||||
## DO NOT COMPILE ALL C FILES! Rather, compile the following ones.
|
||||
|
||||
### base components (required):
|
||||
|
||||
src/base/ftsystem.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftdebug.c
|
||||
|
||||
src/base/ftbase.c
|
||||
|
||||
src/base/ftbbox.c -- recommended, see <ftbbox.h>
|
||||
src/base/ftglyph.c -- recommended, see <ftglyph.h>
|
||||
|
||||
src/base/ftbdf.c -- optional, see <ftbdf.h>
|
||||
src/base/ftbitmap.c -- optional, see <ftbitmap.h>
|
||||
src/base/ftcid.c -- optional, see <ftcid.h>
|
||||
src/base/ftfstype.c -- optional
|
||||
src/base/ftgasp.c -- optional, see <ftgasp.h>
|
||||
src/base/ftgxval.c -- optional, see <ftgxval.h>
|
||||
src/base/ftmm.c -- optional, see <ftmm.h>
|
||||
src/base/ftotval.c -- optional, see <ftotval.h>
|
||||
src/base/ftpatent.c -- optional
|
||||
src/base/ftpfr.c -- optional, see <ftpfr.h>
|
||||
src/base/ftstroke.c -- optional, see <ftstroke.h>
|
||||
src/base/ftsynth.c -- optional, see <ftsynth.h>
|
||||
src/base/fttype1.c -- optional, see <t1tables.h>
|
||||
src/base/ftwinfnt.c -- optional, see <ftwinfnt.h>
|
||||
|
||||
src/base/ftmac.c -- only on the Macintosh
|
||||
|
||||
### font drivers (optional; at least one is needed)
|
||||
|
||||
src/bdf/bdf.c -- BDF font driver
|
||||
src/cff/cff.c -- CFF/OpenType font driver
|
||||
src/cid/type1cid.c -- Type 1 CID-keyed font driver
|
||||
src/pcf/pcf.c -- PCF font driver
|
||||
src/pfr/pfr.c -- PFR/TrueDoc font driver
|
||||
src/sfnt/sfnt.c -- SFNT files support
|
||||
(TrueType & OpenType)
|
||||
src/truetype/truetype.c -- TrueType font driver
|
||||
src/type1/type1.c -- Type 1 font driver
|
||||
src/type42/type42.c -- Type 42 font driver
|
||||
src/winfonts/winfnt.c -- Windows FONT / FNT font driver
|
||||
|
||||
### rasterizers (optional; at least one is needed for vector formats)
|
||||
|
||||
src/raster/raster.c -- monochrome rasterizer
|
||||
src/sdf/sdf.c -- Signed Distance Field driver
|
||||
src/smooth/smooth.c -- anti-aliasing rasterizer
|
||||
|
||||
### auxiliary modules (optional)
|
||||
|
||||
src/autofit/autofit.c -- auto hinting module
|
||||
src/cache/ftcache.c -- cache sub-system (in beta)
|
||||
src/gzip/ftgzip.c -- support for compressed fonts (.gz)
|
||||
src/lzw/ftlzw.c -- support for compressed fonts (.Z)
|
||||
src/bzip2/ftbzip2.c -- support for compressed fonts (.bz2)
|
||||
src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation
|
||||
src/otvalid/otvalid.c -- OpenType table validation
|
||||
src/psaux/psaux.c -- PostScript Type 1 parsing
|
||||
src/pshinter/pshinter.c -- PS hinting module
|
||||
src/psnames/psnames.c -- PostScript glyph names support
|
||||
|
||||
|
||||
## Notes:
|
||||
|
||||
`ftcache.c` needs `ftglyph.c`
|
||||
`ftfstype.c` needs `fttype1.c`
|
||||
`ftglyph.c` needs `ftbitmap.c`
|
||||
`ftstroke.c` needs `ftglyph.c`
|
||||
`ftsynth.c` needs `ftbitmap.c`
|
||||
|
||||
`cff.c` needs `sfnt.c`, `pshinter.c`, and `psnames.c`
|
||||
`truetype.c` needs `sfnt.c` and `psnames.c`
|
||||
`type1.c` needs `psaux.c` `pshinter.c`, and `psnames.c`
|
||||
`type1cid.c` needs `psaux.c`, `pshinter.c`, and `psnames.c`
|
||||
`type42.c` needs `truetype.c`
|
||||
|
||||
Please consult the central `include/freetype/config/ftoption.h`
|
||||
configuration file for details on additional libraries necessary
|
||||
for some optional features.
|
||||
|
||||
Read the file `CUSTOMIZE` in case you want to compile only a subset
|
||||
of the drivers, renderers, and optional modules; a detailed
|
||||
description of the various base extension is given in the top-level
|
||||
file `modules.cfg`.
|
||||
|
||||
You are done. In case of problems, see the archives of the FreeType
|
||||
development mailing list.
|
||||
|
||||
|
||||
## B. Support for flat-directory compilation
|
||||
|
||||
It is possible to put all FreeType 2 source files into a single
|
||||
directory, with the *exception* of the `include` hierarchy.
|
||||
|
||||
Copy all files in current directory
|
||||
|
||||
cp freetype/src/base/*.[hc] .
|
||||
cp freetype/src/raster1/*.[hc] .
|
||||
cp freetype/src/smooth/*.[hc] .
|
||||
etc.
|
||||
|
||||
Compile sources
|
||||
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c
|
||||
cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c
|
||||
etc.
|
||||
|
||||
You don't need to define the FT_FLAT_COMPILATION macro (as this
|
||||
was required in previous releases of FreeType 2).
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
<!---->
|
||||
[CUSTOMIZE]: ./CUSTOMIZE
|
182
docs/INSTALL_CROSS.md
Normal file
182
docs/INSTALL_CROSS.md
Normal file
@ -0,0 +1,182 @@
|
||||
# Cross-Compiling FreeType
|
||||
|
||||
This document contains instructions on how to cross-build the FreeType
|
||||
library on Unix systems, for example, building binaries for Linux/MIPS
|
||||
on FreeBSD/i386. Before reading this document, please consult the
|
||||
file [INSTALL_UNIX.md] for required tools and the basic self-building
|
||||
procedure.
|
||||
|
||||
|
||||
## 1. Required Tools
|
||||
|
||||
For self-building the FreeType library on a Unix system, GNU Make
|
||||
3.81 or newer is required. [INSTALL_UNIX.md contains hints how to
|
||||
check the installed `make`.
|
||||
|
||||
The GNU C compiler to cross-build the target system is required.
|
||||
Currently, using a non-GNU cross compiler is untested. The cross
|
||||
compiler is expected to be installed with a system prefix. For
|
||||
example, if your building system is FreeBSD/i386 and the target
|
||||
system is Linux/MIPS, the cross compiler should be installed with
|
||||
the name `mips-ip22-linuxelf-gcc`.
|
||||
|
||||
A C compiler for a self-build is required also, to build a tool
|
||||
(`apinames`) that is executed during the build procedure. Non-GNU
|
||||
self compilers are acceptable, but such a setup is untested.
|
||||
|
||||
|
||||
## 2. Configuration
|
||||
|
||||
### 2.1 Building and target system
|
||||
|
||||
To configure a cross-build, the options `--host=<system>` and
|
||||
`--build=<system>` must be passed to the `configure` script.
|
||||
For example, if your build system is FreeBSD/i386 and the target
|
||||
system is Linux/MIPS, say
|
||||
|
||||
```bash
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
[other options]
|
||||
```
|
||||
|
||||
It should be noted that `--host=<system>` specifies the system
|
||||
where the built binaries will be executed, not the system where
|
||||
the build actually happens. Older versions of GNU autoconf use
|
||||
the option pair `--host=` and `--target=`. This is broken and
|
||||
doesn't work. Similarly, an explicit CC specification like
|
||||
|
||||
```bash
|
||||
env CC=mips-ip22-linux-gcc ./configure # BAD
|
||||
```
|
||||
or
|
||||
|
||||
```bash
|
||||
env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure # BAD
|
||||
```
|
||||
|
||||
doesn't work either; such a configuration confuses the
|
||||
`configure` script while trying to find the cross and native C
|
||||
compilers.
|
||||
|
||||
|
||||
### 2.2. The prefix to install FreeType2
|
||||
|
||||
Setting `--prefix=<prefix>` properly is important. The prefix
|
||||
to install FreeType2 is written into the `freetype-config`
|
||||
script and `freetype2.pc` configuration file.
|
||||
|
||||
If the built FreeType 2 library is used as a part of the
|
||||
cross-building system, the prefix is expected to be different
|
||||
from the self-building system. For example, a configuration
|
||||
with `--prefix=/usr/local` installs binaries into the
|
||||
system-wide `/usr/local` directory, which then can't be executed
|
||||
due to the incorrect architecture. This causes confusion in
|
||||
configuration of all applications that use FreeType2. Instead,
|
||||
use a prefix to install the cross-build into a separate system
|
||||
tree, for example, `--prefix=/usr/local/mips-ip22-linux/`.
|
||||
|
||||
On the other hand, if the built FreeType 2 library is used as a
|
||||
part of the target system, the prefix to install should reflect
|
||||
the file system structure of the target system.
|
||||
|
||||
|
||||
### 2.3. Library dependencies
|
||||
|
||||
FreeType normally depends on external libraries like `libpng` or
|
||||
`libharfbuzz`. The easiest case is to deactivate all such
|
||||
dependencies using the `--without-XXX` configuration options.
|
||||
However, if you want to use those libraries, you should ensure
|
||||
that they are available both on the target system and as
|
||||
(cross-compiled) libraries on the build system.
|
||||
|
||||
FreeType uses `pkg-config` to find most of the libraries; the
|
||||
other libraries it links to are expected in the standard system
|
||||
directories. Since the default pkg-config's meta-information
|
||||
files (like `harfbuzz.pc`) of the build platform don't work, use
|
||||
one of the two possible solutions below.
|
||||
|
||||
- Use pkg-config's meta-information files that are adjusted to
|
||||
cross-compile and cross-link with the target platform's
|
||||
libraries. Make sure those files are found before the build
|
||||
system's default files. Example:
|
||||
```bash
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \
|
||||
[other options]
|
||||
```
|
||||
|
||||
See the manpage of `pkg-config` for more details.
|
||||
|
||||
- Set variables like LIBPNG_LIBS as additional options to the
|
||||
`configure` script, overriding the values `pkg-config` would
|
||||
provide. `configure --help` shows the available environment
|
||||
variables. Example:
|
||||
```bash
|
||||
./configure \
|
||||
--build=i386-unknown-freebsd \
|
||||
--host=mips-ip22-linuxelf \
|
||||
LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \
|
||||
LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \
|
||||
[other options]
|
||||
```
|
||||
|
||||
|
||||
## 3. Building command
|
||||
|
||||
If the configuration finishes successfully, invoking GNU make
|
||||
builds FreeType2. Just say
|
||||
|
||||
make
|
||||
|
||||
or
|
||||
|
||||
gmake
|
||||
|
||||
depending on the name the GNU make binary actually has.
|
||||
|
||||
|
||||
## 4. Installation
|
||||
|
||||
Saying
|
||||
|
||||
make install
|
||||
|
||||
as usual to install FreeType2 into the directory tree specified by
|
||||
the argument of the `--prefix` option.
|
||||
|
||||
As noted in section 2.2, FreeType2 is sometimes configured to be
|
||||
installed into the system directory of the target system, and
|
||||
should not be installed in the cross-building system. In such
|
||||
cases, the make variable `DESTDIR` is useful to change the root
|
||||
directory in the installation. For example, after
|
||||
|
||||
```bash
|
||||
make DESTDIR=/mnt/target_system_root/ install
|
||||
```
|
||||
|
||||
the built FreeType2 library files are installed into the directory
|
||||
`/mnt/target_system_root/<prefix_in_configure>/lib`.
|
||||
|
||||
|
||||
## 5. TODO
|
||||
|
||||
Cross building between Cygwin (or MSys) and Unix must be tested.
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2006-2023 by
|
||||
suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
<!---->
|
||||
[INSTALL_UNIX.md]: ./INSTALL_UNIX.md
|
174
docs/INSTALL_GNU.md
Normal file
174
docs/INSTALL_GNU.md
Normal file
@ -0,0 +1,174 @@
|
||||
# Compiling FreeType with GNU Make
|
||||
|
||||
This document contains instructions how to build the FreeType library
|
||||
on non-Unix systems with the help of GNU Make. Note that if you are
|
||||
running Cygwin or MinGW/MSYS in Windows, you should follow the
|
||||
instructions in the file [INSTALL_UNIX.md] instead.
|
||||
|
||||
|
||||
FreeType 2 includes a powerful and flexible build system that allows
|
||||
you to easily compile it on a great variety of platforms from the
|
||||
command line. To do so, just follow these simple instructions.
|
||||
|
||||
## 1. Install GNU Make
|
||||
|
||||
The FreeType 2 build system relies on many features special to GNU
|
||||
Make.
|
||||
|
||||
NEARLY ALL OTHER MAKE TOOLS FAIL, INCLUDING `BSD MAKE`, SO REALLY
|
||||
INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
|
||||
|
||||
Note that make++, a make tool written in Perl, supports enough
|
||||
features of GNU make to compile FreeType. See
|
||||
|
||||
>https://makepp.sourceforge.net
|
||||
|
||||
for more information; you need version 2.0 or newer, and you must
|
||||
pass option `--norc-substitution`.
|
||||
|
||||
Make sure that you are invoking GNU Make from the command line, by
|
||||
typing something like:
|
||||
|
||||
make -v
|
||||
|
||||
to display its version number.
|
||||
|
||||
VERSION 3.81 OR NEWER IS NEEDED!
|
||||
|
||||
|
||||
## 2. Invoke `make`
|
||||
|
||||
Go to the root directory of FreeType 2, then simply invoke GNU
|
||||
Make from the command line. This will launch the FreeType 2 host
|
||||
platform detection routines. A summary will be displayed, for
|
||||
example, on Win32.
|
||||
|
||||
FreeType build system -- automatic system detection
|
||||
|
||||
The following settings are used:
|
||||
|
||||
platform windows
|
||||
compiler gcc
|
||||
configuration directory .\builds\windows
|
||||
configuration rules .\builds\windows\w32-gcc.mk
|
||||
|
||||
If this does not correspond to your system or settings please
|
||||
remove the file 'config.mk' from this directory then read the
|
||||
INSTALL file for help.
|
||||
|
||||
Otherwise, simply type 'make' again to build the library
|
||||
or 'make refdoc' to build the API reference (the latter needs
|
||||
Python >= 3.5).
|
||||
|
||||
|
||||
If the detected settings correspond to your platform and compiler,
|
||||
skip to step 5. Note that if your platform is completely alien to
|
||||
the build system, the detected platform will be `ansi`.
|
||||
|
||||
|
||||
## 3. Configure the build system for a different compiler
|
||||
|
||||
If the build system correctly detected your platform, but you want
|
||||
to use a different compiler than the one specified in the summary
|
||||
(for most platforms, gcc is the default compiler), invoke GNU Make
|
||||
with
|
||||
|
||||
make setup <compiler>
|
||||
|
||||
Examples:
|
||||
|
||||
to use Visual C++ on Win32, type: `make setup visualc`
|
||||
to use Borland C++ on Win32, type `make setup bcc32`
|
||||
to use Watcom C++ on Win32, type `make setup watcom`
|
||||
to use Intel C++ on Win32, type `make setup intelc`
|
||||
to use LCC-Win32 on Win32, type: `make setup lcc`
|
||||
to use Watcom C++ on OS/2, type `make setup watcom`
|
||||
to use VisualAge C++ on OS/2, type `make setup visualage`
|
||||
|
||||
|
||||
The `<compiler>` name to use is platform-dependent. The list of
|
||||
available compilers for your system is available in the file
|
||||
`builds/<system>/detect.mk`.
|
||||
|
||||
If you are satisfied by the new configuration summary, skip to
|
||||
step 5.
|
||||
|
||||
### 3a. Use clang instead of gcc
|
||||
|
||||
The `clang` compiler can use FreeType's setup for `gcc`; it is
|
||||
sufficient to set the `CC` variable, for example
|
||||
|
||||
make CC=clang
|
||||
|
||||
### 3b. Compiling with a C++ compiler
|
||||
|
||||
FreeType can be built with a C++ compiler, for example
|
||||
|
||||
make CC="g++"
|
||||
|
||||
If `clang++` should be used it is necessary to also override the
|
||||
`ANSIFLAGS` variable:
|
||||
|
||||
make CC="clang++" ANSIFLAGS=""
|
||||
|
||||
|
||||
## 4. Configure the build system for an unknown platform/compiler
|
||||
|
||||
The auto-detection/setup phase of the build system copies a file
|
||||
to the current directory under the name `config.mk`.
|
||||
|
||||
For example, on OS/2+gcc, it would simply copy
|
||||
`builds/os2/os2-gcc.mk` to `./config.mk`.
|
||||
|
||||
If for some reason your platform isn't correctly detected, copy
|
||||
manually the configuration sub-makefile to `./config.mk` and go to
|
||||
step 5.
|
||||
|
||||
Note that this file is a sub-Makefile used to specify Make
|
||||
variables for compiler and linker invocation during the build.
|
||||
You can easily create your own version from one of the existing
|
||||
configuration files, then copy it to the current directory under
|
||||
the name `./config.mk`.
|
||||
|
||||
|
||||
## 5. Build the library
|
||||
|
||||
The auto-detection/setup phase should have copied a file in the
|
||||
current directory, called `./config.mk`. This file contains
|
||||
definitions of various Make variables used to invoke the compiler
|
||||
and linker during the build. [It has also generated a file called
|
||||
`ftmodule.h` in the objects directory (which is normally
|
||||
`<toplevel>/objs/`); please read the file [docs/CUSTOMIZE][CUSTOMIZE]
|
||||
for customization of FreeType.]
|
||||
|
||||
To launch the build, simply invoke GNU Make again: The top
|
||||
Makefile will detect the configuration file and run the build with
|
||||
it. If you have used variables in step 3, you must use the same
|
||||
variables here, too.
|
||||
|
||||
|
||||
Final note
|
||||
|
||||
The above instructions build a _statically_ linked library of the
|
||||
font engine in the `objs` directory. On Windows, you can build a
|
||||
DLL either with MinGW (within an MSYS shell, following the
|
||||
instructions in `INSTALL.UNIX`), or you use one of the Visual C++
|
||||
project files; see the subdirectories of `builds/windows`. For
|
||||
everything else, you are on your own, and you might follow the
|
||||
instructions in `INSTALL.ANY` to create your own Makefiles.
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
<!---->
|
||||
[INSTALL_UNIX.md]: ./INSTALL_UNIX.md
|
||||
[CUSTOMIZE]: ./CUSTOMIZE
|
50
docs/INSTALL_MAC.md
Normal file
50
docs/INSTALL_MAC.md
Normal file
@ -0,0 +1,50 @@
|
||||
# Compiling FreeType on Mac OS X
|
||||
|
||||
Please follow the instructions in INSTALL.UNIX to install FreeType on
|
||||
Mac OS X.
|
||||
|
||||
Currently FreeType2 functions based on some deprecated Carbon APIs
|
||||
return `FT_Err_Unimplemented_Feature` always, even if FreeType2 is
|
||||
configured and built on the system that deprecated Carbon APIs are
|
||||
available. To enable deprecated FreeType2 functions as far as
|
||||
possible, replace `src/base/ftmac.` by `builds/mac/ftmac.c`.
|
||||
|
||||
Starting with Mac OS X 10.5, gcc defaults the deployment target to
|
||||
10.5. In previous versions of Mac OS X, this defaulted to 10.1. If
|
||||
you want your built binaries to run only on 10.5, this change does not
|
||||
concern you. If you want them to also run on older versions of Mac
|
||||
OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET
|
||||
environment variable or pass `-mmacosx-version-min` to gcc. You
|
||||
should specify the oldest version of Mac OS you want the code to run
|
||||
on. For example, if you use Bourne shell:
|
||||
|
||||
```bash
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.2
|
||||
```
|
||||
|
||||
or, if you use C shell:
|
||||
|
||||
```bash
|
||||
setenv MACOSX_DEPLOYMENT_TARGET 10.2
|
||||
```
|
||||
|
||||
Alternatively, you could pass `-mmacosx-version-min=10.2` to gcc.
|
||||
|
||||
Here the number 10.2 is the lowest version that the built binaries can
|
||||
run on. In the above cases, the built binaries will run on Mac OS X
|
||||
10.2 and later, but _not_ earlier. If you want to run on earlier, you
|
||||
have to set lower version, e.g., 10.0.
|
||||
|
||||
For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
146
docs/INSTALL_UNIX.md
Normal file
146
docs/INSTALL_UNIX.md
Normal file
@ -0,0 +1,146 @@
|
||||
# Building FreeType on Unix Systems
|
||||
|
||||
This also works for emulations like Cygwin or MSys on Win32:
|
||||
|
||||
|
||||
## 1. Ensure that you are using GNU Make
|
||||
|
||||
The FreeType build system _exclusively_ works with GNU Make. You
|
||||
will not be able to compile the library with the instructions
|
||||
below using any other alternative (including BSD Make).
|
||||
|
||||
Check that you have GNU make by running the command:
|
||||
|
||||
make -v
|
||||
|
||||
This should dump some text that begins with:
|
||||
|
||||
GNU Make <version number>
|
||||
Copyright (C) <year> Free Software Foundation Inc.
|
||||
|
||||
Note that version 3.81 or higher is *required* or the build will
|
||||
fail.
|
||||
|
||||
It is also fine to have GNU Make under another name (e.g. 'gmake')
|
||||
if you use the MAKE variable as described below.
|
||||
|
||||
As a special exception, 'makepp' can also be used to build
|
||||
FreeType 2. See the file `docs/MAKEPP` for details.
|
||||
|
||||
For builds with `cmake` please check file `CMakeLists.txt`; this
|
||||
is a contributed file not directly supported by the FreeType team.
|
||||
|
||||
|
||||
## 2. Regenerate the configure script if needed
|
||||
|
||||
This only applies if you are building a git snapshot or checkout,
|
||||
*not* if you grabbed the sources of an official release.
|
||||
|
||||
You need to invoke the `autogen.sh` script in the top-level
|
||||
directory in order to create the `configure` script for your
|
||||
platform. Normally, this simply means typing:
|
||||
```bash
|
||||
sh autogen.sh
|
||||
```
|
||||
|
||||
In case of problems, you may need to install or upgrade Automake,
|
||||
Autoconf or Libtool. See [INSTALL.md] for more information.
|
||||
|
||||
|
||||
## 3. Build and install the library
|
||||
|
||||
Say
|
||||
```bash
|
||||
./configure --help
|
||||
```
|
||||
|
||||
to see the list of possible configuration options and important
|
||||
environment variables. The `./configure` script will detect some
|
||||
prerequisite system libraries (libpng, brotli, etc.) if their
|
||||
headers are available at the default locations.
|
||||
|
||||
The following should work on all Unix systems where the `make`
|
||||
command invokes GNU Make:
|
||||
|
||||
```bash
|
||||
./configure [options]
|
||||
make
|
||||
make install (as root)
|
||||
```
|
||||
|
||||
The default installation path is `/usr/local`. It can be changed
|
||||
with the `--prefix=<path>` option. Example:
|
||||
|
||||
```bash
|
||||
./configure --prefix=/usr
|
||||
```
|
||||
|
||||
When using a different command to invoke GNU Make, use the MAKE
|
||||
variable. For example, if `gmake` is the command to use on your
|
||||
system, do something like:
|
||||
|
||||
```bash
|
||||
MAKE=gmake ./configure [options]
|
||||
gmake
|
||||
gmake install (as root)
|
||||
```
|
||||
|
||||
If this still doesn't work, there must be a problem with your
|
||||
system (e.g., you are using a very old version of GNU Make).
|
||||
|
||||
For library identification, FreeType's `configure` script uses the
|
||||
`pkg-config` interface: Assuming it needs library `foo`, it calls
|
||||
the `pkg-config` program to find information on library `foo`,
|
||||
which in turn looks for a `foo.pc` file installed at the system.
|
||||
Some platforms, however, don't come with `pkg-support`; you then
|
||||
have to use environment variables as described by `configure
|
||||
--help`. Example:
|
||||
|
||||
```bash
|
||||
LIBPNG_CFLAGS="-I/path/to/libpng/include/directory" \
|
||||
LIBPNG_LIBS="-L/path/to/libpng/lib/directory" \
|
||||
configure ...
|
||||
```
|
||||
|
||||
It is possible to compile FreeType in a different directory.
|
||||
Assuming the FreeType source files in directory `/src/freetype` a
|
||||
compilation in directory `foo` works as follows:
|
||||
|
||||
```bash
|
||||
cd foo
|
||||
/src/freetype/configure [options]
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
|
||||
### 3.1 Interdependency with HarfBuzz
|
||||
|
||||
Note that there is a chicken-and-egg problem currently since the
|
||||
HarfBuzz library (used by the auto-hinter to improve support of
|
||||
OpenType fonts) depends on FreeType, which can be solved as
|
||||
follows in case HarfBuzz is not yet installed on your system.
|
||||
|
||||
1. Call FreeType's `configure` script with option
|
||||
`--without-harfbuzz`, then compile and install FreeType.
|
||||
|
||||
2. Compile and install HarfBuzz.
|
||||
|
||||
3. Call FreeType's `configure` script without option
|
||||
`--without-harfbuzz` (after executing `make distclean`), then
|
||||
compile and install FreeType again.
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2003-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
```
|
||||
|
||||
<!---->
|
||||
[INSTALL.md]: ./INSTALL.md
|
@ -1,17 +1,16 @@
|
||||
How to build the FreeType library on VMS
|
||||
----------------------------------------
|
||||
# How to build the FreeType library on VMS
|
||||
|
||||
It is actually very straightforward to install the FreeType library.
|
||||
Just execute `vms_make.com from` the toplevel directory to build the
|
||||
Just execute `vms_make.com` from the toplevel directory to build the
|
||||
library. This procedure currently accepts the following options:
|
||||
|
||||
* `DEBUG`
|
||||
- `DEBUG`
|
||||
Build the library with debug information and without optimization.
|
||||
|
||||
* `lopts=<value>`
|
||||
- `lopts=<value>`
|
||||
Options to pass to the link command, e.g., `lopts=/traceback`.
|
||||
|
||||
* `ccopt=<value>`
|
||||
- `ccopt=<value>`
|
||||
Options to pass to the C compiler, e.g., `ccopt=/float=ieee`.
|
||||
|
||||
In case you did download the demos, place them in a separate directory
|
||||
@ -20,23 +19,25 @@ same instructions as above for the demos from there. The build
|
||||
process relies on this to figure out the location of the FreeType
|
||||
include files.
|
||||
|
||||
|
||||
To rebuild the sources it is necessary to have MMS/MMK installed on
|
||||
the system.
|
||||
|
||||
The library is available in the directory
|
||||
|
||||
```
|
||||
[.LIB]
|
||||
```
|
||||
|
||||
To compile applications using FreeType you have to define the logical
|
||||
`FREETYPE` pointing to the directory
|
||||
|
||||
```
|
||||
[.INCLUDE.FREETYPE]
|
||||
```
|
||||
|
||||
i.e., if the directory in which this `INSTALL.VMS` file is located is
|
||||
`$disk:[freetype.docs]`, then define the logical with
|
||||
|
||||
```
|
||||
define freetype $disk:[freetype.include.freetype]
|
||||
```
|
||||
|
||||
See http://nchrem.tnw.tudelft.nl/openvms/software2.html#Freetype for
|
||||
the packages FreeType depends on.
|
||||
@ -45,7 +46,6 @@ The latest versions were tested using
|
||||
- VSI C V7.4-002 and DECWindows V1.7-F on OpenVMS Alpha V8.4-2L1
|
||||
- VSI C V7.4-001 and DECWindows V1.7-E on OpenVMS IA64 V8.4-2L3
|
||||
|
||||
|
||||
Any problems can be reported to
|
||||
|
||||
Jouk Jansen <joukj@hrem.nano.tudelft.nl> or
|
||||
@ -54,8 +54,8 @@ Orginal version of the build procedures was created by
|
||||
|
||||
Martin P.J. Zinser <zinser@zinser.no-ip.info>
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
---
|
||||
```
|
||||
Copyright (C) 2000-2023 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
@ -64,6 +64,4 @@ modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute this
|
||||
file you indicate that you have read the license and understand and
|
||||
accept it fully.
|
||||
|
||||
|
||||
--- end of INSTALL.VMS ---
|
||||
```
|
42
docs/MODIFYING.md
Normal file
42
docs/MODIFYING.md
Normal file
@ -0,0 +1,42 @@
|
||||
# Modifying FreeType
|
||||
|
||||
FreeType follows a modular architecture, i.e. all the features are
|
||||
implemented as separate modules. There are separate modules for
|
||||
rasterizers, font parsers, hinting etc. located under the `src/` directory.
|
||||
|
||||
(See https://freetype.org/freetype2/docs/design/design-5.html)
|
||||
|
||||
To add new features you have to either modify the existing modules or
|
||||
add a new module to FreeType.
|
||||
|
||||
## Adding a new module to FreeType
|
||||
|
||||
Suppose we want to add a new module "example" to FreeType:
|
||||
|
||||
1. Create a directory under `src/` having the same name as the module.
|
||||
i.e. `src/example/`
|
||||
|
||||
2. Add source files under src/example having `#define FT_MAKE_OPTION_SINGLE_OBJECT`
|
||||
which includes the other files to create the module.
|
||||
|
||||
(See `src/sdf/sdf.c` for reference)
|
||||
|
||||
3. Add the module to `include/freetype/config/ftmodule.h` according to whether
|
||||
it is a renderer, font driver or another module like:
|
||||
|
||||
```C
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_example_renderer_class )
|
||||
```
|
||||
|
||||
4. Add the module to `modules.cfg` in the toplevel directory:
|
||||
```
|
||||
RASTER_MODULES += example
|
||||
```
|
||||
|
||||
5. Under `src/example` add `module.mk` and `rules.mk` files to enable compilation
|
||||
with `make`. (See `src/smooth/rules.mk` for reference).
|
||||
|
||||
6. Now you can simply compile by using `make` in the toplevel directory and the module
|
||||
should compile.
|
||||
|
||||
You can check out pre-existing modules for reference under `src/`
|
Loading…
Reference in New Issue
Block a user