xref: /aosp_15_r20/external/freetype/docs/VERSIONS.TXT (revision 63949dbd25bcc50c4e1178497ff9e9574d44fc5a)
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.13.2     26.1.20   6.20.1
64     2.13.1     26.0.20   6.20.0
65     2.13.0     25.0.19   6.19.0
66     2.12.1     24.3.18   6.18.3
67     2.12.0     24.2.18   6.18.2
68     2.11.1     24.1.18   6.18.1
69     2.11.0     24.0.18   6.18.0
70     2.10.4     23.4.17   6.17.4
71     2.10.3     23.3.17   6.17.3
72     2.10.2     23.2.17   6.17.2
73     2.10.1     23.1.17   6.17.1
74     2.10.0     23.0.17   6.17.0
75     2.9.1      22.1.16   6.16.1
76     2.9.0      22.0.16   6.16.0
77     2.8.1      21.0.15   6.15.0
78     2.8.0      20.0.14   6.14.0
79     2.7.1      19.0.13   6.13.0
80     2.7.0      18.6.12   6.12.6
81     2.6.5      18.5.12   6.12.5
82     2.6.4      18.4.12   6.12.4
83     2.6.3      18.3.12   6.12.3
84     2.6.2      18.2.12   6.12.2
85     2.6.1      18.1.12   6.12.1
86     2.6.0      18.0.12   6.12.0
87     2.5.5      17.4.11   6.11.4
88     2.5.4      17.3.11   6.11.3
89     2.5.3      17.2.11   6.11.2
90     2.5.2      17.1.11   6.11.1
91     2.5.1      17.0.11   6.11.0
92     2.5.0      16.2.10   6.10.2
93
94
953. Autoconf Code Fragment
96-------------------------
97
98Lars  Clausen contributed  the  following autoconf  fragment to  check
99which version of FreeType is installed on a system (now updated to use
100`pkg-config'  instead of  `freetype-config').   This one  tests for  a
101version that is at least 2.10.2; you should change it to check against
102other release numbers.
103
104
105  AC_MSG_CHECKING([whether FreeType version is 2.10.2 or higher])
106  old_CPPFLAGS="$CPPFLAGS"
107  CPPFLAGS=`pkg-config freetype2 --cflags`
108  AC_TRY_CPP([
109
110#include <ft2build.h>
111#include <freetype/freetype.h>
112
113#if FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH < 21002
114#  error FreeType version too low.
115#endif
116
117  ],
118  [AC_MSG_RESULT(yes)
119   FREETYPE_LIBS=`pkg-config freetype2 --libs`
120   AC_SUBST(FREETYPE_LIBS)
121   AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
122   CPPFLAGS="$old_CPPFLAGS"],
123  [AC_MSG_ERROR([Need FreeType library version 2.10.2 or higher])])
124
125----------------------------------------------------------------------
126
127Copyright (C) 2002-2023 by
128David Turner, Robert Wilhelm, and Werner Lemberg.
129
130This  file is  part of  the FreeType  project, and  may only  be used,
131modified,  and distributed  under the  terms of  the FreeType  project
132license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
133this file you  indicate that you have read the  license and understand
134and accept it fully.
135
136
137--- end of VERSIONS.TXT ---
138