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