• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Due to  our use of  `libtool' to generate  and install the  FreeType 2
2libraries on Unix  systems, as well as other historical  events, it is
3generally very difficult  to know precisely which release  of the font
4engine is installed on a given system.
5
6This file tries to explain why and to document ways to properly detect
7FreeType on Unix.
8
9
101. Version and Release numbers
11------------------------------
12
13For each new public release of FreeType 2, there are generally *three*
14distinct `version' numbers to consider:
15
16  * The official FreeType 2 release number, like 2.7.0 or 2.10.2.
17
18  * The  libtool (and  Unix)  specific version  number, like  23.2.17.
19    This is what
20
21      pkg-config freetype2 --modversion
22
23    or
24
25      freetype-config --version
26
27    returns.
28
29  * The platform-specific shared object  number, used for example when
30    the library is installed as `/usr/lib/libfreetype.so.6.17.2'.
31
32The platform-specific number is, unsurprisingly, platform-specific and
33varies with  the operating system  you are using (several  variants of
34Linux, FreeBSD, Solaris, etc.).  You  should thus _never_ use it, even
35for simple tests.
36
37The libtool-specific number  does not equal the release  number but is
38tied to it.
39
40The  release  number  is  available  at  *compile*  time  through  the
41following macros defined in `freetype.h':
42
43  - FREETYPE_MAJOR: major release number
44  - FREETYPE_MINOR: minor release number
45  - FREETYPE_PATCH: patch release number
46
47See below for a small autoconf fragment.
48
49The  release  number  is  also  available  at  *runtime*  through  the
50`FT_Library_Version' API.
51
52
532. History
54----------
55
56The  following  table  gives,  for   all  releases  since  2.5.0,  the
57corresponding  libtool number,  as well  as the  shared object  number
58found on _most_ systems, but not all of them:
59
60
61    release     libtool     so
62  -------------------------------
63     2.12.1     24.3.18   6.18.3
64     2.12.0     24.2.18   6.18.2
65     2.11.1     24.1.18   6.18.1
66     2.11.0     24.0.18   6.18.0
67     2.10.4     23.4.17   6.17.4
68     2.10.3     23.3.17   6.17.3
69     2.10.2     23.2.17   6.17.2
70     2.10.1     23.1.17   6.17.1
71     2.10.0     23.0.17   6.17.0
72     2.9.1      22.1.16   6.16.1
73     2.9.0      22.0.16   6.16.0
74     2.8.1      21.0.15   6.15.0
75     2.8.0      20.0.14   6.14.0
76     2.7.1      19.0.13   6.13.0
77     2.7.0      18.6.12   6.12.6
78     2.6.5      18.5.12   6.12.5
79     2.6.4      18.4.12   6.12.4
80     2.6.3      18.3.12   6.12.3
81     2.6.2      18.2.12   6.12.2
82     2.6.1      18.1.12   6.12.1
83     2.6.0      18.0.12   6.12.0
84     2.5.5      17.4.11   6.11.4
85     2.5.4      17.3.11   6.11.3
86     2.5.3      17.2.11   6.11.2
87     2.5.2      17.1.11   6.11.1
88     2.5.1      17.0.11   6.11.0
89     2.5.0      16.2.10   6.10.2
90
91
923. Autoconf Code Fragment
93-------------------------
94
95Lars  Clausen contributed  the  following autoconf  fragment to  check
96which version of FreeType is installed on a system (now updated to use
97`pkg-config'  instead of  `freetype-config').   This one  tests for  a
98version that is at least 2.10.2; you should change it to check against
99other release numbers.
100
101
102  AC_MSG_CHECKING([whether FreeType version is 2.10.2 or higher])
103  old_CPPFLAGS="$CPPFLAGS"
104  CPPFLAGS=`pkg-config freetype2 --cflags`
105  AC_TRY_CPP([
106
107#include <ft2build.h>
108#include <freetype/freetype.h>
109
110#if FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH < 21002
111#  error FreeType version too low.
112#endif
113
114  ],
115  [AC_MSG_RESULT(yes)
116   FREETYPE_LIBS=`pkg-config freetype2 --libs`
117   AC_SUBST(FREETYPE_LIBS)
118   AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
119   CPPFLAGS="$old_CPPFLAGS"],
120  [AC_MSG_ERROR([Need FreeType library version 2.10.2 or higher])])
121
122----------------------------------------------------------------------
123
124Copyright (C) 2002-2022 by
125David Turner, Robert Wilhelm, and Werner Lemberg.
126
127This  file is  part of  the FreeType  project, and  may only  be used,
128modified,  and distributed  under the  terms of  the FreeType  project
129license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
130this file you  indicate that you have read the  license and understand
131and accept it fully.
132
133
134--- end of VERSIONS.TXT ---
135