Skip to content

Commit

Permalink
Merge commit 'e8ebfe988b5f57bfb9a3ecb13c70d9791bce9ecf'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed May 15, 2022
2 parents 49594f7 + e8ebfe9 commit af28639
Show file tree
Hide file tree
Showing 60 changed files with 10,873 additions and 1,091 deletions.
39 changes: 29 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ stages:

# FIXME: Use --werror once warnings are fixed.
variables:
MESON_ARGS: --fatal-meson-warnings
MESON_ARGS: --fatal-meson-warnings --default-library=both
MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib

.build windows common:
Expand Down Expand Up @@ -48,7 +48,17 @@ variables:
# Make sure meson is up to date so we don't need to rebuild the image
# with each release.
- pip3 install meson==0.59.1
- pip3 install --upgrade certifi
- pip3 install -U ninja

# Generate a UWP cross-file in case it's used
- $PSDefaultParameterValues['Out-File:Encoding'] = 'ASCII'
- echo "[binaries]" > uwp-crossfile.meson
- echo "c = 'cl'" >> uwp-crossfile.meson
- echo "strip = ['true']" >> uwp-crossfile.meson
- echo "[built-in options]" >> uwp-crossfile.meson
- echo "c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP', '-DUNICODE', '-D_WIN32_WINNT=0x0A00', '-we4013']" >> uwp-crossfile.meson
- echo "c_winlibs = ['windowsapp.lib']" >> uwp-crossfile.meson
script:
# For some reason, options are separated by newlines instead of spaces,
# so we have to replace them first.
Expand All @@ -59,11 +69,10 @@ variables:
# script. Environment variables substitutions is done by PowerShell
# before calling `cmd.exe`, that's why we use `$env:FOO` instead of
# `%FOO%`.
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
meson setup build $env:MESON_ARGS_WINDOWS &&
meson compile --verbose -C build &&
meson test -C build &&
meson test -C build --benchmark"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH $env:VS_UWP &&
meson setup build $env:MESON_ARGS_WINDOWS $env:MESON_ARGS_UWP &&
meson compile --verbose -C build
$env:MESON_WINDOWS_TESTS"


# Format of job names:
Expand All @@ -76,12 +85,20 @@ windows meson vs2017 amd64:
extends: '.build windows meson'
variables:
ARCH: 'amd64'
MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark'

windows meson vs2017 x86:
extends: '.build windows meson'
variables:
ARCH: 'x86'
MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark'

windows meson vs2017 amd64 uwp:
extends: '.build windows meson'
variables:
ARCH: 'amd64'
VS_UWP: '-app_platform=UWP'
MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"'

# Linux Jobs.
#
Expand Down Expand Up @@ -130,7 +147,8 @@ linux autotools libs clang:
linux meson:
extends: '.build linux common'
script: |
meson setup build -Dbrotli=disabled \
meson setup build ${MESON_ARGS} \
-Dbrotli=disabled \
-Dbzip2=disabled \
-Dharfbuzz=disabled \
-Dpng=disabled \
Expand All @@ -142,7 +160,8 @@ linux meson:
linux meson libs:
extends: '.build linux common'
script: |
meson setup build -Dbrotli=enabled \
meson setup build ${MESON_ARGS} \
-Dbrotli=enabled \
-Dbzip2=enabled \
-Dharfbuzz=disabled \
-Dpng=disabled \
Expand Down Expand Up @@ -205,7 +224,7 @@ macos meson:
- pip3 install -U meson
- pip3 install --upgrade certifi
- pip3 install -U ninja
- meson setup build

- meson setup build ${MESON_ARGS}
- meson compile --verbose -C build
- sudo meson install -C build
48 changes: 33 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ project(freetype C)

set(VERSION_MAJOR "2")
set(VERSION_MINOR "12")
set(VERSION_PATCH "0")
set(VERSION_PATCH "1")

# Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
Expand Down Expand Up @@ -491,46 +491,48 @@ if (BUILD_FRAMEWORK)
)
set_target_properties(freetype PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
PUBLIC_HEADER "${PUBLIC_HEADERS}"
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
)
endif ()


set(PKG_CONFIG_REQUIRED_PRIVATE "")
set(PKG_CONFIG_LIBS_PRIVATE "")
set(PKGCONFIG_REQUIRES "")
set(PKGCONFIG_REQUIRES_PRIVATE "")
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
set(PKGCONFIG_LIBS_PRIVATE "")

if (ZLIB_FOUND)
target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib")
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
endif ()
if (BZIP2_FOUND)
target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
if (PC_BZIP2_FOUND)
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2")
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
else ()
list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2")
list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
endif ()
endif ()
if (PNG_FOUND)
target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng")
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
endif ()
if (HarfBuzz_FOUND)
target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
endif ()
if (BROTLIDEC_FOUND)
target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES})
target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS})
target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec")
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
endif ()


Expand All @@ -557,7 +559,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
# Generate the pkg-config file
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)

string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")

string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
Expand All @@ -569,10 +571,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})

if (BUILD_SHARED_LIBS)
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
else ()
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
endif ()

set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
if (EXISTS "${FREETYPE2_PC_IN_NAME}")
Expand Down
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FreeType 2.12.0
FreeType 2.12.1
===============

Homepage: https://www.freetype.org
Expand Down Expand Up @@ -30,9 +30,9 @@ sites. Go to

and download one of the following files.

freetype-doc-2.12.0.tar.xz
freetype-doc-2.12.0.tar.gz
ftdoc2120.zip
freetype-doc-2.12.1.tar.xz
freetype-doc-2.12.1.tar.gz
ftdoc2121.zip

To view the documentation online, go to

Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ copy_submodule_files ()
cp $DLG_SRC_DIR/* src/dlg
}

if test -d ".git"; then
if test -e ".git"; then
DLG_INC_DIR=subprojects/dlg/include/dlg
DLG_SRC_DIR=subprojects/dlg/src/dlg

Expand Down
28 changes: 20 additions & 8 deletions builds/unix/configure.raw
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in])

# Don't forget to update `docs/VERSIONS.TXT'!

version_info='24:2:18'
version_info='24:3:18'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
Expand Down Expand Up @@ -530,16 +530,28 @@ AC_SEARCH_LIBS([clock_gettime],
[test "$ac_cv_search_clock_gettime" = "none required" \
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])

# 'librsvg' is needed to demonstrate SVG support.
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
[have_librsvg="yes (pkg-config)"], [have_librsvg=no])

FT_DEMO_CFLAGS=""
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"

if test "$have_librsvg" != no; then
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
# 'librsvg' is needed to demonstrate SVG support.
AC_ARG_WITH([librsvg],
[AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@],
[support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])],
[], [with_librsvg=auto])

have_librsvg=no
if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then
PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0],
[have_librsvg="yes (pkg-config)"], [:])

if test "$have_librsvg" != no; then
FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG"
FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS"
fi
fi

if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then
AC_MSG_ERROR([librsvg support requested but library not found])
fi

AC_SUBST([FT_DEMO_CFLAGS])
Expand Down
2 changes: 1 addition & 1 deletion builds/wince/vc2005-ce/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>

It compiles the following libraries from the FreeType 2.12.0 sources:</p>
It compiles the following libraries from the FreeType 2.12.1 sources:</p>

<ul>
<pre>
Expand Down
2 changes: 1 addition & 1 deletion builds/wince/vc2008-ce/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>

It compiles the following libraries from the FreeType 2.12.0 sources:</p>
It compiles the following libraries from the FreeType 2.12.1 sources:</p>

<ul>
<pre>
Expand Down
3 changes: 1 addition & 2 deletions builds/windows/ftsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@


/* non-desktop Universal Windows Platform */
#if defined( WINAPI_FAMILY_PARTITION ) && \
!WINAPI_FAMILY_PARTITION( WINAPI_PARTITION_DESKTOP )
#if defined( WINAPI_FAMILY ) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP

#define PACK_DWORD64( hi, lo ) ( ( (DWORD64)(hi) << 32 ) | (DWORD)(lo) )

Expand Down
2 changes: 1 addition & 1 deletion builds/windows/vc2010/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>
<p>This directory contains solution and project files for
Visual&nbsp;C++&nbsp;2010 or newer, named <tt>freetype.sln</tt>,
and <tt>freetype.vcxproj</tt>. It compiles the following libraries
from the FreeType 2.12.0 sources:</p>
from the FreeType 2.12.1 sources:</p>

<ul>
<li>freetype.dll using 'Release' or 'Debug' configurations</li>
Expand Down
2 changes: 1 addition & 1 deletion builds/windows/visualc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>
<p>This directory contains project files <tt>freetype.dsp</tt> for
Visual C++ 6.0, and <tt>freetype.vcproj</tt> for Visual C++ 2002
through 2008, which you might need to upgrade automatically.
It compiles the following libraries from the FreeType 2.12.0 sources:</p>
It compiles the following libraries from the FreeType 2.12.1 sources:</p>

<ul>
<li>freetype.dll using 'Release' or 'Debug' configurations</li>
Expand Down
2 changes: 1 addition & 1 deletion builds/windows/visualce/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>

It compiles the following libraries from the FreeType 2.12.0 sources:</p>
It compiles the following libraries from the FreeType 2.12.1 sources:</p>

<ul>
<pre>
Expand Down
30 changes: 30 additions & 0 deletions docs/CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
CHANGES BETWEEN 2.12.0 and 2.12.1

I. IMPORTANT BUG FIXES

- Loading CFF fonts sometimes made FreeType crash (bug introduced in
version 2.12.0)

- Loading a fully hinted TrueType glyph a second time (without
caching) sometimes yielded different rendering results if TrueType
hinting was active (bug introduced in version 2.12.0).

- The generation of the pkg-config file `freetype2.pc` was broken if
the build was done with cmake (bug introduced in version 2.12.0).


II. MISCELLANEOUS

- New option `--with-librsvg` for the `configure` script for better
FreeType demo support.

- The meson build no longer enforces both static and dynamic
versions of the library by default.

- The internal zlib library was updated to version 1.2.12. Note,
however, that FreeType is *not* affected by CVE-2018-25032 since
it only does decompression.


======================================================================

CHANGES BETWEEN 2.11.1 and 2.12.0

I. IMPORTANT CHANGES
Expand Down
1 change: 1 addition & 0 deletions docs/VERSIONS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ found on _most_ systems, but not all of them:

release libtool so
-------------------------------
2.12.1 24.3.18 6.18.3
2.12.0 24.2.18 6.18.2
2.11.1 24.1.18 6.18.1
2.11.0 24.0.18 6.18.0
Expand Down
2 changes: 1 addition & 1 deletion docs/freetype-config.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH FREETYPE-CONFIG 1 "March 2022" "FreeType 2.12.0"
.TH FREETYPE-CONFIG 1 "May 2022" "FreeType 2.12.1"
.
.
.SH NAME
Expand Down
2 changes: 1 addition & 1 deletion include/freetype/freetype.h
Original file line number Diff line number Diff line change
Expand Up @@ -4942,7 +4942,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 12
#define FREETYPE_PATCH 0
#define FREETYPE_PATCH 1


/**************************************************************************
Expand Down
Loading

0 comments on commit af28639

Please sign in to comment.