Compare commits

..

19 Commits

Author SHA1 Message Date
Dave Arnold 71b45f99b1 [cff] minor cleanup 2016-11-21 17:58:27 -08:00
Dave Arnold c7f2a52f86 [cff] minor code cleanup 2016-11-21 15:32:50 -08:00
Dave Arnold f34a28d614 [cff] delete trailing whitespace 2016-11-21 15:00:03 -08:00
Dave Arnold 410ff09eb6 Experimental fix for double adjustment of advance. 2016-11-18 18:02:10 -08:00
Dave Arnold 8dba6305da [cff] Add glyph name support for CFF2 using post table
Temporarily make sfnt_get_glyph_name() extern
Need to replace this with service interface.
2016-11-18 15:29:13 -08:00
Dave Arnold 88ad21fbe5 [cff] Make cff parser stack dynamic
Allocate and free parser->stack. Allow maxstack to increase the default.

Do validation of maxstack at parse time; make it a CALLBACK.

Defer support for > 256 FDs in cff_font_load().
2016-11-16 14:57:52 -08:00
Dave Arnold d49da66dcb [cff] Change operand stack from fixed size to dynamic
CFF becomes dynamic as well as CFF2
maxstack in Top DICT can increase the CFF2 default from 193
2016-11-15 13:57:41 -08:00
Dave Arnold dfce4760af Don't allow CFF2 charstrings to specify a width 2016-11-11 14:16:21 -08:00
Dave Arnold e3ef1df506 Disable seac for CFF2 2016-11-11 13:59:24 -08:00
Dave Arnold c156b734dd Add code to ignore operators removed from CFF2 spec
Ignored operators clear the stack.
Ignore return and endChar in CFF2.
Ignore vsindex and blend in CFF.

Add a nested switch for op2.
First op2 switch handles 4 flex operators for CFF & CFF2 and all reserved
operators common to both.
Second op2 switch handles CFF operators that were removed from CFF2.
2016-11-11 13:17:22 -08:00
Dave Arnold d5c247e923 [cff] Add support for vsindex, DICT & CharString
Add cf2_cmdVSINDEX charstring operator.
Add cff_parse_vsindex as a callback function.
Add vsindex state machine to check for vsindex after blend.

Fix stack bugs in cff_blend_doBlend.
Report errors from cff_blend_build_vector.

Minor comment and TRACE edits.
2016-11-10 13:18:38 -08:00
Dave Arnold 304f0383ef [truetype] Fix HVAR bugs with more than one data item
* src/truetype/ttgxvar.c (ft_var_load_hvar, tt_adjust_advance): rename
regionCount to regionIdxCount. Clean up some comments.
2016-11-02 15:33:13 -07:00
Dave Arnold 776a712be8 [cff] Add CFF2 blend support to cff parser.
* src/cff/cf2font.c (cf2_font_setup): before rendering a glyph, check
blend vector and reparse private DICT if it has changed.

* src/cff/cf2intrp.c (cf2_interpT2CharString): check blend vector and
build blend vector if needed at cf2_doBlend.

* src/cff/cffload.c (cff_vstore_load): fix bug parsing vstore with > 1
data item.
(cff_load_private_dict): factor out private dict parsing so we can
reparse when vector changes.

Add functions for handling CFF_Blend object.
(cff_blend_clear): clear blend stack
(cff_blend_check_vector): test if inputs have changed and blend vector
needs rebuilding.
(cff_blend_build_vector): construct blend vector from design vector
using algorithm in OpenType Font Variations Overview.
(cff_blend_doBlend): compute blended array, same as in cf2_intrp.c but
with parser blend_stack instead of charstring operand stack.

* src/cff/cffparse.c Add blend_stack alongside parser stack, so we have
a place to write blend results.
(cff_parse_num): add internal number type, opcode 255, for use with
blend_stack. Change limit check on several number parsing functions,
since stack is no longer contiguous.
(cff_parse_blend): check blend vector and re-build it if needed.
(cff_parser_run): ignore opcode 255 if it occurs in a font.

* src/cff/cfftypes.h (CFF_Blend): add object data for cff_blend_*
functions.
(CFF_SubFont): add CFF_Blend and blend_stack.
2016-11-02 15:30:36 -07:00
Dave Arnold 54d9993505 Corrections to parse fonts following 1.8 spec.
INDEX count for CFF2 is 32 bits, while CFF is 16 bits
This means INDEX header size is either 5 or 3 bytes.

CFF2 header size is 5 bytes, while CFF is 4 bytes.
In CFF2, offSize field is length of the Top DICT data and is 16 bits.

Blend operator has changed from 31 to 23.
2016-10-18 21:20:19 -07:00
Dave Arnold 4c39089a4d Add separate parsing tables for CFF2
Limit Top, Font and Private dicts to operators allowed by spec
Remove duplicate constants (CFFCODE vs CFF_CODE)
Allow more than 256 Font Dicts (subfonts) in CFF2
2016-09-29 16:54:53 -07:00
Dave Arnold dccfebc0f5 Support v10 CFF2 fonts
remove string index, font index
top dict follows header, but has no index
font dict in FDArray, but skip FDSelect when there's only one font dict
2016-09-28 15:14:28 -07:00
Dave Arnold 6a5ef34797 Test. Minor change in comment 2016-09-15 10:21:01 -07:00
Behdad Esfahbod c7f87a1f8b Fix up commit d1d88cd08dd3d438abcf7e60087c72957a50fcb1
FT_Get_Var_Design_Coordinates() was turning blending off.  Apparently
CFF implementation does not respect that, but TrueType driver does.
2016-09-14 09:41:08 +02:00
Dave Arnold d1908a107d Preliminary OpenType 1.8 support. 2016-09-14 01:14:29 +02:00
813 changed files with 95848 additions and 125520 deletions

View File

@ -1,16 +0,0 @@
BasedOnStyle: Chromium
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlines: true
# AlignOperands: Align
AlignTrailingComments: true
AlwaysBreakAfterReturnType: AllDefinitions
BreakBeforeBraces: Allman
ColumnLimit: 80
DerivePointerAlignment: false
IndentCaseLabels: false
PointerAlignment: Left
SpaceBeforeParens: ControlStatements
SpacesInParentheses: true

9
.gitignore vendored
View File

@ -1,7 +1,2 @@
/build/
/config.mk
include/dlg/
src/dlg/dlg.c
subprojects/*
!subprojects/*.wrap
/tests/data/*
config.mk
objs/vc2010/

View File

@ -1,230 +0,0 @@
# CI setup for FreeType.
stages:
- build
# FIXME: Use --werror once warnings are fixed.
variables:
MESON_ARGS: --fatal-meson-warnings --default-library=both
MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib
.build windows common:
# See
# https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/213
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:2021-09-09.0-master'
stage: 'build'
tags:
- 'docker'
- 'windows'
- '1809'
- 'gstreamer-windows'
.build linux common:
# See
# https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896
image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
stage: 'build'
.build macos common:
stage: 'build'
tags:
- 'gst-macos-11.1'
.build windows meson:
extends: '.build windows common'
variables:
# Make sure any failure in PowerShell scripts is fatal.
ErrorActionPreference: 'Stop'
WarningPreference: 'Stop'
# Uncomment the following key if you need to pass custom args, as well
# with the `$env:MESON_ARGS` line in the `script:` blocks.
# MESON_ARGS: >-
# -Dfoo=enabled
# -Dbar=disabled
before_script:
# Update RootCAs in order to access to some sites.
- certutil -generateSSTFromWU "C:\roots.sst"
- Import-Certificate -CertStoreLocation "Cert:\LocalMachine\Root" "C:\roots.sst"
# 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.
#
# - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
#
# Gitlab executes PowerShell in docker, but `VsDevCmd.bat` is a batch
# 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 $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:
# <OS> <Build-Tool> <Build-Params> <Architecture>
# Windows jobs.
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.
#
# Jobs with "libs" in the name force-enable libraries.
# They are disabled for the remaining jobs.
linux autotools:
extends: '.build linux common'
script: |
./autogen.sh
./configure --with-brotli=no \
--with-bzip2=no \
--with-harfbuzz=no \
--with-png=no \
--with-zlib=no \
CC=gcc
make -j$(nproc) && make install
linux autotools libs:
extends: '.build linux common'
script: |
./autogen.sh
./configure --with-brotli=yes \
--with-bzip2=yes \
--with-harfbuzz=yes \
--with-png=yes \
--with-zlib=yes \
CC=gcc
make -j$(nproc) && make install
linux autotools libs clang:
extends: '.build linux common'
script: |
./autogen.sh
./configure --with-brotli=yes \
--with-bzip2=yes \
--with-harfbuzz=yes \
--with-png=yes \
--with-zlib=yes \
CC=clang
make -j$(nproc) && make install
linux meson:
extends: '.build linux common'
script: |
meson setup build ${MESON_ARGS} \
-Dbrotli=disabled \
-Dbzip2=disabled \
-Dharfbuzz=disabled \
-Dpng=disabled \
-Dzlib=disabled
meson compile --verbose -C build
meson install -C build
linux meson libs:
extends: '.build linux common'
script: |
meson setup build ${MESON_ARGS} \
-Dbrotli=enabled \
-Dbzip2=enabled \
-Dharfbuzz=disabled \
-Dpng=disabled \
-Dzlib=disabled
meson compile --verbose -C build
meson install -C build
linux cmake:
extends: '.build linux common'
script: |
cmake -B build -D FT_DISABLE_BROTLI=TRUE \
-D FT_DISABLE_BZIP2=TRUE \
-D FT_DISABLE_HARFBUZZ=TRUE \
-D FT_DISABLE_PNG=TRUE \
-D FT_DISABLE_ZLIB=TRUE
cmake --build build --target install
linux cmake libs:
extends: '.build linux common'
script: |
cmake -B build -D FT_REQUIRE_BROTLI=TRUE \
-D FT_REQUIRE_BZIP2=TRUE \
-D FT_REQUIRE_HARFBUZZ=TRUE \
-D FT_REQUIRE_PNG=TRUE \
-D FT_REQUIRE_ZLIB=TRUE
cmake --build build --target install
# MacOS jobs.
macos autotools:
extends: '.build macos common'
before_script:
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
script:
- brew install autoconf automake libtool
- ./autogen.sh
- ./configure
- 'make -j$(sysctl -n hw.logicalcpu)'
- make install
macos autotools clang:
extends: '.build macos common'
before_script:
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
script:
- brew install autoconf automake libtool
- ./autogen.sh
- './configure CC=clang'
- 'make -j$(sysctl -n hw.logicalcpu)'
- make install
macos meson:
extends: '.build macos common'
script:
- pip3 install --upgrade pip
- pip3 install -U meson
- pip3 install --upgrade certifi
- pip3 install -U ninja
- meson setup build ${MESON_ARGS}
- meson compile --verbose -C build
- sudo meson install -C build

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "dlg"]
path = subprojects/dlg
url = https://github.com/nyorain/dlg.git

View File

@ -1,24 +1,8 @@
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org> <behdad.esfahbod@gmail.com>
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org> <behdad@google.com>
Behdad Esfahbod (بهداد اسفهبد) <behdad@behdad.org>
Alexander Borsuk <me@alex.bio> <alexander.borsuk@qnective.com>
Ewald Hew (Hew Yih Shiuan 丘毅宣) <ewaldhew@gmail.com>
Moazin Khatti (موؤذن کھٹی) <moazinkhatri@gmail.com>
Priyesh Kumar (प्रियेश कुमार) <priyeshkkumar@gmail.com>
Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>
Nikhil Ramakrishnan (निखिल रामकृष्णन) <ramakrishnan.nikhil@gmail.com>
Dominik Röttsches <drott@chromium.org> <drott@google.com>
Kostya Serebryany <kcc@google.com> <konstantin.s.serebryany@gmail.com>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> <sssa@flavor1.ipc.hiroshima-u.ac.jp>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@IPA2004-mps.local>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@sssas-powerbook-g4-12.local>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Behdad Esfahbod <behdad@behdad.org> <behdad.esfahbod@gmail.com>
Bram Tassyns <bramt@enfocus.be> bram tassyns <BramT@enfocus.be>
Bram Tassyns <bramt@enfocus.be> <BramT@enfocus.com>
David Turner <david@freetype.org> <david.turner.dev@gmail.com>
David Turner <david@freetype.org> <digit@google.com>
Anuj Verma (अनुज वर्मा) <anujv@iitbhilai.ac.in>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> <sssa@flavor1.ipc.hiroshima-u.ac.jp>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@IPA2004-mps.local>
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Ben Wagner <bungeman@gmail.com> Bungeman <bungeman@gmail.com>
Ben Wagner <bungeman@gmail.com> <bungeman@google.com>
Ben Wagner <bungeman@gmail.com> <bungeman@chromium.org>
Nikolaus Waxweiler <madigens@gmail.com> <nikolaus.waxweiler@daltonmaag.com>

View File

@ -1,6 +1,6 @@
# CMakeLists.txt
#
# Copyright (C) 2013-2022 by
# Copyright 2013-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written originally by John Cary <cary@txcorp.com>
@ -12,126 +12,83 @@
# fully.
#
#
# The following will (1) create a build directory, and (2) change into it and
# call cmake to configure the build with default parameters as a static
# library. See
# As a preliminary, create a compilation directory and change into it, for
# example
#
# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
# mkdir ~/freetype2.compiled
# cd ~/freetype2.compiled
#
# for information about debug or release builds, for example
# Now you can say
#
# cmake -B build -D CMAKE_BUILD_TYPE=Release
# cmake <path-to-freetype2-src-dir>
#
# to create a Makefile that builds a static version of the library.
#
# For a dynamic library, use
#
# cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release
# cmake <path-to-freetype2-src-dir> -D BUILD_SHARED_LIBS:BOOL=true
#
# For a framework on OS X, use
#
# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
# cmake <path-to-freetype2-src-dir> -D BUILD_FRAMEWORK:BOOL=true -G Xcode
#
# instead.
#
# For an iOS static library, use
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
# cmake -D IOS_PLATFORM=OS -G Xcode <path-to-freetype2-src-dir>
#
# or
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR ..
#
# or
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 ..
#
#
# Finally, build the project with
#
# cmake --build build
#
# Install it with
#
# (sudo) cmake --build build --target install
#
# A binary distribution can be made with
#
# cmake --build build --config Release --target package
# cmake -D IOS_PLATFORM=SIMULATOR -G Xcode <path-to-freetype2-src-dir>
#
# Please refer to the cmake manual for further options, in particular, how
# to modify compilation and linking parameters.
#
# Some notes.
#
# - `cmake' creates configuration files in
# . `cmake' creates configuration files in
#
# <build-directory>/include/freetype/config
#
# which should be further modified if necessary.
#
# - You can use `cmake' directly on a freshly cloned FreeType git
# . You can use `cmake' directly on a freshly cloned FreeType git
# repository.
#
# - `CMakeLists.txt' is provided as-is since it is normally not used by the
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
# developer team.
#
# - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG',
# `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON'
# or `TRUE' to force using a dependency. Leave a variable undefined
# (which is the default) to use the dependency only if it is available.
# Example:
# . If you want to disable the automatic generation of the distribution
# targets, add the `-D FREETYPE_NO_DIST=true' command line argument.
#
# cmake -B build -D FT_REQUIRE_ZLIB=TRUE \
# -D FT_REQUIRE_BZIP2=TRUE \
# -D FT_REQUIRE_PNG=TRUE \
# -D FT_REQUIRE_HARFBUZZ=TRUE \
# -D FT_REQUIRE_BROTLI=TRUE [...]
# . Set the `WITH_ZLIB', `WITH_BZip2', `WITH_PNG', and `WITH_HarfBuzz'
# CMake variables to `ON' or `OFF' to force or skip using a dependency.
# Leave a variable undefined (which is the default) to use the dependency
# only if it is available. Example:
#
# - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where
# `XXX' is a CMake package name like `BZip2'). Example for disabling all
# dependencies:
# cmake ... -DWITH_ZLIB=ON -DWITH_HarfBuzz=OFF ...
#
# cmake -B build -D FT_DISABLE_ZLIB=TRUE \
# -D FT_DISABLE_BZIP2=TRUE \
# -D FT_DISABLE_PNG=TRUE \
# -D FT_DISABLE_HARFBUZZ=TRUE \
# -D FT_DISABLE_BROTLI=TRUE [...]
#
# - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED
# without unsetting the DISABLED value first. For example, if
# `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to
# call `FT_DISABLE_HARFBUZZ=FALSE' before calling
# `FT_REQUIRE_HARFBUZZ=TRUE'.
#
# - Installation of FreeType can be controlled with the CMake variables
# . Installation of FreeType can be controlled with the CMake variables
# `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL'
# (this is compatible with the same CMake variables in zlib's CMake
# support).
# To minimize the number of cmake_policy() workarounds,
# CMake >= 3 is requested.
cmake_minimum_required(VERSION 3.0)
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
# Allow symbol visibility settings also on static libraries. CMake < 3.3
# only sets the property on a shared library build.
cmake_policy(SET CMP0063 NEW)
cmake_minimum_required(VERSION 2.6)
# Support new IN_LIST if() operator.
cmake_policy(SET CMP0057 NEW)
endif ()
include(CheckIncludeFile)
include(CMakeDependentOption)
include(FindPkgConfig)
# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
# configures the base build environment and references the toolchain file
if (APPLE)
if (DEFINED IOS_PLATFORM)
if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR"
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR64")
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR")
message(FATAL_ERROR
"IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64")
"IOS_PLATFORM must be set to either OS or SIMULATOR")
endif ()
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
message(AUTHOR_WARNING
@ -159,79 +116,30 @@ else ()
endif ()
project(freetype C)
project(freetype)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "12")
set(VERSION_PATCH "1")
# Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
VERSION_INFO
REGEX ${LIBTOOL_REGEX})
string(REGEX REPLACE
${LIBTOOL_REGEX} "\\1"
LIBTOOL_CURRENT "${VERSION_INFO}")
string(REGEX REPLACE
${LIBTOOL_REGEX} "\\2"
LIBTOOL_REVISION "${VERSION_INFO}")
string(REGEX REPLACE
${LIBTOOL_REGEX} "\\3"
LIBTOOL_AGE "${VERSION_INFO}")
# This is what libtool does internally on Unix platforms.
math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}")
# External dependency library detection is automatic. See the notes at the
# top of this file, for how to force or disable dependencies completely.
option(FT_DISABLE_ZLIB
"Disable use of system zlib and use internal zlib library instead." OFF)
cmake_dependent_option(FT_REQUIRE_ZLIB
"Require system zlib instead of internal zlib library." OFF
"NOT FT_DISABLE_ZLIB" OFF)
option(FT_DISABLE_BZIP2
"Disable support of bzip2 compressed fonts." OFF)
cmake_dependent_option(FT_REQUIRE_BZIP2
"Require support of bzip2 compressed fonts." OFF
"NOT FT_DISABLE_BZIP2" OFF)
option(FT_DISABLE_PNG
"Disable support of PNG compressed OpenType embedded bitmaps." OFF)
cmake_dependent_option(FT_REQUIRE_PNG
"Require support of PNG compressed OpenType embedded bitmaps." OFF
"NOT FT_DISABLE_PNG" OFF)
option(FT_DISABLE_HARFBUZZ
"Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF)
cmake_dependent_option(FT_REQUIRE_HARFBUZZ
"Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF
"NOT FT_DISABLE_HARFBUZZ" OFF)
option(FT_DISABLE_BROTLI
"Disable support of compressed WOFF2 fonts." OFF)
cmake_dependent_option(FT_REQUIRE_BROTLI
"Require support of compressed WOFF2 fonts." OFF
"NOT FT_DISABLE_BROTLI" OFF)
if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
endif ()
# Disallow in-source builds
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
message(FATAL_ERROR
"In-source builds are not permitted! Make a separate folder for"
" building, e.g.,\n"
" cmake -E make_directory build\n"
" cmake -E chdir build cmake ..\n"
"Before that, remove the files created by this failed run with\n"
" cmake -E remove CMakeCache.txt\n"
" cmake -E remove_directory CMakeFiles")
"
In-source builds are not permitted! Make a separate folder for"
" building, e.g.,"
"
mkdir build; cd build; cmake .."
"
Before that, remove the files created by this failed run with"
"
rm -rf CMakeCache.txt CMakeFiles")
endif ()
# Add local cmake modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/builds/cmake)
if (BUILD_FRAMEWORK)
@ -239,92 +147,91 @@ if (BUILD_FRAMEWORK)
message(FATAL_ERROR
"You should use Xcode generator with BUILD_FRAMEWORK enabled")
endif ()
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
set(BUILD_SHARED_LIBS ON)
endif ()
set(VERSION_MAJOR "2")
set(VERSION_MINOR "6")
set(VERSION_PATCH "5")
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
# Compiler definitions for building the library
add_definitions(-DFT2_BUILD_LIBRARY)
# Find dependencies
if (NOT FT_DISABLE_HARFBUZZ)
set(HARFBUZZ_MIN_VERSION "2.0.0")
if (FT_REQUIRE_HARFBUZZ)
find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED)
else ()
find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})
endif ()
endif ()
foreach (d ZLIB BZip2 PNG HarfBuzz)
string(TOUPPER "${d}" D)
if (NOT FT_DISABLE_PNG)
if (FT_REQUIRE_PNG)
find_package(PNG REQUIRED)
if (DEFINED WITH_${d} OR DEFINED WITH_${D})
if (WITH_${d} OR WITH_${D})
find_package(${d} QUIET REQUIRED)
endif ()
else ()
find_package(PNG)
find_package(${d} QUIET)
endif ()
endif ()
if (NOT FT_DISABLE_ZLIB)
if (FT_REQUIRE_ZLIB)
find_package(ZLIB REQUIRED)
else ()
find_package(ZLIB)
if (${d}_FOUND OR ${D}_FOUND)
message(STATUS "Building with ${d}")
endif ()
endif ()
endforeach ()
if (NOT FT_DISABLE_BZIP2)
# Genuine BZip2 does not provide bzip2.pc, but some platforms have it.
# For better dependency in freetype2.pc, bzip2.pc is searched
# regardless of the availability of libbz2. If bzip2.pc is found,
# Requires.private is used instead of Libs.private.
if (FT_REQUIRE_BZIP2)
find_package(BZip2 REQUIRED)
else ()
find_package(BZip2)
endif ()
pkg_check_modules(PC_BZIP2 bzip2)
endif ()
if (NOT FT_DISABLE_BROTLI)
if (FT_REQUIRE_BROTLI)
find_package(BrotliDec REQUIRED)
else ()
find_package(BrotliDec)
endif ()
endif ()
message(STATUS
"Creating directory ${PROJECT_BINARY_DIR}/include/freetype/config")
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
# Create the configuration file
message(STATUS
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
if (UNIX)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("stdint.h" HAVE_STDINT_H)
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
FTCONFIG_H)
if (HAVE_UNISTD_H)
string(REGEX REPLACE
"#undef +(HAVE_UNISTD_H)" "#define \\1 1"
"#undef +(HAVE_UNISTD_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_FCNTL_H)
string(REGEX REPLACE
"#undef +(HAVE_FCNTL_H)" "#define \\1 1"
"#undef +(HAVE_FCNTL_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_STDINT_H)
string(REGEX REPLACE
"#undef +(HAVE_STDINT_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
string(REPLACE "/undef " "#undef "
FTCONFIG_H "${FTCONFIG_H}")
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
"${FTCONFIG_H}")
else ()
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
FTCONFIG_H)
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
"${FTCONFIG_H}")
endif ()
set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
if (EXISTS "${FTCONFIG_H_NAME}")
file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
else ()
set(ORIGINAL_FTCONFIG_H "")
endif ()
if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H))
file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}")
endif ()
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h-new"
"${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
# Create the options file
message(STATUS
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
FTOPTION_H)
if (ZLIB_FOUND)
@ -347,21 +254,16 @@ if (HARFBUZZ_FOUND)
"/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
if (BROTLIDEC_FOUND)
string(REGEX REPLACE
"/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h-new"
"${FTOPTION_H}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h-new"
"${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
if (EXISTS "${FTOPTION_H_NAME}")
file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
else ()
set(ORIGINAL_FTOPTION_H "")
endif ()
if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H))
file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}")
endif ()
# Specify library include directories
include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
@ -376,17 +278,20 @@ set(BASE_SRCS
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcid.c
src/base/ftfntfmt.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
src/base/ftlcdfil.c
src/base/ftmm.c
src/base/ftotval.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftstroke.c
src/base/ftsynth.c
src/base/ftsystem.c
src/base/fttype1.c
src/base/ftwinfnt.c
src/bdf/bdf.c
@ -402,43 +307,31 @@ set(BASE_SRCS
src/pshinter/pshinter.c
src/psnames/psnames.c
src/raster/raster.c
src/sdf/sdf.c
src/sfnt/sfnt.c
src/smooth/smooth.c
src/svg/svg.c
src/truetype/truetype.c
src/type1/type1.c
src/type42/type42.c
src/winfonts/winfnt.c
)
if (UNIX)
list(APPEND BASE_SRCS "builds/unix/ftsystem.c")
elseif (WIN32)
list(APPEND BASE_SRCS "builds/windows/ftsystem.c")
if (WIN32)
set(BASE_SRCS ${BASE_SRCS} builds/windows/ftdebug.c)
elseif (WINCE)
set(BASE_SRCS ${BASE_SRCS} builds/wince/ftdebug.c)
else ()
list(APPEND BASE_SRCS "src/base/ftsystem.c")
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
endif ()
if (WIN32)
enable_language(RC)
list(APPEND BASE_SRCS builds/windows/ftdebug.c
src/base/ftver.rc)
elseif (WINCE)
list(APPEND BASE_SRCS builds/wince/ftdebug.c)
else ()
list(APPEND BASE_SRCS src/base/ftdebug.c)
endif ()
if (BUILD_FRAMEWORK)
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
endif ()
if (NOT DISABLE_FORCE_DEBUG_POSTFIX)
set(CMAKE_DEBUG_POSTFIX d)
set(BASE_SRCS
${BASE_SRCS}
builds/mac/freetype-Info.plist
)
endif ()
set(CMAKE_DEBUG_POSTFIX d)
add_library(freetype
${PUBLIC_HEADERS}
@ -447,43 +340,15 @@ add_library(freetype
${BASE_SRCS}
)
set_target_properties(
freetype PROPERTIES
C_VISIBILITY_PRESET hidden)
target_compile_definitions(
freetype PRIVATE FT2_BUILD_LIBRARY)
if (WIN32)
target_compile_definitions(
freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
if (BUILD_SHARED_LIBS)
target_compile_definitions(
freetype PRIVATE DLL_EXPORT)
endif ()
endif ()
if (BUILD_SHARED_LIBS)
set_target_properties(freetype PROPERTIES
VERSION ${LIBRARY_VERSION}
SOVERSION ${LIBRARY_SOVERSION})
VERSION ${PROJECT_VERSION}
SOVERSION ${SHARED_LIBRARY_VERSION}
COMPILE_DEFINITIONS freetype_EXPORTS
)
endif ()
# Pick up ftconfig.h and ftoption.h generated above, first.
target_include_directories(
freetype
PUBLIC
$<INSTALL_INTERFACE:include/freetype2>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include
# Make <ftconfig.h> available for builds/unix/ftsystem.c.
${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config
)
if (BUILD_FRAMEWORK)
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
@ -491,173 +356,97 @@ if (BUILD_FRAMEWORK)
)
set_target_properties(freetype PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
PUBLIC_HEADER "${PUBLIC_HEADERS}"
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
)
endif ()
if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
target_include_directories(freetype
PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
endif ()
set(PKGCONFIG_REQUIRES "")
set(PKGCONFIG_REQUIRES_PRIVATE "")
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
set(PKGCONFIG_LIBS_PRIVATE "")
if (CMAKE_VERSION VERSION_LESS 2.8.12)
set(MAYBE_PRIVATE "")
else ()
set(MAYBE_PRIVATE "PRIVATE")
endif ()
if (ZLIB_FOUND)
target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
target_link_libraries(freetype ${MAYBE_PRIVATE} ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
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 PKGCONFIG_REQUIRES_PRIVATE "bzip2")
else ()
list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
endif ()
target_link_libraries(freetype ${MAYBE_PRIVATE} ${BZIP2_LIBRARIES})
include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
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 PKGCONFIG_REQUIRES_PRIVATE "libpng")
add_definitions(${PNG_DEFINITIONS})
target_link_libraries(freetype ${MAYBE_PRIVATE} ${PNG_LIBRARIES})
include_directories(${PNG_INCLUDE_DIRS})
endif ()
if (HarfBuzz_FOUND)
target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
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 PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec")
if (HARFBUZZ_FOUND)
target_link_libraries(freetype ${MAYBE_PRIVATE} ${HARFBUZZ_LIBRARIES})
include_directories(${HARFBUZZ_INCLUDE_DIRS})
endif ()
# Installation
include(GNUInstallDirs)
# Installations
# Note the trailing slash in the argument to the `DIRECTORY' directive
if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
install(
# Note the trailing slash in the argument to `DIRECTORY'!
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
COMPONENT headers
PATTERN "internal" EXCLUDE
PATTERN "ftconfig.h" EXCLUDE
PATTERN "ftoption.h" EXCLUDE)
install(
FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
COMPONENT headers)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include/freetype2
PATTERN "internal" EXCLUDE
PATTERN "ftconfig.h" EXCLUDE
PATTERN "ftoption.h" EXCLUDE
)
install(FILES
${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
DESTINATION include/freetype2/freetype/config
)
endif ()
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 ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}")
string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%exec_prefix%" "\${prefix}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
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}")
file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
else ()
set(ORIGINAL_FREETYPE2_PC_IN "")
endif ()
if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
endif ()
install(
FILES ${PROJECT_BINARY_DIR}/freetype2.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
COMPONENT pkgconfig)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${PROJECT_BINARY_DIR}/freetype-config-version.cmake
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
COMPATIBILITY SameMajorVersion)
install(
TARGETS freetype
EXPORT freetype-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION Library/Frameworks
COMPONENT libraries)
install(
install(TARGETS freetype
EXPORT freetype-targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
FILE freetype-config.cmake
COMPONENT headers)
install(
FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
COMPONENT headers)
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION Library/Frameworks
)
install(EXPORT freetype-targets
DESTINATION lib/cmake/freetype
FILE freetype-config.cmake
)
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_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
# CPack version numbers for release tarball name.
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
endif ()
if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
CACHE INTERNAL "tarball basename"
)
endif ()
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
set(CPACK_GENERATOR TGZ)
include(CPack)
if (WIN32)
set(CPACK_GENERATOR ZIP)
else ()
set(CPACK_GENERATOR TGZ)
# Add `make dist' target if FREETYPE_DIST is set (which is the default)
if (NOT DEFINED FREETYPE_NO_DIST)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
endif ()
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
"Library used to build programs which use FreeType")
set(CPACK_COMPONENT_HEADERS_DESCRIPTION
"C/C++ header files for use with FreeType")
set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
include(CPack)
# eof

View File

@ -1,3 +1,197 @@
2016-07-29 Werner Lemberg <wl@gnu.org>
[sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
Since 2016-05-16 we detect infinite recursion directly.
* src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
`maxComponentDepth'.
* src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
`maxComponentDepth' is not valid. Instead, simply adjust its value
and emit a tracing message.
2016-07-26 Werner Lemberg <wl@gnu.org>
* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
No functional change.
2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
[truetype] Record the end of IDEFs.
To match the logic in FDEF. The value of the end is only used for
bound-checking in `Ins_JMPR', so it may not have been obvious that
it was not recorded. Tested (as part of Font Validator 2.0) all the
fonts on Fedora and did not see any change.
* src/truetype/ttinterp.c (Ins_IDEF): Updated.
2016-07-19 Werner Lemberg <wl@gnu.org>
[truetype] Sanitizer fix, second try.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
tests and use only one slot more.
2016-07-19 Werner Lemberg <wl@gnu.org>
[truetype] Sanitizer fix.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
to fix nested loops.
2016-07-18 Werner Lemberg <wl@gnu.org>
[truetype] Make GETDATA work only for GX fonts.
* src/truetype/ttinterp.c (opcode_name): Updated.
(Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
(TT_RunIns): Updated.
2016-07-17 Werner Lemberg <wl@gnu.org>
[truetype] Add support for Apple's
GETDATA[], opcode 0x92
bytecode instruction. It always returns 17, and we have absolutely
no idea what it is good for...
* src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
(Ins_GETDATA): New function.
(TT_RunIns): Add it.
2016-07-16 Werner Lemberg <wl@gnu.org>
[truetype] Add bytecode support for GX variation fonts.
This commit implements undocumented (but confirmed) stuff from
Apple's old bytecode engine.
GETVARIATION[], opcode 0x91
This opcode pushes normalized variation coordinates for all axes
onto the stack (in 2.14 format). Coordinate of first axis gets
pushed first.
GETINFO[], selector bit 3
If GX variation support is enabled, bit 10 of the result is set
to 1.
* src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
(opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
(Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
bit 3, checking support for variation glyph hinting.
(Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
to implement opcode 0x91.
(TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
2016-07-16 Werner Lemberg <wl@gnu.org>
[truetype] Fix GETINFO bytecode instruction.
* src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
stretching information.
2016-07-16 Behdad Esfahbod <behdad@behdad.org>
[truetype] Make all glyphs in `Zycon' GX font work.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
tests.
2016-07-16 Werner Lemberg <wl@gnu.org>
[truetype] Fix GX delta tracing.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
relative point movements.
2016-07-16 Behdad Esfahbod <behdad@behdad.org>
[truetype] More fixes for GX.
This finally fixes the rendering of the cyclist and the lizard in
the `Zycon' font.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
index is always cumulative.
(tt_handle_deltas): Rename to...
(tt_interpolate_deltas): ... This.
Add new parameter for output point array.
Update caller.
(TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
the intermediate results of `tt_interpolate_deltas' that are to be
added to `outline->points'.
2016-07-15 Werner Lemberg <wl@gnu.org>
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
`max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
Reported by Alexei.
2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
* src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
Problem reported by Hin-Tak Leung.
2016-07-15 Werner Lemberg <wl@gnu.org>
[autofit] Update and improve segment and edge tracing.
* src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
`delta' also.
Don't show first point of segment as a replacement for `pos'; this
is (a) misleading, since the difference to `pos' can be almost
arbitrarily large in corner cases, and (b) it is better to have all
segment data in font units instead of a single value given in output
space coordinates.
Improve layout.
(af_glyph_hints_dump_edges): Show px->units and units->px conversion
values for convenience.
Improve layout.
2016-07-15 Werner Lemberg <wl@gnu.org>
[autofit] For edges, reject segments wider than 1px (#41334).
* src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
`delta'.
(af_latin_hints_compute_edges): Reject segments with a delta larger
than 0.5px.
2016-07-14 Werner Lemberg <wl@gnu.org>
* include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
2016-07-14 Werner Lemberg <wl@gnu.org>
[sfnt] Fix `face_index' value in `FT_Face' for named instances.
* src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
2016-07-14 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
2016-07-14 Behdad Esfahbod <behdad@behdad.org>
[truetype] Fix gxvar delta interpolation.
The coordinates of the base font should be used for interpolation
purposes, NOT the current points (i.e., the result of accumulation
of previous deltas).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
`points_org' before looping over all tuples.
2016-07-12 Werner Lemberg <wl@gnu.org>
* Version 2.6.5 released.
@ -324,7 +518,7 @@
2016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Sanitize memory management.
[smooth] Sanitize memory managenent.
* src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
@ -434,7 +628,7 @@
* src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
the twilight zone. Otherwise, treat SHPIX the same as DELTAP.
Unbreaks various fonts such as older versions of Rokkitt and DTL
Argo T Light that would glitch severely after calling ALIGNRP after a
Argo T Light that would glitch severly after calling ALIGNRP after a
blocked SHPIX.
2016-05-30 Werner Lemberg <wl@gnu.org>
@ -460,7 +654,7 @@
[smooth] Shrink bisection stack.
The convergence of Bézier flatteners is fast with the deviation
from straight line being asymptotically cut 4-fold on each bisection.
from straight line being assymptotically cut 4-fold on each bisection.
This justifies smaller bisection stack size.
* src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
@ -563,26 +757,26 @@
* src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
(NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
SUBPIXEL_HINTING_MINIMAL): ...new macros.
(Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backward
(Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
compatibility.
Updated.
(Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
Updated.
(Ins_INSTCTRL): Handle native ClearType mode flag.
Updated.
(Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backward
(Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
compatibility.
(Move_Zp2_Point): Ditto.
(Ins_SHP): Updated.
(Ins_SHPIX): Handle backward compatibility.
(Ins_SHPIX): Handle backwards compatibility.
Updated.
(Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
(Ins_ALIGNRP): Updated.
(Ins_IUP, Ins_DELTAP): Handle backward compatibility.
(Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
Updated.
(Ins_GETINFO): Handle v38 flags.
Updated.
(TT_RunIns): Handle backward compatibility mode.
(TT_RunIns): Handle backwards compatibility mode.
Updated.
2016-05-17 Nikolaus Waxweiler <madigens@gmail.com>
@ -606,16 +800,16 @@
* src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
`subpixel_hinting_lean', `vertical_lcd_lean',
`backward_compatibility', `iupx_called', iupy_called', and
`backwards_compatibility', `iupx_called', iupy_called', and
`grayscale_cleartype' for new hinting mode.
* src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
interpreters conditionally.
* src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
in v38 backward compatibility mode.
in v38 backwards compatibility mode.
Updated.
(compute_glyph_metrics): Add v38 backward compatibility mode
(compute_glyph_metrics): Add v38 backwards compatibility mode
constraint for adjusting advance widths.
Updated.
(tt_loader_init): Handle new flags `subpixel_hinting_lean',
@ -663,7 +857,7 @@
The previous fix for #46372 misunderstood a composite glyph referring
same component twice as a recursive reference. See the discussion
https://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
Thanks to Khaled Hosny for finding this issue.
@ -788,7 +982,7 @@
proper blue zones can't be defined. However, there is already a
proposal submitted to Unicode; see
https://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
Additionally, due to historical reasons, Unicode treats Khutsuri as
the same script as Mkhedruli, and so does OpenType. However, since
@ -979,7 +1173,7 @@
* src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
band clipping from here.
(gray_conic_to, gray_cubic_to): ... to here.
(gray_render_line, gray_render_scanline): Initialize variables closer
(gray_rander_line, gray_render_scanline): Initialize variables closer
to their use.
2016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
@ -1482,7 +1676,7 @@
Still handle `__FTERRORS_H__'.
We need this for backward compatibility.
We need this for backwards compatibility.
Problem reported by John Emmas <johne53@tiscali.co.uk>.
@ -2393,7 +2587,7 @@
* src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
(af_cjk_writing_system_class): Updated.
* src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
* src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
* src/autofit/afindic.c (af_cjk_get_standard_width): New function.
(af_indic_writing_system_class): Updated.
* src/autofit/aflatin.c (af_latin_get_standard_width): New function.
@ -2478,7 +2672,7 @@
Problem reported by David Capello <davidcapello@gmail.com>; see
https://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
for details.
@ -3408,7 +3602,7 @@
[raster,smooth] Microoptimizations.
* src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Bezier_Up): Use do-while loops.
Bezier_Up, ): Use do-while loops.
* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
gray_convert_glyph): Ditto.
@ -3813,7 +4007,7 @@
See
https://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
@ -3932,7 +4126,7 @@
This change is a result of a discussion thread on freetype-devel
https://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
@ -4114,7 +4308,7 @@
Problem reported by Grissiom <chaos.proton@gmail.com>; in
https://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
there is an example code to trigger the bug.
@ -4222,7 +4416,7 @@
[truetype] Support selector index 3 of the INSTCTRL instruction.
This flag activates `native ClearType hinting', disabling backward
This flag activates `native ClearType hinting', disabling backwards
compatibility mode as described in Greg Hitchcocks whitepaper. In
other words, it enables unrestricted functionality of all TrueType
instructions in ClearType.
@ -4292,7 +4486,7 @@
This follows the OpenType 1.7 specification. See
https://tug.org/pipermail/tex-live/2015-April/036634.html
http://tug.org/pipermail/tex-live/2015-April/036634.html
for a discussion.
@ -5447,7 +5641,7 @@
[raster] Remove 5-level gray AA mode from monochrome rasterizer.
It was off by default and couldn't be turned on at runtime. And the
smooth rasterizer superseded it over ten years ago. No point in
smooth rasterizer superceded it over ten years ago. No point in
keeping. Comments suggested that it was there for compatibility
with FreeType 1.
@ -5695,7 +5889,7 @@
----------------------------------------------------------------------------
Copyright (C) 2015-2022 by
Copyright 2015-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -1338,7 +1338,7 @@
(cff_compute_bias): Use `U' for constant.
* src/cid/cidload.c (cid_decrypt): Ditto.
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
* src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
variable.
* src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
@ -1524,7 +1524,7 @@
* src/base/ftcalc.c (FT_DivFix): Fixed a bug in the 64-bit code that
created incorrect scale factors!
(FT_RoundFix, FT_CeilFix, FT_FloorFix): Minor improvements.
(FT_Round_Fix, FT_CeilFix, FT_FloorFix): Minor improvements.
2001-05-12 Werner Lemberg <wl@gnu.org>
@ -1688,7 +1688,7 @@
2001-04-03 Werner Lemberg <wl@gnu.org>
* src/*/Jamfile: Slight changes to make files more cryptic.
* src/*/Jamfile: Slight changes to make files more cryptic.
2001-04-03 Werner Lemberg <wl@gnu.org>
@ -1928,7 +1928,7 @@
* src/autohint/ahtypes.h (AH_Hinter): Add elements
`disable_horz_edges', `disable_vert_edges'.
* src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_hint_edges): Use
* src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_hint_edges): Use
them (and remove static variables with the same names).
* src/pcf/pcfutil.c (BitOrderInvert): Add `const'.
* docs/glnames.py: Updated to latest pstables.h changes.
@ -2109,7 +2109,7 @@
* include/freetype/internal/t2types.h: This file was merged with
cfftypes.h and is no longer necessary.
* include/freetype/internal/t2errors.h: Renamed to cfferrs.h.
* include/freetype/internal/t2errors.h: Renamed to cfferrs.h.
* src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c,
src/cff/cffdrivr.c, src/cff/cff.c, src/cff/cffload.c,
@ -2159,7 +2159,7 @@
* include/freetype/internal/t2types.h,
include/freetype/internal/cfftypes.h: Changed the structures for
CFF_Charset and CFF_Encoding for the new implementations of the
CFF_Encoding and CFF_Encoding for the new implementations of the
charset and encoding parsers in the CFF driver.
* src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode,
@ -2184,11 +2184,11 @@
2000-12-24 Tom Kacvinsky <tkacvins@freetype.org>
* src/cff/t2gload.c (T2_Load_Glyph): Added code so that the font
* src/cff/t2gload.c (T2_Load_Glyph): Added code so that the font
transform is applied.
* src/cff/cffparse.c (cff_parse_font_matrix): Added code so that
the font matrix numbers are scaled by 1/(matrix->yy). Also, the
the font matrix numbers are scaled by 1/(matrix->yy). Also, the
offset vector now contains integer values instead of 16.16 fixed
numbers.
@ -2597,7 +2597,7 @@
----------------------------------------------------------------------------
Copyright (C) 2000-2022 by
Copyright 2000-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -170,7 +170,7 @@
FTC_CACHE_TRYLOOP_END): New macros.
* src/cache/ftccache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c
(ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACHE_TRYLOOP_END.
(ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACE_TRYLOOP_END.
2005-05-23 Werner Lemberg <wl@gnu.org>
@ -553,7 +553,7 @@
(T1_New_Parser): Use it to check font header before allocating
anything on the heap.
* src/type42/t42parse.c (t42_parser_init): Modify functions to check
* src/type42/t42parse.c (t42_parser_init): Modify functions to check
the font header before allocating anything on the heap.
* include/freetype/internal/ftmemory.h (FT_ARRAY_MAX,
@ -617,7 +617,7 @@
`ft_get_adobe_glyph_index', a new function defined in `pstables.h'.
(ps_get_macintosh_name, ps_get_standard_strings): Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Handle fractional sizes
* src/base/ftobjs.c (FT_Set_Char_Sizes): Handle fractional sizes
more carefully. This fixes Savannah bug #12263.
2005-03-06 David Turner <david@freetype.org>
@ -1819,7 +1819,7 @@
2004-08-11 Detlef Würkner <TetiSoft@apg.lahn.de>
* src/base/ftrfork.c (FT_Raccess_Guess)
[!FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK]: Remove compiler
[!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler
warnings.
2004-08-06 Adam Piotrowski <st_intel@poczta.onet.pl>
@ -2101,7 +2101,7 @@
2004-06-08 David Turner <david@freetype.org>
* include/freetype/freetype.h (FT_Glyph_Metrics): Move `lsb_delta'
* include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta'
and `rsb_delta' elements to...
(FT_GlyphSlotRec): Here to retain binary compatibility with older
FreeType versions.
@ -2528,7 +2528,7 @@
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Support GX var fonts.
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
@ -2864,7 +2864,7 @@
(psh_blues_snap_stem): Don't use blue_shift but blue_threshold.
* src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro.
(psh_glyph_find_strong_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
(psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
(psh_glyph_find_blue_points): New function. Needed for fonts like
p052003l.pfb (URW Palladio L Roman) which have flex curves at the
base line within blue zones, but the flex curves aren't covered by
@ -3361,7 +3361,7 @@
* src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H.
(FT_Outline_GetOutsideBorder): Inverse result.
(FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New
(FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New
functions.
(FT_Stroker_EndSubPath): Close path if needed.
(FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind.
@ -3493,8 +3493,8 @@
2003-12-23 David Turner <david@freetype.org>
* include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND,
FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_PIX_CEIL): New macros.
They are used to avoid compiler warnings with very pedantic compilers.
FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros. They
are used to avoid compiler warnings with very pedantic compilers.
Note that `(x) & -64' causes a warning if (x) is not signed. Use
`(x) & ~63' instead!
Updated all related code.
@ -4231,7 +4231,7 @@
(t42_parse_encoding): Use `ft_isdigit'.
* src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_Ok if
* src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if
success.
2003-10-05 Werner Lemberg <wl@gnu.org>
@ -4355,7 +4355,7 @@
new POSTSCRIPT_NAMES service.
* src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode,
t1_decode_init): Use new POSTSCRIPT_NAMES service.
* src/psaux/t1cmap.h, src/psaux/t1decode.h: Don't include
* src/psaux/t1cmap.h, src/psaux/t1decode.h: Dont' include
FT_INTERNAL_POSTSCRIPT_NAMES_H.
* src/psnames/psmodule.c: Don't include
@ -4749,7 +4749,8 @@
* include/freetype/ttunpat.h: Fixing documentation comment.
* include/freetype/config/ftoption.h, devel/ftoption.h
(TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING): Replaced with...
(TT_CONFIG_OPTION_OPTION_COMPILE_UNPATENTED_HINTING): Replaced
with...
(TT_CONFIG_OPTION_UNPATENTED_HINTING): This. Updated all users.
(TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed.
@ -4799,11 +4800,11 @@
(chapter_inter, chapter_footer): Add <li> and use special <ul>
class.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font color directly
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
color.
(code_header, code_footer): Don't change font color directly but
colour.
(code_header, code_footer): Don't change font colour directly but
use a special <pre> class.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
@ -5023,7 +5024,7 @@
drivers.
* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
(FT_Set_Pixel_Sizes): Assign value to `metrics' after validation of
(FT_Set_Pixel_Size): Assign value to `metrics' after validation of
arguments.
2003-06-20 Werner Lemberg <wl@gnu.org>
@ -5199,7 +5200,7 @@
* src/cid/cidload.c (cid_load_keyword): Handle
T1_FIELD_LOCATION_BBOX.
(parse_font_bbox): Commented out.
(cid_field_records): Comment out element for parsing FontBBox.
(cid_field_record): Comment out element for parsing FontBBox.
* src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
(t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
@ -5915,7 +5916,7 @@
2003-04-23 Werner Lemberg <wl@gnu.org>
* src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
instead of FT_UInt for `len'.
instead of FT_Uint for `len'.
2003-04-22 Werner Lemberg <wl@gnu.org>
@ -6549,7 +6550,7 @@
* src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that
caused problems with embedded bitmaps.
* src/otlayout/otlayout.h, src/otlayout/otlconf.h,
* src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
src/otlayout/otlgsub.c, src/otlayout/otlgsub.h,
src/otlayout/otlparse.c, src/otlayout/otlparse.h,
src/otlayout/otlutils.h: Updating the OpenType Layout code, adding
@ -6995,7 +6996,7 @@
2002-09-08 David Turner <david@freetype.org>
Various updates to correctly support subpixel rendering.
Various updates to correctly support sub-pixel rendering.
* include/freetype/config/ftmodule.h: Add two renderers for LCD.
@ -7238,7 +7239,7 @@
(ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v):
New functions.
(ft_smooth_lcd_renderer_class, ft_smooth_lcdv_renderer_class): New
(ft_smooth_locd_renderer_class, ft_smooth_lcdv_renderer_class): New
classes.
* src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to...
@ -7375,7 +7376,7 @@
* src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
horiBearingX.
* src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix computation of
* src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
horiBearingY.
2002-08-16 George Williams <gww@silcom.com>
@ -7580,7 +7581,7 @@
* include/freetype/cache/ftccache.h, src/cache/ftccache.i,
src/cache/ftccache.c [!FTC_CACHE_USE_LINEAR_HASHING]: Removed.
(FTC_CACHE_USE_LINEAR_HASHING): Removed also.
(FTC_CACHE_USE_LINEAR_HASHING: Removed also.
FT_CONFIG_OPTION_USE_CMAPS is now the default.
@ -7602,7 +7603,7 @@
* src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char):
Removed.
(t1cid_driver_class): Updated.
(t1_cid_driver_class): Updated.
* src/truetype/ttdriver.c (tt_driver_class): Updated.
* src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Removed
(t1_driver_class): Updated.
@ -7697,7 +7698,7 @@
CFF_Done_SubFont -> cff_subfont_done
CFF_Load_Font -> cff_font_load
CFF_Done_Font -> cff_font_done
CFF_Size_Get_Globals_Funcs -> cff_size_get_globals_funcs
CFF_Size_Get_Global_Funcs -> cff_size_get_global_funcs
CFF_Size_Done -> cff_size_done
CFF_Size_Init -> cff_size_init
CFF_Size_Reset -> cff_size_reset
@ -8635,7 +8636,7 @@
src/pfr/*: New files.
* include/freetype/config/ftmodule.h,
include/freetype/internal/fttrace.h, src/Jamfile: Updated.
include/freetype/internal/fttrace.h, src/Jamefile: Updated.
* src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c
(T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback
@ -9062,7 +9063,7 @@
FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
* src/base/ftapi.c: New file. It contains backward compatibility
* src/base/ftapi.c: New file. It contains backwards compatibility
functions.
* include/freetype/internal/psaux.h, src/cid/cidload.c,
@ -9105,7 +9106,7 @@
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Globals_Funcs, CFF_Size_Init,
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
@ -9246,7 +9247,7 @@
{
} PS_StructRec, *PS_Struct;
typedef PS_StructRec T1_Struct; /* backward compatibility */
typedef PS_StructRec T1_Struct; /* backwards-compatibility */
Hence, we increase the coherency of the source code by effectively
using the `Rec' prefix for structure types.
@ -9383,7 +9384,7 @@
* src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
(pcf_get_bitmaps): The same for `sizebitmaps'.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): The same for
* src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
`orig_y'.
(t1operator_seac): Comment out more dead code.
* src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
@ -9422,7 +9423,7 @@
----------------------------------------------------------------------------
Copyright (C) 2002-2022 by
Copyright 2002-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -189,7 +189,7 @@
* src/base/ftdbgmem.c (_ft_debug_file, _ft_debug_lineno)
[FT_DEBUG_MEMORY]: New global variables, replacing...
(FT_MemTableRec) [FT_DEBUG_MEMORY]: Remove `filename' and
(FT_MemTable_Rec) [FT_DEBUG_MEMORY]: Remove `filename' and
`line_no'. Update all callers.
(ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer
overflow.
@ -494,7 +494,7 @@
FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done,
FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection):
Declare as FT_LOCAL_DEF.
(FTC_MruList_Find, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
(FTC_MruListFind, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
conditionally.
Declare as FT_LOCAL_DEF.
@ -605,14 +605,14 @@
* docs/release: Minor additions and clarifications.
* docs/CHANGES: Updated to reflect many fixes for backward
* docs/CHANGES: Updated to reflect many fixes for backwards
compatibility. Still incomplete.
2006-02-26 David Turner <david@freetype.org>
* src/base/ftobjs.c (ft_recompute_scaled_metrics): Re-enable
conservative rounding of metrics to avoid breaking clients like
Pango (see https://bugzilla.gnome.org/show_bug.cgi?id=327852).
Pango (see http://bugzilla.gnome.org/show_bug.cgi?id=327852).
2006-02-25 Werner Lemberg <wl@gnu.org>
@ -814,7 +814,7 @@
* include/freetype/ftcache.h (FTC_IMAGE_TYPE_COMPARE,
FTC_IMAGE_TYPE_HASH), src/cache/ftcbasic.c (FTC_OldFontRec,
FTC_OldImageDescRec, FTC_ImageCache_Lookup, FTC_Image_Cache_New,
FTC_OldImageDesc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
FTC_OldImage_Desc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
ftc_image_type_from_old_desc, FTC_Image_Cache_Lookup,
FTC_SBitCache_Lookup, FTC_SBit_Cache_New, FTC_SBit_Cache_Lookup)
[FT_CONFIG_OPTION_OLD_INTERNALS]: Try to revive old functions of the
@ -2318,7 +2318,7 @@
Further information on the SING Glyphlet format can be found at:
https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf
http://www.adobe.com/products/indesign/sing_gaiji.html
* include/freetype/tttags.h (TTAG_SING, TTAG_META): New macros for
the OpenType tables `SING' and `META'. These two tables are used in
@ -2458,8 +2458,8 @@
* src/gxvalid/gxvbsln.c (GXV_BSLN_VALUE_EMPTY): Add `U'.
* src/gxvalid/gxvmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
src/gxvalid/gxvmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
* src/gxvalid/gxmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
src/gxvalid/gxmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
typo.
* src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
@ -2787,7 +2787,7 @@
2005-06-15 Kirill Smelkov <kirr@mns.spb.ru>
The next release will be 2.2.0, so don't worry about source code
backward compatibility.
backwards compatibility.
* include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
@ -2821,7 +2821,7 @@
----------------------------------------------------------------------------
Copyright (C) 2005-2022 by
Copyright 2005-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -43,7 +43,7 @@
* src/base/ftoutln.c (FT_Outline_New_Internal): The length of
FT_Outline->points[] should be numPoints, not 2 * numPoints.
Found by Paul Messmer, see
https://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
2010-02-10 Ken Sharp <ken.sharp@artifex.com>
@ -108,7 +108,7 @@
Preferred family names should be used for legacy systems that
can hold only a few faces (<= 4) for a family name. Suggested by
Andreas Heinrich.
https://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
* include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define.
@ -607,7 +607,7 @@
(ft_black_render): Initialize `worker->gray_lines' (problem found by
valgrind).
(FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Don't #undef, just
(FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
comment out.
2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -631,7 +631,7 @@
The issue of incompatible cast between unsigned long and void*
on LLP64 platform is reported by NightStrike from MinGW-Win64
project. See
https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
* src/bdf/bdf.h: The type of hashnode->data is changed from
void* to size_t.
@ -657,7 +657,7 @@
On LLP64 platform, the conversion from pointer to FT_Fixed need
to drop higher 32-bit. Explicit casts are required. Reported by
NightStrike from MinGW-w64 project. See
https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
* src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
@ -671,7 +671,7 @@
* src/raster/rules.mk: Don't handle ftmisc.h. It is needed for
stand-alone mode only.
* src/raster/ftmisc.h (FT_MemoryRec, FT_Alloc_Func, FT_Free_Func,
* src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
FT_Realloc_Func): Copy declarations from ftsystem.h.
2009-09-02 Bram Tassyns <bramt@enfocus.be>
@ -750,7 +750,7 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
* src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
tt_cmap14_variant_chars): Correct mismatches from
@ -864,7 +864,7 @@
LP64 systems: Higher bits are not used.
16-bit systems: Drop can occur.
See
https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
These functions will be refined to take FT_ULong flags in
next bump with incompatible API change.
@ -929,7 +929,7 @@
type1: Fix a data type mismatching with its source.
* include/freetype/internal/t1types.h: The type of
T1_Face->buildchar is matched with T1_Decoder->top.
T1_Face->buildchar is matched with T1_Decorder->top.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -944,7 +944,7 @@
pfr: Fix a data type mismatching with its source.
* src/pfr/pfrtypes.h: The type of PFR_PhyFont->chars_offset
* src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
is extended from FT_UInt32 to FT_Offset, because it is
calculated with the pointer difference in pfr_phy_font_load().
@ -975,8 +975,8 @@
psaux: Fix a data type mismatching with its source.
* include/freetype/internal/psaux.h: The type of
T1_DecoderRec.buildchar is matched with
T1_DecoderRec.top.
T1_DecorderRec.buildchar is matched with
T1_DecorderRec.top.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -1344,24 +1344,24 @@
* include/freetype/config/ftstdlib.h: Introduce
FT_INT_MIN, to use in signed integer overflow in
16-bit and 64-bit platforms.
* include/freetype/internal/fttrace.h: Add a tracer
to ftsynth.c.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Check
invalid strength causing integer overflow on 16-bit
platform.
* src/base/ftcalc.c (ft_corner_orientation): Change
the internal calculation from FT_Int to FT_Long, to
avoid an overflow on 16-bit platforms. The caller of
this function should use only the sign of result,
so the cast to FT_Int is acceptable.
* src/base/ftsynth.c: Introduce a tracer for synth module.
(FT_GlyphSlot_Embolden): Check invalid strength causing
integer overflow on 16-bit platform.
* src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index
in FT2 API is typed as FT_UInt, although BDF driver
can handle unsigned long glyph index internally. To
@ -1372,25 +1372,25 @@
glyph pitch internally. To avoid integer overflow on
16-bit platform, too large glyph pitch should not be
returned.
* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph
pitch in FT2 is typed as FT_UInt, although PFR font
format can include huge bitmap glyph with 24-bit pitch
(however, a glyph spends 16.7 pixel, it's not realistic).
To avoid integer overflow on 16-bit platform, huge
bitmap glyph should be excluded.
* src/smooth/ftgrays.c (gray_hline): As FT_Span.x is
truncated to fit its type (16-bit short), FT_Span.y
should be truncated to fit its type (FT_Int).
* src/cff/cffdrivr.c (cff_get_ros): CFF specification
defines the supplement in ROS as a real number.
Truncate it to fit public FT2 API.
* src/cff/cffparse.c (cff_parse_cid_ros): Warn the
supplement if it is truncated or rounded in cff_get_ros().
* src/cff/cfftypes.h: Change the type of internal variable
`supplement' from FT_Long to FT_ULong to fit the signedness
to the type in public API.
@ -1653,7 +1653,7 @@
cff: Fix some data types mismatching with their sources.
* src/cff/cffgload.c (cff_slot_load): The types of
* src/cff/cffgload.c (cff_slot_load): The types of
`top_upm' and `sub_upm' are matched with
CFF_FontRecDict->units_per_em.
@ -1765,7 +1765,7 @@
ftgzip.c by FT2 are enabled by default. To use
zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
See discussion:
https://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -1811,56 +1811,56 @@
gxv_XClassTable_lookupval_validate,
gxv_XClassTable_lookupfmt4_transit):
Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
* src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
gxv_bsln_LookupFmt4_transit): Ditto.
* src/gxvalid/gxvjust.c
(gxv_just_pcTable_LookupValue_entry_validate,
gxv_just_classTable_entry_validate,
gxv_just_wdcTable_LookupValue_validate): Ditto.
* src/gxvalid/gxvkern.c
(gxv_kern_subtable_fmt1_entry_validate): Ditto.
* src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate,
gxv_lcar_LookupFmt4_transit): Ditto.
* src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate,
gxv_opbd_LookupFmt4_transit): Ditto.
* src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate,
gxv_prop_LookupFmt4_transit): Ditto.
* src/gxvalid/gxvmort4.c
(gxv_mort_subtable_type4_lookupval_validate): Ditto.
* src/gxvalid/gxvmort0.c
(gxv_mort_subtable_type0_entry_validate): Update
from GXV_StateTable_GlyphOffsetDesc
to GXV_StateTable_GlyphOffsetCPtr.
* src/gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_entry_validate): Ditto.
* src/gxvalid/gxvmort2.c
(gxv_mort_subtable_type2_entry_validate): Ditto.
* src/gxvalid/gxvmort5.c
(gxv_mort_subtable_type5_entry_validate): Ditto.
* src/gxvalid/gxvmorx2.c
(gxv_morx_subtable_type2_entry_validate): Ditto.
* src/gxvalid/gxvmorx5.c
(gxv_morx_subtable_type5_entry_validate): Ditto.
* src/gxvalid/gxvmorx1.c
(gxv_morx_subtable_type1_entry_validate): Ditto.
(gxv_morx_subtable_type1_LookupValue_validate,
gxv_morx_subtable_type1_LookupFmt4_transit):
Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
* src/gxvalid/gxvmorx0.c
(gxv_morx_subtable_type0_entry_validate): Update
from GXV_XStateTable_GlyphOffsetDesc
@ -1904,7 +1904,7 @@
2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Borland C++ compiler patch proposed by Mirco Babin.
https://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
* builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
@ -1929,7 +1929,7 @@
* src/tools/chktrcmp.py: A script to check trace_XXXX macros
that are used in C source but undefined in fttrace.h, or
defined in fttrace.h but unused in C sources. See
https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
* docs/DEBUG: Mention on chktrcmp.py.
* docs/release: Ditto.
@ -1961,7 +1961,7 @@
* include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
and FT_TRACE_DEF( ttbdf ). See
https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -1975,8 +1975,8 @@
Prevent the overflows by a glyph with too many points or contours.
The bug is reported by Boris Letocha <b.letocha@gmc.net>. See
https://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
* include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
@ -2001,7 +2001,7 @@
2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
ftpatent: Fix a bug by wrong usage of service->table_info().
https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
* include/freetype/internal/services/svsfnt.h: Extend
FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
@ -2069,7 +2069,7 @@
* builds/unix/configure.raw: Fix a bug in sed script to extract
native suffix for binary executables, patch by Peter Breitenlohner.
https://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
2009-06-26 Werner Lemberg <wl@gnu.org>
@ -2125,7 +2125,7 @@
code unconditionally.
Add support for random numbers and update remaining code
accordingly; this should work now.
(t1operator_seac): Updated.
(t1_operator_seac): Updated.
* src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
(ps_hints_t1stem3, t1_hints_stem): Updated.
@ -2594,14 +2594,14 @@
Position Independent Code (PIC) support in smooth renderer.
* src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class
ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
using macros from ftrender.h,
when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
and ft_smooth_lcdv_renderer_class
and ft_smooth_lcd_v_renderer_class
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from ftspic.h in order to access
@ -3469,8 +3469,8 @@
faces includes broken face which FT_Done_Face() cannot free,
FT_Done_Library() retries FT_Done_Face() and it can fall into
an endless loop. See the discussion:
https://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
https://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
2009-01-07 Werner Lemberg <wl@gnu.org>
@ -3492,7 +3492,7 @@
* builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
AC_CANONICAL_TARGET and use $host_os only. A nice explanation for
this change can be found at
https://blog.flameeyes.eu/s/canonical-target.
http://blog.flameeyes.eu/s/canonical-target.
From Savannah patch #6712.
@ -4156,7 +4156,7 @@
2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
ApplicationServices framework is missing. Although this value is not
ApplicationService framework is missing. Although this value is not
used in building of FreeType2, it is written in `freetype2.pc' and
`freetype-config'.
@ -4516,7 +4516,7 @@
recommends to add the option only to CFLAGS, LDFLAGS should include
it because libfreetype.la is built with -no-undefined. This fixes a
bug reported by Ryan Schmidt in MacPorts,
https://trac.macports.org/ticket/15331.
http://trac.macports.org/ticket/15331.
2008-06-21 Werner Lemberg <wl@gnu.org>
@ -4861,7 +4861,7 @@
2008-04-14 Werner Lemberg <wl@gnu.org>
* src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to
`FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZW'. From Savannah
`FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'. From Savannah
bug #22909.
2008-04-13 Werner Lemberg <wl@gnu.org>
@ -5243,7 +5243,7 @@
functions related to cmap type 14 support to the
`FT_Object_ActionName' scheme:
FT_Get_Char_Variant_Index -> FT_Face_GetCharVariantIndex
FT_Get_Char_Variant_index -> FT_Face_GetCharVariantIndex
FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault
FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors
FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar
@ -5383,7 +5383,7 @@
* include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
(FT_VALIDATE_OT): Updated.
* src/otvalid/otvmath.c: New file.
* src/otvalid/otmath.c: New file.
* src/otvalid/otvalid.c: Include otvmath.c.
* src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
@ -5530,7 +5530,7 @@
* src/truetype/ttinterp.c (Ins_IUP): Add missing variable
initialization.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Get rid of an
* src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
infinite loop in the case of degenerate fonts.
2007-06-26 Rahul Bhalerao <b.rahul.pm@gmail.com>
@ -5965,7 +5965,7 @@
* include/freetype/config/ftstdlib.h,
include/freetype/internal/ftobjs.h: As suggested by Graham Asher,
ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values
instead of relying on the locale-dependent functions provided by
instead on relying on the locale-dependent functions provided by
<ctypes.h>.
2007-05-15 Graham Asher <graham.asher@btinternet.com>
@ -6187,13 +6187,13 @@
* builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent
32bit unsigned long overflow by 64bit filesize on LP64 platform, as
proposed by Sean McBride:
https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* builds/unix/ftconfig.in: Suppress SGI compiler's warning against
setjmp, proposed by Sean McBride:
https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -6852,7 +6852,7 @@
* include/freetype/internal/services/svotval.h: Add `volatile' to
sync with the modification by Jens Claudius on 2006-08-22; cf.
https://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -6876,7 +6876,7 @@
* src/base/ftobjs.c: Improvement of resource fork handler for
POSIX, cf.
https://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
(Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
format or .dfont, to simulate the face index number counted by ftmac.c.
(IsMacResource): Return the number of scalable faces correctly.
@ -6948,7 +6948,7 @@
2006-11-25 David Turner <david@freetype.org>
* src/autofit/afhints.c (af_glyph_hints_dump_points,
* src/autofit/afhints.c (af_glyph_hints_dump_points,
af_glyph_hints_dump_segments, af_glyph_hints_dumpedges) [!AF_DEBUG]:
Add stubs to link the `ftgrid' test program when debugging is
disabled in the auto-hinter.
@ -7023,7 +7023,7 @@
(_ft_lcd_filter_fir): This.
Update parameters.
(_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
(FT_Library_SetLcdFilter): Update parameters.
(FT_Library_Set_LcdFilter): Update parameters.
Handle new filter modes.
* include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
@ -7366,7 +7366,7 @@
to recognize a few fonts that require the automatic unpatented
loader.
* src/smooth/ftgrays.c: Optimize the performance of the anti-aliased
* src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
rasterizer. The speed improvement is between 15% and 25%, depending
on the font data.
@ -7524,7 +7524,7 @@
`ft_validator_run' wrapping `setjmp' can cause a crash, as found by
Jens:
https://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
* src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'.
It reverts the change introduced on 2005-08-20.
@ -7721,7 +7721,7 @@
2006-06-24 Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
Fix two hinting bugs as reported in
https://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
* include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
`first_point' member.
@ -7761,7 +7761,7 @@
should return `FT_Err_Unimplemented_Feature' if validation service
is unavailable (disabled in `modules.cfg'). It is originally
suggested by David Turner, cf.
https://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
* src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return
FT_Err_Unimplemented_Feature if TrueTypeGX validation service is
@ -7857,7 +7857,7 @@
2006-05-18 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (TT_Load_Composite_Glyph)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
[FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
2006-05-17 David Turner <david@freetype.org>
@ -7932,7 +7932,7 @@
----------------------------------------------------------------------------
Copyright (C) 2006-2022 by
Copyright 2006-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -231,7 +231,7 @@
* src/base/md5.c, src/base/md5.h: New files, taken from
https://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
* include/freetype/internal/fttrace.h: Add `bitmap'.
@ -335,7 +335,7 @@
* include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
The previous version was not backward compatible. Reported by
The previous version was not backwards compatible. Reported by
Behdad.
2013-03-14 Werner Lemberg <wl@gnu.org>
@ -744,7 +744,7 @@
2013-01-16 David 'Digit' Turner <digit@google.com>
[truetype] Improve subpixel code.
[truetype] Improve sub-pixel code.
This patches fixes many issues with the ttsubpix implementation.
@ -774,7 +774,7 @@
(Font_Class): Rename to...
(SPH_Font_Class): This. Decorate with `const' where appropriate.
* src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak):
Decorate arguments with `const' where appropriate.
@ -784,7 +784,7 @@
and `const' where appropriate.
(X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
(sph_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
(spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
Update all users.
2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
@ -1271,7 +1271,7 @@
* src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it.
(af_cjk_metrics_init, af_cjk_script_class): Updated.
* src/autofit/afindic.c (af_indic_metrics_init,
* src/autofit/afindic.c (af_indic_metrics_init,
af_indic_script_class): Updated.
* src/autofit/afcjk.h, src/autofit/aflatin.h: Updated.
@ -1860,10 +1860,10 @@
Fix `checking if gcc static flag -static works' test.
On my linux build tree, I receive yes answer in every package I
build except FreeType for this test checking if gcc static flag
build except freetype for this test checking if gcc static flag
`-static' works
In FreeType, no is received, unless bzip2 and zlib are disabled using
On freetype, no is received, unless bzip2 and zlib are disabled using
./configure --without-bzip2 --without-zlib
@ -1977,7 +1977,7 @@
Most of the code is based on the ClearType whitepaper written by
Greg Hitchcock
https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
which gives a detailed overview of the necessary changes to the
Microsoft rasterizer so that older fonts are supported. However, a
@ -2103,7 +2103,7 @@
NEC FA family dated in 1996 have different checksum.
Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see
https://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
http://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets
of fpgm & prep table checksums for FA-Gothic, FA-Minchou,
@ -2117,7 +2117,7 @@
Problem reported by jola <hans-jochen.lau@lhsystems.com>; see
https://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html
* src/raster/ftraster.c (SMulDiv_No_Round): New macro.
(Line_Up): Use it.
@ -2141,7 +2141,7 @@
* include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
simplified emboldening algorithm.
simplified embolding algorithm.
(FT_Outline_Embolden): Make it a special case of
`FT_Outline_EmboldenXY'
@ -2603,7 +2603,7 @@
See discussion starting at
https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html
* src/smooth/ftgrays.c: s/TBand/gray_TBand/.
* src/raster/ftraster.c: s/TBand/black_TBand/.
@ -2616,7 +2616,7 @@
`outline.flags' so that this information is preserved. See
discussion starting at
https://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
2012-02-11 Werner Lemberg <wl@gnu.org>
@ -2677,7 +2677,7 @@
[raccess] Modify for PIC build.
Based on the patch provided by Erik Dahlstrom <ed@opera.com>,
https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html
Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()'
are renamed with `ft_' suffixes.
@ -2941,10 +2941,10 @@
[type42] Remove casts.
* src/type42/t42drivr.c (t42_driver_class): Remove all casts and
* src/type42/t42driver.c (t42_driver_class): Remove all casts and
update affected functions.
* src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42 driver
* src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
changes.
2011-11-30 Werner Lemberg <wl@gnu.org>
@ -3127,7 +3127,7 @@
According to
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
this should be mentioned explicitly.
@ -3456,7 +3456,7 @@
See
https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
for some comparison images.
@ -3556,7 +3556,7 @@
See
https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html
for example documents. The FreeType stroker now produces results
very similar to that produced by GhostScript and Distiller for these
@ -3776,7 +3776,7 @@
[gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
* src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
Check different entries pointing same tracking value.
Check different entries pointing same traking value.
(gxv_trak_validate): Remove unused variable `table_size'.
2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -3788,12 +3788,12 @@
(gxv_morx_chain_validate): Conditionalize unvalidated
variable `defaultFlags'.
* src/gxvalid/gxvmorx0.c
* src/gxvalid/gxmorx0.c
(gxv_morx_subtable_type0_entry_validate):
Conditionalize unvalidated variables; `markFirst',
`dontAdvance', `markLast', `verb'.
* src/gxvalid/gxvmorx1.c
* src/gxvalid/gxmorx1.c
(gxv_morx_subtable_type1_entry_validate): Conditionalize
unvalidated variables; `setMark', `dontAdvance'.
@ -3826,11 +3826,11 @@
(gxv_mort_chain_validate): Conditionalize unvalidated
variable `defaultFlags'.
* src/gxvalid/gxvmort0.c
* src/gxvalid/gxmort0.c
(gxv_mort_subtable_type0_entry_validate): Check the
conflict of the marks for the glyphs.
* src/gxvalid/gxvmort1.c
* src/gxvalid/gxmort1.c
(gxv_mort_subtable_type1_offset_to_subst_validate):
Local variables `min_gid', `max_gid' are replaced by
variables in the validator.
@ -4005,9 +4005,9 @@
aligned, bluezones for CJK Ideographs are calculated from
sample glyphs. At present, vertical bluezones (bluezones
to align vertical stems) are disabled by default. For detail, see
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
https://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
* include/freetype/internal/fttrace.h: New trace component `afcjk'.
* src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
@ -4029,7 +4029,7 @@
af_latin_hints_compute_blue_edges.
(af_cjk_metrics_init_blues): New function, CJK version of
af_latin_metrics_init_blues.
(af_cjk_hint_edges): Add code to align the edge stems to blue zones.
(af_cjk_hints_edges): Add code to align the edge stems to blue zones.
* src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
@ -4075,8 +4075,8 @@
the TrueType font header. Some bad PDF generators write
wrong values. For details see examples and benchmark tests
of the latency by recalculation:
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -4109,7 +4109,7 @@
Because some PDF generators mangle the family name badly,
the trickyness check by the checksum should be invoked always.
For sample PDF, see
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
* src/truetype/ttobjs.c (tt_check_trickyness): Even when
tt_check_trickyness_family() finds no trickyness,
@ -4146,8 +4146,8 @@
When there are too many stems to preserve their gaps in the
rasterization of CJK Ideographs at a low resolution, blur the
stems instead of showing clumped stems. See
https://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
for details.
* src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
@ -4343,7 +4343,7 @@
[cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
Found by <ychen1392001@yahoo.com.cn>, see detail in
https://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
* src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
buckets[cache->p + cache->mask] too.
@ -4464,7 +4464,7 @@
Johnson Y. Yan. The bug report by Qt developers is
considered too.
https://bugreports.qt.io/browse/QTBUG-6521
http://bugreports.qt.nokia.com/browse/QTBUG-6521
2011-01-15 Werner Lemberg <wl@gnu.org>
@ -4923,7 +4923,7 @@
Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
been tested with demo images sent to the mailing list. See
https://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
and later mails in this thread.
@ -4943,7 +4943,7 @@
Problem reported by Tom Bishop <wenlin@wenlin.com>; see
thread starting with
https://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
* src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
since the involved multiplication exceeds 32 bits.
@ -5007,7 +5007,7 @@
normal clients.
For the history of these macros, see the investigation:
https://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -5054,7 +5054,7 @@
by Darwin VFS are skipped. It reduces the warnings of the
deprecated resource fork access method by recent Darwin kernel.
Fix MacPorts ticket #18859:
https://trac.macports.org/ticket/18859
http://trac.macports.org/ticket/18859
* src/base/ftobjs.c (load_face_in_embedded_rfork):
When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
@ -5182,7 +5182,7 @@
[smooth] Fix splitting of cubics for negative values.
Reported by Róbert Márki <gsmiko@gmail.com>; see
https://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
* src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
@ -5349,7 +5349,7 @@
Ignore the environmental setting of LIBTOOL.
Patch is suggested by Adrian Bunk, to prevent unexpected
reflection of environmental LIBTOOL. See:
https://savannah.nongnu.org/patch/?7290
http://savannah.nongnu.org/patch/?7290
* builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
$(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
@ -5406,8 +5406,8 @@
for nameless fonts is safer for PDFs including embedded Chinese
fonts. Written by David Bevan, see:
https://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
https://lists.freedesktop.org/archives/poppler/2010-August/006310.html
http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
* src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
nameless font is given, TRUE is returned to enable hinting.
@ -5669,7 +5669,7 @@
Use defined macros to set {platform,encoding}_id.
* src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
set charmap.{platform,encoding}_id.
set charmap.{platfom,encoding}_id.
* src/pcf/pcfdrivr.c: Ditto.
* src/winfonts/winfnt.c: Ditto.
* src/type1/t1objs.c: Ditto.
@ -5792,8 +5792,8 @@
* src/cff/cffobjs.c (cff_face_init): Check error value by
`FT_CMap_New'.
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
* src/type1/t1objs.c (T1_Face_Init): Ditto.
* src/type42/t42objs.c (T42_Face_Init): Ditto.
* src/type1/t1jobjs.c (T1_Face_Init): Ditto.
* src/type42/t42jobjs.c (T42_Face_Init): Ditto.
2010-07-03 Werner Lemberg <wl@gnu.org>
@ -5968,7 +5968,7 @@
* src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
The previous version was too aggressive, as demonstrated in
https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
2010-06-24 Werner Lemberg <wl@gnu.org>
@ -6065,7 +6065,7 @@
simplified algorithm to find out whether the spline can be replaced
with two straight lines. See this thread for more:
https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
2010-06-09 Werner Lemberg <wl@gnu.org>
@ -6220,7 +6220,7 @@
Add new function `FT_Library_SetLcdFilterWeights'.
This is based on code written by Lifter
<https://unixforum.org/index.php?showuser=11691>. It fixes
<http://unixforum.org/index.php?showuser=11691>. It fixes
FreeDesktop bug #27386.
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
@ -6344,7 +6344,7 @@
----------------------------------------------------------------------------
Copyright (C) 2010-2022 by
Copyright 2010-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

View File

@ -112,8 +112,8 @@
Original patch is designed by Werner Lemberg. Extra part
for otvalid and gxvalid are added by suzuki toshiya, see
discussion:
https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
* include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
* src/gxvalid/gxvcommn.h: Ditto.
@ -144,7 +144,7 @@
for Borland's bug tracker entry.
Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
https://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
* include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
(gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
@ -244,7 +244,7 @@
All public FreeType enumeration and flag values are uppercase...
* include/tttables.h (FT_Sfnt_Tag): Implement it. For backward
* include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
compatibility, retain the old values as macros.
* src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
@ -1223,7 +1223,7 @@
2014-10-14 Werner Lemberg <wl@gnu.org>
[autofit] Adjust Devanagari character range.
[autofit] Adjust Devenagari character range.
* src/autofit/afranges.c (af_deva_uniranges): Omit characters that
are common to all other Indic scripts.
@ -2116,7 +2116,7 @@
builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
HarfBuzz.
* docs/INSTALL.UNIX: Document interdependency of FreeType with
* docs/INSTALL.UNIX: Document interdependency of Freetype with
HarfBuzz.
2014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
@ -2669,8 +2669,8 @@
with Carbon framework is incompatible with that by FreeType 2
without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
https://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
https://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
`sort_by_res_id' to control the fragmented resource ordering.
@ -3181,7 +3181,7 @@
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
https://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
for details.
@ -3405,7 +3405,7 @@
The canonical URL to get updates for this file is
https://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
as the author told me in private communication.
@ -3556,7 +3556,7 @@
Suggested by Akira Tagoh, see
https://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
* src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
error if the font could be opened but non-zero `face_index' is
@ -4767,7 +4767,7 @@
* src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
* src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
* src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast.
* src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
* src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
* src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
@ -4837,7 +4837,7 @@
Apply fixes for cppcheck nitpicks.
https://cppcheck.sourceforge.net/
http://cppcheck.sourceforge.net/
The call was (from the top-level of the FreeType tree):
@ -5145,7 +5145,7 @@
----------------------------------------------------------------------------
Copyright (C) 2013-2022 by
Copyright 2013-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

222
Jamfile Normal file
View File

@ -0,0 +1,222 @@
# FreeType 2 top Jamfile.
#
# Copyright 2001-2016 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.
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
# files.
#
# We can compile FreeType 2 with classic Jam however thanks to
# the following code
#
if ! $(JAM_TOOLSET)
{
rule HDRMACRO
{
# nothing
}
}
# We need to invoke a SubDir rule if the FT2 source directory top is not the
# current directory. This allows us to build FreeType 2 as part of a larger
# project easily.
#
if $(FT2_TOP) != $(DOT)
{
SubDir FT2_TOP ;
}
# The following macros define the include directory, the source directory,
# and the final library name (without library extensions). They can be
# replaced by other definitions when the library is compiled as part of
# a larger project.
#
# Name of FreeType include directory during compilation.
# This is relative to FT2_TOP.
#
FT2_INCLUDE_DIR ?= include ;
# Name of FreeType source directory during compilation.
# This is relative to FT2_TOP.
#
FT2_SRC_DIR ?= src ;
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
# the location of a custom <ft2build.h> which will point to custom
# versions of `ftmodule.h' and `ftoption.h', for example.
#
FT2_BUILD_INCLUDE ?= ;
# The list of modules to compile on any given build of the library.
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
#
# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= autofit # auto-fitter
base # base component (public APIs)
bdf # BDF font driver
bzip2 # support for bzip2-compressed PCF font
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
gzip # support for gzip-compressed PCF font
lzw # support for LZW-compressed PCF font
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
pshinter # PostScript hinter module
psnames # PostScript names handling
raster # monochrome rasterizer
sfnt # SFNT-based format support routines
smooth # anti-aliased rasterizer
truetype # TrueType font driver
type1 # PostScript Type 1 font driver
type42 # PostScript Type 42 (embedded TrueType) driver
winfonts # Windows FON/FNT font driver
;
# Don't touch.
#
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
# Location of API Reference Documentation
#
if $(DOC_DIR)
{
DOC_DIR = $(DOCDIR:T) ;
}
else
{
DOC_DIR = docs/reference ;
}
# Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
CCFLAGS += -DDEBUG_HINTER ;
}
# We need `include' in the current include path in order to
# compile any part of FreeType 2.
#
HDRS += $(FT2_INCLUDE) ;
# We need to #define FT2_BUILD_LIBRARY so that our sources find the
# internal headers
#
CCFLAGS += -DFT2_BUILD_LIBRARY ;
# Uncomment the following line if you want to build individual source files
# for each FreeType 2 module. This is only useful during development, and
# is better defined as an environment variable anyway!
#
# FT2_MULTI = true ;
# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
# macros that are later used in #include statements. They need to be parsed
# in order to record these definitions.
#
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
# Now include the Jamfile in `freetype2/src', used to drive the compilation
# of each FreeType 2 component and/or module.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
# Handle the generation of the `ftexport.sym' file, which contains the list
# of exported symbols. This can be used on Unix by libtool.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
rule GenExportSymbols
{
local apinames = apinames$(SUFEXE) ;
local aheader ;
local headers ;
for aheader in [ Glob $(2) : *.h ]
{
switch $(aheader)
{
case */ftmac.h :
if ( $(MAC) || $(OS) = MACOSX ) {
headers += $(aheader) ;
}
case *.h : headers += $(aheader) ;
}
}
LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
APINAMES on $(1) = apinames$(SUFEXE) ;
Depends $(1) : $(apinames) $(headers) ;
GenExportSymbols1 $(1) : $(headers) ;
Clean clean : $(1) ;
}
actions GenExportSymbols1 bind APINAMES
{
$(APINAMES) $(2) > $(1)
}
GenExportSymbols ftexport.sym : include/freetype ;
# Test files (hinter debugging). Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
SubInclude FT2_TOP tests ;
}
rule RefDoc
{
Depends $1 : all ;
NotFile $1 ;
Always $1 ;
}
actions RefDoc
{
python $(FT2_SRC)/tools/docmaker/docmaker.py
--prefix=ft2
--title=FreeType-2.6.5
--output=$(DOC_DIR)
$(FT2_INCLUDE)/freetype/*.h
$(FT2_INCLUDE)/freetype/config/*.h
}
RefDoc refdoc ;
# end of top Jamfile

71
Jamrules Normal file
View File

@ -0,0 +1,71 @@
# FreeType 2 JamRules.
#
# Copyright 2001-2016 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.
# This file contains the Jam rules needed to build the FreeType 2 library.
# It is shared by all Jamfiles and is included only once in the build
# process.
#
# Call SubDirHdrs on a list of directories.
#
rule AddSubDirHdrs
{
local x ;
for x in $(<)
{
SubDirHdrs $(x) ;
}
}
# Determine prefix of library file. We must use "libxxxxx" on Unix systems,
# while all other simply use the real name.
#
if $(UNIX)
{
LIBPREFIX ?= lib ;
}
else
{
LIBPREFIX ?= "" ;
}
# FT2_TOP contains the location of the FreeType source directory. You can
# set it to a specific value if you want to compile the library as part of a
# larger project.
#
FT2_TOP ?= $(DOT) ;
# Define a new rule used to declare a sub directory of the Nirvana source
# tree.
#
rule FT2_SubDir
{
if $(FT2_TOP) = $(DOT)
{
return [ FDirName $(<) ] ;
}
else
{
return [ FDirName $(FT2_TOP) $(<) ] ;
}
}
# We also set ALL_LOCATE_TARGET in order to place all object and library
# files in "objs".
#
ALL_LOCATE_TARGET ?= [ FT2_SubDir objs ] ;
# end of Jamrules

View File

@ -1,42 +0,0 @@
FREETYPE LICENSES
-----------------
The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
mutually exclusive open-source licenses.
This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
any of your projects or products.
- The FreeType License, found in the file `docs/FTL.TXT`, which is
similar to the original BSD license *with* an advertising clause
that forces you to explicitly cite the FreeType project in your
product's documentation. All details are in the license file.
This license is suited to products which don't use the GNU General
Public License.
Note that this license is compatible to the GNU General Public
License version 3, but not version 2.
- The GNU General Public License version 2, found in
`docs/GPLv2.TXT` (any later version can be used also), for
programs which already use the GPL. Note that the FTL is
incompatible with GPLv2 due to its advertisement clause.
The contributed BDF and PCF drivers come with a license similar to
that of the X Window System. It is compatible to the above two
licenses (see files `src/bdf/README` and `src/pcf/README`). The same
holds for the source code files `src/base/fthash.c` and
`include/freetype/internal/fthash.h`; they wer part of the BDF driver
in earlier FreeType versions.
The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
too is compatible to the above two licenses.
The MD5 checksum support (only used for debugging in development
builds) is in the public domain.
--- end of LICENSE.TXT ---

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

132
README
View File

@ -1,100 +1,86 @@
FreeType 2.12.1
===============
Branch of FreeType to support OpenType 1.8
==========================================
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.12.1.tar.xz
freetype-doc-2.12.1.tar.gz
ftdoc2121.zip
To view the documentation online, go to
https://www.freetype.org/freetype2/docs/
This branch contains changes for supporting OpenType 1.8.
The changes will be merged back upstream in September 2016,
when the specification for OpenType 1.8 is final and has
been published.
Mailing Lists
-------------
FreeType 2.6.5
==============
The preferred way of communication with the FreeType team is using
e-mail lists.
Homepage: http://www.freetype.org
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
FreeType is a freely available software library to render fonts.
The lists are moderated; see
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.
https://www.freetype.org/contact.html
Please read the docs/CHANGES file, it contains IMPORTANT
INFORMATION.
how to subscribe.
Read the files `docs/INSTALL*' for installation instructions; see
the file `docs/LICENSE.TXT' for the available licenses.
The FreeType 2 API reference is located in `docs/reference'; use the
file `ft2-toc.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
http://download.savannah.gnu.org/releases/freetype/
and download one of the following files.
freetype-doc-2.6.5.tar.bz2
freetype-doc-2.6.5.tar.gz
ftdoc265.zip
To view the documentation online, go to
http://www.freetype.org/freetype2/documentation.html
Bugs
----
Mailing Lists
=============
Please submit bug reports at
The preferred way of communication with the FreeType team is using
e-mail lists.
https://gitlab.freedesktop.org/freetype/freetype/-/issues
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
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'.
The lists are moderated; see
http://www.freetype.org/contact.html
how to subscribe.
Patches
-------
Bugs
====
For larger changes please provide merge requests at
Please submit bug reports at
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
https://savannah.nongnu.org/bugs/?group=freetype
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
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'.
Enjoy!
Enjoy!
The FreeType Team
The FreeType Team
----------------------------------------------------------------------
Copyright (C) 2006-2022 by
Copyright 2006-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -1,36 +1,4 @@
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
The git archive doesn't contain pre-built configuration scripts for
UNIXish platforms. To generate them say
sh autogen.sh
@ -42,54 +10,34 @@ which in turn depends on the following packages:
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.
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.
The autogen.sh script now checks the version of above three packages
whether they match the numbers above. Otherwise it will complain and
suggest either upgrading or using an environment variable to point to
a more recent version of the required tool(s).
Note that `aclocal` is provided by the 'automake' package on Linux,
and that `libtoolize` is called `glibtoolize` on Darwin (OS X).
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
For static builds which 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.
should work on all platforms which have GNU make (or makepp).
Code of Conduct
---------------
Similarly, a build with `cmake' can be done directly from the git
repository.
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-2022 by
Copyright 2005-2016 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (C) 2005-2022 by
# Copyright 2005-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -110,10 +110,7 @@ check_tool_version ()
fi
}
# Solaris 10's shell doesn't like the `!` operator to negate the exit status.
if test -f ./builds/unix/configure.raw; then
:
else
if test ! -f ./builds/unix/configure.raw; then
echo "You must be in the same directory as \`autogen.sh'."
echo "Bootstrapping doesn't work if srcdir != builddir."
exit 1
@ -141,25 +138,18 @@ check_tool_version $ACLOCAL aclocal ACLOCAL 1.10.1
check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4
check_tool_version $AUTOCONF autoconf AUTOCONF 2.62
# This sets FREETYPE version.
eval `sed -n \
-e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
-e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
-e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \
include/freetype/freetype.h`
# This sets freetype_major, freetype_minor, and freetype_patch.
eval `sed -nf version.sed include/freetype/freetype.h`
if test "$FREETYPE_PATCH" = "0"; then
FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR
else
FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH
# We set freetype-patch to an empty value if it is zero.
if test "$freetype_patch" = ".0"; then
freetype_patch=
fi
echo "FreeType $FREETYPE:"
cd builds/unix
echo "generating \`configure.ac'"
sed -e "s;@VERSION@;$FREETYPE;" \
sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
< configure.raw > configure.ac
run aclocal -I . --force
@ -172,29 +162,4 @@ cd ../..
chmod +x ./configure
# Copy all necessary 'dlg' files.
copy_submodule_files ()
{
echo "Copying files from \`subprojects/dlg' to \`src/dlg' and \`include/dlg'"
mkdir include/dlg 2> /dev/null
cp $DLG_INC_DIR/output.h include/dlg
cp $DLG_INC_DIR/dlg.h include/dlg
cp $DLG_SRC_DIR/* src/dlg
}
if test -e ".git"; then
DLG_INC_DIR=subprojects/dlg/include/dlg
DLG_SRC_DIR=subprojects/dlg/src/dlg
if test -d "$DLG_INC_DIR"; then
:
else
echo "Checking out submodule in \`subprojects/dlg':"
git submodule init
git submodule update
fi
copy_submodule_files
fi
# EOF

View File

@ -1,7 +1,7 @@
README for the builds/amiga subdirectory.
Copyright (C) 2005-2022 by
Copyright 2005-2016 by
Werner Lemberg and Detlef Würkner.
This file is part of the FreeType project, and may only be used, modified,
@ -26,7 +26,7 @@ FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
http://ragriffi.home.sprynet.com).
You will also need the latest include files and amiga.lib from the
Amiga web site (https://os.amigaworld.de/download.php?id=3) for
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
To use it, call "smake assign" and then "smake" from the builds/amiga

View File

@ -4,7 +4,7 @@
/* */
/* Amiga-specific configuration file (specification only). */
/* */
/* Copyright (C) 2005-2022 by */
/* Copyright 2005-2016 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType module selection. */
/* */
/* Copyright (C) 2005-2022 by */
/* Copyright 2005-2016 by */
/* Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -137,6 +137,8 @@ FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
#ifdef FT_USE_SMOOTH
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
#endif
#ifdef FT_USE_OTV

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005-2016 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -96,6 +96,9 @@ ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
ftcid.ppc.o: $(FTSRC)/base/ftcid.c
$(CC) -c $(CFLAGS) -o $@ $<
ftfntfmt.ppc.o: $(FTSRC)/base/ftfntfmt.c
$(CC) -c $(CFLAGS) -o $@ $<
ftfstype.ppc.o: $(FTSRC)/base/ftfstype.c
$(CC) -c $(CFLAGS) -o $@ $<
@ -108,6 +111,9 @@ ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
ftgxval.ppc.o: $(FTSRC)/base/ftgxval.c
$(CC) -c $(CFLAGS) -o $@ $<
ftlcdfil.ppc.o: $(FTSRC)/base/ftlcdfil.c
$(CC) -c $(CFLAGS) -o $@ $<
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ $<
@ -264,8 +270,8 @@ otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ $<
BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftfntfmt.ppc.oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005-2016 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -99,6 +99,9 @@ ftdebug.ppc.o: FT:src/base/ftdebug.c
ftdebugpure.ppc.o: src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
ftfntfmt.ppc.o: FT:src/base/ftfntfmt.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfntfmt.c
ftfstype.ppc.o: FT:src/base/ftfstype.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfstype.c
@ -111,6 +114,9 @@ ftglyph.ppc.o: FT:src/base/ftglyph.c
ftgxval.ppc.o: FT:src/base/ftgxval.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgxval.c
ftlcdfil.ppc.o: FT:src/base/ftlcdfil.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftlcdfil.c
ftmm.ppc.o: FT:src/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
@ -268,8 +274,8 @@ otvalid.ppc.o: FT:src/otvalid/otvalid.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
ftgxval.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftfntfmt.ppc.o ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005-2016 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -42,8 +42,8 @@
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o \
ftgasp.o ftglyph.o ftgxval.o ftmm.o ftotval.o \
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfntfmt.o ftfstype.o \
ftgasp.o ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o \
ftpatent.o ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o
OBJSYSTEM = ftsystem.o ftsystempure.o
@ -133,6 +133,8 @@ ftbitmap.o: $(CORE)base/ftbitmap.c
sc $(SCFLAGS) objname=$@ $<
ftcid.o: $(CORE)base/ftcid.c
sc $(SCFLAGS) objname=$@ $<
ftfntfmt.o: $(CORE)base/ftfntfmt.c
sc $(SCFLAGS) objname=$@ $<
ftfstype.o: $(CORE)base/ftfstype.c
sc $(SCFLAGS) objname=$@ $<
ftgasp.o: $(CORE)base/ftgasp.c
@ -141,6 +143,8 @@ ftglyph.o: $(CORE)base/ftglyph.c
sc $(SCFLAGS) objname=$@ $<
ftgxval.o: $(CORE)base/ftgxval.c
sc $(SCFLAGS) objname=$@ $<
ftlcdfil.o: $(CORE)base/ftlcdfil.c
sc $(SCFLAGS) objname=$@ $<
ftmm.o: $(CORE)base/ftmm.c
sc $(SCFLAGS) objname=$@ $<
ftotval.o: $(CORE)base/ftotval.c

View File

@ -1,78 +1,76 @@
/****************************************************************************
*
* ftdebug.c
*
* Debugging and logging component for amiga (body).
*
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, Werner Lemberg, and Detlef Wuerkner.
*
* 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.
*
*/
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component for amiga (body). */
/* */
/* Copyright 1996-2016 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* 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. */
/* */
/***************************************************************************/
/**************************************************************************
*
* This component contains various macros and functions used to ease the
* debugging of the FreeType engine. Its main purpose is in assertion
* checking, tracing, and error detection.
*
* There are now three debugging modes:
*
* - trace mode
*
* Error and trace messages are sent to the log file (which can be the
* standard error output).
*
* - error mode
*
* Only error messages are generated.
*
* - release mode:
*
* No error message is sent or generated. The code is free from any
* debugging parts.
*
*/
/*************************************************************************/
/* */
/* This component contains various macros and functions used to ease the */
/* debugging of the FreeType engine. Its main purpose is in assertion */
/* checking, tracing, and error detection. */
/* */
/* There are now three debugging modes: */
/* */
/* - trace mode */
/* */
/* Error and trace messages are sent to the log file (which can be the */
/* standard error output). */
/* */
/* - error mode */
/* */
/* Only error messages are generated. */
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/
/*
* Based on the default `ftdebug.c' file,
* replaced `vprintf' with `KVPrintF',
* commented out `exit',
* replaced `getenv' with `GetVar'.
* Based on the default ftdebug.c,
* replaced vprintf() with KVPrintF(),
* commented out exit(),
* replaced getenv() with GetVar().
*/
#include <exec/types.h>
#include <utility/tagitem.h>
#include <dos/exall.h>
#include <dos/var.h>
#define __NOLIBBASE__
#define __NOLOBALIFACE__
#define __USE_INLINE__
#include <proto/dos.h>
#include <clib/debug_protos.h>
#ifndef __amigaos4__
extern struct Library* DOSBase;
extern struct Library *DOSBase;
#else
extern struct DOSIFace* IDOS;
extern struct DOSIFace *IDOS;
#endif
#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/internal/ftdebug.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_DEBUG_H
#ifdef FT_DEBUG_LEVEL_ERROR
#if defined( FT_DEBUG_LEVEL_ERROR )
/* documentation is in ftdebug.h */
@ -102,7 +100,7 @@
KVPrintF( fmt, ap );
va_end( ap );
/* exit( EXIT_FAILURE ); */
/* exit( EXIT_FAILURE ); */
}
@ -113,19 +111,9 @@
int line,
const char* file )
{
#if 0
/* activating the code in this block makes FreeType very chatty */
fprintf( stderr,
"%s:%d: error 0x%02x: %s\n",
file,
line,
error,
FT_Error_String( error ) );
#else
FT_UNUSED( error );
FT_UNUSED( line );
FT_UNUSED( file );
#endif
return 0;
}
@ -136,23 +124,16 @@
#ifdef FT_DEBUG_LEVEL_TRACE
/* array of trace levels, initialized to 0; */
/* this gets adjusted at run-time */
static int ft_trace_levels_enabled[trace_count];
/* array of trace levels, initialized to 0 */
int ft_trace_levels[trace_count];
/* array of trace levels, always initialized to 0 */
static int ft_trace_levels_disabled[trace_count];
/* a pointer to either `ft_trace_levels_enabled' */
/* or `ft_trace_levels_disabled' */
int* ft_trace_levels;
/* define array of trace toggle names */
#define FT_TRACE_DEF( x ) #x ,
static const char* ft_trace_toggles[trace_count + 1] =
{
#include <freetype/internal/fttrace.h>
#include FT_INTERNAL_TRACE_H
NULL
};
@ -183,51 +164,33 @@
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Disable( void )
{
ft_trace_levels = ft_trace_levels_disabled;
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Enable( void )
{
ft_trace_levels = ft_trace_levels_enabled;
}
/**************************************************************************
*
* Initialize the tracing sub-system. This is done by retrieving the
* value of the `FT2_DEBUG' environment variable. It must be a list of
* toggles, separated by spaces, `;', or `,'. Example:
*
* export FT2_DEBUG="any:3 memory:7 stream:5"
*
* This requests that all levels be set to 3, except the trace level for
* the memory and stream components which are set to 7 and 5,
* respectively.
*
* See the file `include/freetype/internal/fttrace.h' for details of
* the available toggle names.
*
* The level must be between 0 and 7; 0 means quiet (except for serious
* runtime errors), and 7 means _very_ verbose.
*/
/*************************************************************************/
/* */
/* Initialize the tracing sub-system. This is done by retrieving the */
/* value of the `FT2_DEBUG' environment variable. It must be a list of */
/* toggles, separated by spaces, `;', or `,'. Example: */
/* */
/* export FT2_DEBUG="any:3 memory:7 stream:5" */
/* */
/* This requests that all levels be set to 3, except the trace level for */
/* the memory and stream components which are set to 7 and 5, */
/* respectively. */
/* */
/* See the file `include/freetype/internal/fttrace.h' for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 7; 0 means quiet (except for serious */
/* runtime errors), and 7 means _very_ verbose. */
/* */
FT_BASE_DEF( void )
ft_debug_init( void )
{
/* const char* ft2_debug = ft_getenv( "FT2_DEBUG" ); */
/* const char* ft2_debug = getenv( "FT2_DEBUG" ); */
char buf[256];
const char* ft2_debug = &buf[0];
/* if ( ft2_debug ) */
/* if ( ft2_debug ) */
if ( GetVar( "FT2_DEBUG", (STRPTR)ft2_debug, 256, LV_VAR ) > 0 )
{
const char* p = ft2_debug;
@ -287,16 +250,14 @@
{
/* special case for `any' */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels_enabled[n] = level;
ft_trace_levels[n] = level;
}
else
ft_trace_levels_enabled[found] = level;
ft_trace_levels[found] = level;
}
}
}
}
ft_trace_levels = ft_trace_levels_enabled;
}
@ -326,23 +287,11 @@
}
FT_BASE_DEF( void )
FT_Trace_Disable( void )
{
/* nothing */
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Enable( void )
{
/* nothing */
}
#endif /* !FT_DEBUG_LEVEL_TRACE */
/*
Local Variables:
coding: latin-1
End:
*/
/* END */

View File

@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
/* Copyright (C) 1996-2022 by */
/* Copyright 1996-2016 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -96,10 +96,10 @@ Free_VecPooled( APTR poolHeader,
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include <freetype/internal/ftdebug.h>
#include <freetype/ftsystem.h>
#include <freetype/fterrors.h>
#include <freetype/fttypes.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include <stdio.h>
#include <stdlib.h>
@ -235,7 +235,7 @@ Free_VecPooled( APTR poolHeader,
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT io
#define FT_COMPONENT trace_io
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
@ -264,7 +264,7 @@ Free_VecPooled( APTR poolHeader,
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = NULL;
stream->base = 0;
}

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,15 +13,12 @@
# fully.
DELETE := rm -f
CAT := cat
SEP := /
PLATFORM_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi
# This is used for `make refdoc' and `make refdoc-venv'
#
BIN := bin
# The directory where all library files are placed.
#
@ -64,14 +61,14 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?=
ANSIFLAGS :=
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -15,7 +15,7 @@ To compile FreeType 2 as a library the following changes must be applied:
INCLUDE;E:\freetype2\include
- The file `freetype/include/Ft2build.h' must be patched as follows to
- The file `freetype2/include/Ft2build.h' must be patched as follows to
include ATARI.H:
#ifndef FT2_BUILD_GENERIC_H_
@ -40,7 +40,7 @@ ge
INCLUDE;E:\freetype2\include
- In der Datei freetype/include/Ft2build.h muss zu Beginn
- In der Datei freetype2/include/Ft2build.h muss zu Beginn
ein #include "ATARI.H" wie folgt eingef<65>gt werden:
#ifndef FT2_BUILD_GENERIC_H_

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -15,15 +15,12 @@
# fully.
DELETE := rm -f
CAT := cat
SEP := /
PLATFORM_DIR := $(TOP_DIR)/builds/beos
PLATFORM := beos
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
PLATFORM := beos
# This is used for `make refdoc' and `make refdoc-venv'
#
BIN := bin
# The directory where all library files are placed.
#
@ -66,14 +63,14 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?=
ANSIFLAGS :=
# EOF

View File

@ -2,7 +2,7 @@
# FreeType 2 configuration rules for a BeOS system
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -27,11 +27,11 @@ endif
ifeq ($(PLATFORM),beos)
DELETE := rm -f
CAT := cat
SEP := /
PLATFORM_DIR := $(TOP_DIR)/builds/beos
CONFIG_FILE := beos.mk
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
CONFIG_FILE := beos.mk
setup: std_setup

View File

@ -1,52 +0,0 @@
# FindBrotliDec.cmake
#
# Copyright (C) 2019-2022 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written by Werner Lemberg <wl@gnu.org>
#
# 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.
#
#
# Try to find libbrotlidec include and library directories.
#
# If found, the following variables are set.
#
# BROTLIDEC_INCLUDE_DIRS
# BROTLIDEC_LIBRARIES
find_package(PkgConfig QUIET)
pkg_check_modules(PC_BROTLIDEC QUIET libbrotlidec)
if (PC_BROTLIDEC_VERSION)
set(BROTLIDEC_VERSION "${PC_BROTLIDEC_VERSION}")
endif ()
find_path(BROTLIDEC_INCLUDE_DIRS
NAMES brotli/decode.h
HINTS ${PC_BROTLIDEC_INCLUDEDIR}
${PC_BROTLIDEC_INCLUDE_DIRS}
PATH_SUFFIXES brotli)
find_library(BROTLIDEC_LIBRARIES
NAMES brotlidec
HINTS ${PC_BROTLIDEC_LIBDIR}
${PC_BROTLIDEC_LIBRARY_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
BrotliDec
REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
FOUND_VAR BROTLIDEC_FOUND
VERSION_VAR BROTLIDEC_VERSION)
mark_as_advanced(
BROTLIDEC_INCLUDE_DIRS
BROTLIDEC_LIBRARIES)

View File

@ -1,5 +1,4 @@
# Copyright (c) 2012, Intel Corporation
# Copyright (c) 2019 Sony Interactive Entertainment Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@ -28,176 +27,46 @@
# Try to find Harfbuzz include and library directories.
#
# After successful discovery, this will set for inclusion where needed:
# HarfBuzz_INCLUDE_DIRS - containg the HarfBuzz headers
# HarfBuzz_LIBRARIES - containg the HarfBuzz library
# HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers
# HARFBUZZ_LIBRARIES - containg the HarfBuzz library
#[=======================================================================[.rst:
FindHarfBuzz
--------------
include(FindPkgConfig)
Find HarfBuzz headers and libraries.
pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.7)
Imported Targets
^^^^^^^^^^^^^^^^
``HarfBuzz::HarfBuzz``
The HarfBuzz library, if found.
``HarfBuzz::ICU``
The HarfBuzz ICU library, if found.
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables in your project:
``HarfBuzz_FOUND``
true if (the requested version of) HarfBuzz is available.
``HarfBuzz_VERSION``
the version of HarfBuzz.
``HarfBuzz_LIBRARIES``
the libraries to link against to use HarfBuzz.
``HarfBuzz_INCLUDE_DIRS``
where to find the HarfBuzz headers.
``HarfBuzz_COMPILE_OPTIONS``
this should be passed to target_compile_options(), if the
target is not used for linking
#]=======================================================================]
find_package(PkgConfig QUIET)
pkg_check_modules(PC_HARFBUZZ QUIET harfbuzz)
set(HarfBuzz_COMPILE_OPTIONS ${PC_HARFBUZZ_CFLAGS_OTHER})
set(HarfBuzz_VERSION ${PC_HARFBUZZ_CFLAGS_VERSION})
find_path(HarfBuzz_INCLUDE_DIR
NAMES hb.h
HINTS ${PC_HARFBUZZ_INCLUDEDIR} ${PC_HARFBUZZ_INCLUDE_DIRS}
PATH_SUFFIXES harfbuzz
find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h
HINTS ${PC_HARFBUZZ_INCLUDE_DIRS} ${PC_HARFBUZZ_INCLUDEDIR}
)
find_library(HarfBuzz_LIBRARY
NAMES ${HarfBuzz_NAMES} harfbuzz
HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS}
find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
)
if (HarfBuzz_INCLUDE_DIR AND NOT HarfBuzz_VERSION)
if (EXISTS "${HarfBuzz_INCLUDE_DIR}/hb-version.h")
file(READ "${HarfBuzz_INCLUDE_DIR}/hb-version.h" _harfbuzz_version_content)
string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}")
set(HarfBuzz_VERSION "${CMAKE_MATCH_1}")
# HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
if ("${PC_HARFBUZZ_VERSION}" VERSION_GREATER "0.9.17")
if (HarfBuzz_FIND_REQUIRED)
set(_HARFBUZZ_REQUIRED REQUIRED)
else ()
set(_HARFBUZZ_REQUIRED "")
endif ()
endif ()
if ("${HarfBuzz_FIND_VERSION}" VERSION_GREATER "${HarfBuzz_VERSION}")
if (HarfBuzz_FIND_REQUIRED)
message(FATAL_ERROR
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
" is higher than found version (" ${HarfBuzz_VERSION} ")")
else ()
message(WARNING
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
" is higher than found version (" ${HarfBuzz_VERSION} ")")
unset(HarfBuzz_VERSION)
unset(HarfBuzz_INCLUDE_DIRS)
unset(HarfBuzz_LIBRARIES)
return ()
endif ()
endif ()
# Find components
if (HarfBuzz_INCLUDE_DIR AND HarfBuzz_LIBRARY)
set(_HarfBuzz_REQUIRED_LIBS_FOUND ON)
set(HarfBuzz_LIBS_FOUND "HarfBuzz (required): ${HarfBuzz_LIBRARY}")
pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 ${_HARFBUZZ_REQUIRED})
find_library(HARFBUZZ_ICU_LIBRARIES NAMES harfbuzz-icu
HINTS ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} ${PC_HARFBUZZ_ICU_LIBDIR}
)
if (HARFBUZZ_ICU_LIBRARIES)
list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
endif ()
set(_HARFBUZZ_EXTRA_REQUIRED_VAR "HARFBUZZ_ICU_LIBRARIES")
else ()
set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF)
set(HarfBuzz_LIBS_NOT_FOUND "HarfBuzz (required)")
endif ()
if (NOT CMAKE_VERSION VERSION_LESS 3.3)
if ("ICU" IN_LIST HarfBuzz_FIND_COMPONENTS)
pkg_check_modules(PC_HARFBUZZ_ICU QUIET harfbuzz-icu)
set(HarfBuzz_ICU_COMPILE_OPTIONS ${PC_HARFBUZZ_ICU_CFLAGS_OTHER})
find_path(HarfBuzz_ICU_INCLUDE_DIR
NAMES hb-icu.h
HINTS ${PC_HARFBUZZ_ICU_INCLUDEDIR} ${PC_HARFBUZZ_ICU_INCLUDE_DIRS}
PATH_SUFFIXES harfbuzz
)
find_library(HarfBuzz_ICU_LIBRARY
NAMES ${HarfBuzz_ICU_NAMES} harfbuzz-icu
HINTS ${PC_HARFBUZZ_ICU_LIBDIR} ${PC_HARFBUZZ_ICU_LIBRARY_DIRS}
)
if (HarfBuzz_ICU_LIBRARY)
if (HarfBuzz_FIND_REQUIRED_ICU)
list(APPEND HarfBuzz_LIBS_FOUND "ICU (required): ${HarfBuzz_ICU_LIBRARY}")
else ()
list(APPEND HarfBuzz_LIBS_FOUND "ICU (optional): ${HarfBuzz_ICU_LIBRARY}")
endif ()
else ()
if (HarfBuzz_FIND_REQUIRED_ICU)
set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF)
list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (required)")
else ()
list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (optional)")
endif ()
endif ()
endif ()
endif ()
if (NOT HarfBuzz_FIND_QUIETLY)
if (HarfBuzz_LIBS_FOUND)
message(STATUS "Found the following HarfBuzz libraries:")
foreach (found ${HarfBuzz_LIBS_FOUND})
message(STATUS " ${found}")
endforeach ()
endif ()
if (HarfBuzz_LIBS_NOT_FOUND)
message(STATUS "The following HarfBuzz libraries were not found:")
foreach (found ${HarfBuzz_LIBS_NOT_FOUND})
message(STATUS " ${found}")
endforeach ()
endif ()
set(_HARFBUZZ_EXTRA_REQUIRED_VAR "")
endif ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HarfBuzz
FOUND_VAR HarfBuzz_FOUND
REQUIRED_VARS HarfBuzz_INCLUDE_DIR HarfBuzz_LIBRARY _HarfBuzz_REQUIRED_LIBS_FOUND
VERSION_VAR HarfBuzz_VERSION
)
if (NOT CMAKE_VERSION VERSION_LESS 3.1)
if (HarfBuzz_LIBRARY AND NOT TARGET HarfBuzz::HarfBuzz)
add_library(HarfBuzz::HarfBuzz UNKNOWN IMPORTED GLOBAL)
set_target_properties(HarfBuzz::HarfBuzz PROPERTIES
IMPORTED_LOCATION "${HarfBuzz_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${HarfBuzz_COMPILE_OPTIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_INCLUDE_DIR}"
)
endif ()
if (HarfBuzz_ICU_LIBRARY AND NOT TARGET HarfBuzz::ICU)
add_library(HarfBuzz::ICU UNKNOWN IMPORTED GLOBAL)
set_target_properties(HarfBuzz::ICU PROPERTIES
IMPORTED_LOCATION "${HarfBuzz_ICU_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${HarfBuzz_ICU_COMPILE_OPTIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_ICU_INCLUDE_DIR}"
)
endif ()
endif ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS
HARFBUZZ_LIBRARIES ${_HARFBUZZ_EXTRA_REQUIRED_VAR})
mark_as_advanced(
HarfBuzz_INCLUDE_DIR
HarfBuzz_ICU_INCLUDE_DIR
HarfBuzz_LIBRARY
HarfBuzz_ICU_LIBRARY
HARFBUZZ_ICU_LIBRARIES
HARFBUZZ_INCLUDE_DIRS
HARFBUZZ_LIBRARIES
)
if (HarfBuzz_FOUND)
set(HarfBuzz_LIBRARIES ${HarfBuzz_LIBRARY} ${HarfBuzz_ICU_LIBRARY})
set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR} ${HarfBuzz_ICU_INCLUDE_DIR})
endif ()

View File

@ -1,6 +1,6 @@
# iOS.cmake
#
# Copyright (C) 2014-2022 by
# Copyright 2014-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written by David Wimsey <david@wimsey.us>

View File

@ -1,6 +1,6 @@
#!/bin/sh -e
# Copyright (C) 2015-2022 by
# Copyright 2015-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -93,7 +93,7 @@ cat >$tmpdir/main.c << END
#include <stdlib.h>
#include <ft2build.h>
#include <freetype/freetype.h>
#include FT_FREETYPE_H
FT_Library library;

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -59,7 +59,7 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c
@ -68,7 +68,7 @@ CFLAGS ?= -c
#
# we assume the compiler is already strictly ANSI
#
ANSIFLAGS ?=
ANSIFLAGS :=
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,14 +60,14 @@ TE := -e
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= -A
ANSIFLAGS := -A
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,14 +60,14 @@ TE := -e
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= -A
ANSIFLAGS := -A
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2003-2022 by
# Copyright 2003-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -58,14 +58,14 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -g -O6 -Wall
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?=
ANSIFLAGS :=
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -59,7 +59,7 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
@ -82,9 +82,8 @@ ifndef CFLAGS
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
# You can override this on the command line.
#
ANSIFLAGS ?= -std=c99 -pedantic
ANSIFLAGS := -ansi -pedantic
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -58,14 +58,14 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -g -O3 -Wall
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= -std=c99 -pedantic
ANSIFLAGS := -ansi -pedantic
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -61,7 +61,7 @@ TE := /Fe
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
# Note that the Intel C/C++ compiler version 4.5 complains about
@ -74,7 +74,7 @@ CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= /Qansi_alias /Za
ANSIFLAGS := /Qansi_alias /Za
# Library linking
#

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,7 +60,7 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -g
@ -71,7 +71,7 @@ CFLAGS ?= -c -g
#
# the "-A" flag simply increments verbosity about non ANSI code
#
ANSIFLAGS ?= -A
ANSIFLAGS := -A
# library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -63,14 +63,14 @@ TE := /Fe
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= /nologo /c /Ox /W3 /WX
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= /Za /D_CRT_SECURE_NO_DEPRECATE
ANSIFLAGS := /Za /D_CRT_SECURE_NO_DEPRECATE
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,14 +60,14 @@ T := -FO=
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -zq
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS ?= -za
ANSIFLAGS := -za
# Library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,7 +60,7 @@ T := -Fo
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -g2 -O
@ -69,7 +69,7 @@ CFLAGS ?= -c -g2 -O
#
# LCC is pure ANSI anyway!
#
ANSIFLAGS ?=
ANSIFLAGS :=
# library linking

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -16,7 +16,7 @@
# This sub-Makefile is in charge of detecting the current platform. It sets
# the following variables:
#
# PLATFORM_DIR The configuration and system-specific directory. Usually
# BUILD_DIR The configuration and system-specific directory. Usually
# `builds/$(PLATFORM)' but can be different for custom builds
# of the library.
#
@ -49,8 +49,8 @@ SEP := /
BUILD_CONFIG := $(TOP_DIR)/builds
# These two assignments must be delayed.
PLATFORM_DIR = $(BUILD_CONFIG)/$(PLATFORM)
CONFIG_RULES = $(PLATFORM_DIR)/$(CONFIG_FILE)
BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
# We define the BACKSLASH variable to hold a single back-slash character.
# This is needed because a line like
@ -101,28 +101,54 @@ ifndef CONFIG_FILE
.PHONY: setup
endif
# Flash out and copy rules.
# The following targets are equivalent, with the exception that they use
# a slightly different syntax for the `echo' command.
#
.PHONY: std_setup
# std_setup: defined for most (i.e. Unix-like) platforms
# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
#
.PHONY: std_setup dos_setup
std_setup:
$(info )
$(info $(PROJECT_TITLE) build system -- automatic system detection)
$(info )
$(info The following settings are used:)
$(info )
$(info $(empty) platform $(PLATFORM))
$(info $(empty) compiler $(CC))
$(info $(empty) configuration directory $(subst /,$(SEP),$(PLATFORM_DIR)))
$(info $(empty) configuration rules $(subst /,$(SEP),$(CONFIG_RULES)))
$(info )
$(info If this does not correspond to your system or settings please remove the file)
$(info `$(CONFIG_MK)' from this directory then read the INSTALL file for help.)
$(info )
$(info Otherwise, simply type `$(MAKE)' again to build the library,)
$(info or `$(MAKE) refdoc' to build the API reference (this needs Python >= 3.5).)
$(info )
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK))
@echo ""
@echo "$(PROJECT_TITLE) build system -- automatic system detection"
@echo ""
@echo "The following settings are used:"
@echo ""
@echo " platform $(PLATFORM)"
@echo " compiler $(CC)"
@echo " configuration directory $(BUILD_DIR)"
@echo " configuration rules $(CONFIG_RULES)"
@echo ""
@echo "If this does not correspond to your system or settings please remove the file"
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
@echo ""
@echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
@echo "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)."
@echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
# Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
#
dos_setup:
@type builds$(SEP)newline
@echo $(PROJECT_TITLE) build system -- automatic system detection
@type builds$(SEP)newline
@echo The following settings are used:
@type builds$(SEP)newline
@echo platformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
@echo compilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
@echo configuration directoryÿÿÿÿÿÿ$(subst /,$(SEP),$(BUILD_DIR))
@echo configuration rulesÿÿÿÿÿÿÿÿÿÿ$(subst /,$(SEP),$(CONFIG_RULES))
@type builds$(SEP)newline
@echo If this does not correspond to your system or settings please remove the file
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
@type builds$(SEP)newline
@echo Otherwise, simply type 'make' again to build the library.
@echo or 'make refdoc' to build the API reference (this needs python >= 2.6).
@type builds$(SEP)newline
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -80,46 +80,36 @@ ifeq ($(PLATFORM),dos)
ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
CONFIG_FILE := dos-emx.mk
CC := gcc
.PHONY: emx
emx: setup
@cd .
.PHONY: emx
endif
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
CONFIG_FILE := dos-tcc.mk
CC := tcc
.PHONY: turboc
turboc: setup
@cd .
.PHONY: turboc
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := dos-wat.mk
CC := wcc386
.PHONY: watcom
watcom: setup
@cd .
.PHONY: watcom
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
CONFIG_FILE := dos-bcc.mk
CC := bcc32
.PHONY: borlandc
borlandc: setup
@cd .
.PHONY: borlandc
endif
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
CONFIG_FILE := dos-bcc.mk
CC := bcc
.PHONY: borlandc16
borlandc16: setup
@cd .
.PHONY: borlandc16
endif
ifneq ($(findstring bash,$(SHELL)),) # check for bash
@ -143,7 +133,7 @@ ifeq ($(PLATFORM),dos)
COPY := copy
endif # test NT
setup: std_setup
setup: dos_setup
endif
endif # test PLATFORM dos

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,15 +13,12 @@
# fully.
DELETE := del
CAT := type
SEP := $(strip \ )
PLATFORM_DIR := $(TOP_DIR)/builds/dos
PLATFORM := dos
DELETE := del
CAT := type
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/dos
PLATFORM := dos
# This is used for `make refdoc' and `make refdoc-venv'
#
BIN := Scripts
# The executable file extension (for tools), *with* leading dot.
#

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2003-2022 by
# Copyright 2003-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2003-2022 by
# Copyright 2003-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -20,8 +20,8 @@
# The following variables (set by other Makefile components, in the
# environment, or on the command line) are used:
#
# PLATFORM_DIR The architecture-dependent directory,
# e.g., `$(TOP_DIR)/builds/unix'. Added to INCLUDES also.
# BUILD_DIR The architecture dependent directory,
# e.g. `$(TOP_DIR)/builds/unix'. Added to INCLUDES also.
#
# OBJ_DIR The directory in which object files are created.
#
@ -75,7 +75,7 @@
# The targets `objects' and `library' are defined at the end of this
# Makefile after all other rules have been included.
#
.PHONY: single multi objects library refdoc refdoc-venv
.PHONY: single multi objects library refdoc
# default target -- build single objects and library
#
@ -104,7 +104,7 @@ CONFIG_DIR := $(PUBLIC_DIR)/config
# The documentation directory.
#
DOC_DIR ?= $(TOP_DIR)/docs
DOC_DIR ?= $(TOP_DIR)/docs/reference
# The final name of the library file.
#
@ -121,19 +121,17 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
#
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
$(DEVEL_DIR) \
$(PLATFORM_DIR) \
$(BUILD_DIR) \
$(TOP_DIR)/include)
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
# For a development build, we assume that the external library dependencies
# defined in `ftoption.h' are fulfilled, so we directly access the necessary
# include directory information using `pkg-config'.
#
ifdef DEVEL_DIR
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng)
INCLUDE_FLAGS += $(shell pkg-config --cflags harfbuzz)
INCLUDE_FLAGS += $(shell pkg-config --cflags libbrotlidec)
# We assume that all library dependencies for FreeType are fulfilled for a
# development build, so we directly access the necessary include directory
# information using `pkg-config'.
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
harfbuzz )
endif
@ -148,13 +146,22 @@ endif
# FreeType. This is required to let our sources include the internal
# headers (something forbidden by clients).
#
# Finally, we define FT_CONFIG_MODULES_H so that the compiler uses the
# generated version of `ftmodule.h' in $(OBJ_DIR). If there is an
# `ftoption.h' files in $(OBJ_DIR), define FT_CONFIG_OPTIONS_H too.
#
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_H := $(OBJ_DIR)/ftoption.h
FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
endif
# `CPPFLAGS' might be specified by the user in the environment.
#
FT_CFLAGS = $(CPPFLAGS) \
$(CFLAGS) \
$DFT2_BUILD_LIBRARY
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
FT_CFLAGS = $(CPPFLAGS) \
$(CFLAGS) \
$DFT2_BUILD_LIBRARY \
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
$(FTOPTION_FLAG)
# Include the `exports' rules file.
@ -169,22 +176,16 @@ OBJECTS_LIST :=
# Define $(PUBLIC_H) as the list of all public header files located in
# `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined
# similarly. $(FTOPTION_H) is the option file used in the compilation.
# similarly.
#
# This is used to simplify the dependency rules -- if one of these files
# changes, the whole library is recompiled.
#
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_H := $(OBJ_DIR)/ftoption.h
else ifneq ($(wildcard $(PLATFORM_DIR)/ftoption.h),)
FTOPTION_H := $(PLATFORM_DIR)/ftoption.h
endif
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
$(wildcard $(SERVICES_DIR)/*.h)
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
$(wildcard $(PLATFORM_DIR)/config/*.h) \
$(wildcard $(BUILD_DIR)/config/*.h) \
$(FTMODULE_H) \
$(FTOPTION_H)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
@ -192,6 +193,8 @@ DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H)
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
# ftsystem component
#
FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
@ -220,7 +223,6 @@ $(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
#
include $(SRC_DIR)/base/rules.mk
include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES))
include $(SRC_DIR)/dlg/rules.mk
# ftinit component
@ -243,26 +245,10 @@ $(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H)
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# ftver component
#
# The VERSIONINFO resource `ftver.rc' contains version and copyright
# to be compiled by windres and tagged into DLL usually.
#
ifneq ($(RC),)
FTVER_SRC := $(BASE_DIR)/ftver.rc
FTVER_OBJ := $(OBJ_DIR)/ftver.$O
OBJECTS_LIST += $(FTVER_OBJ)
$(FTVER_OBJ): $(FTVER_SRC)
$(RC) -o $@ $<
endif
# All FreeType library objects.
#
OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) $(DLG_OBJS_M)
OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) $(DLG_OBJS_S)
OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S)
# The target `multi' on the Make command line indicates that we want to
@ -284,51 +270,18 @@ objects: $(OBJECTS_LIST)
library: $(PROJECT_LIBRARY)
# Run `docwriter' in the current Python environment.
#
PYTHON ?= python
# Option `-B' disables generation of .pyc files (available since python 2.6)
#
refdoc:
@echo Running docwriter...
$(PYTHON) -m docwriter \
--prefix=ft2 \
--title=FreeType-$(version) \
--site=reference \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
python -B $(SRC_DIR)/tools/docmaker/docmaker.py \
--prefix=ft2 \
--title=FreeType-$(version) \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
@echo Building static site...
cd $(DOC_DIR) && mkdocs build
@echo Done.
# Variables for running `refdoc' with Python's `virtualenv'. The
# environment is created in `DOC_DIR/env' and is gitignored.
#
# We still need to cd into `DOC_DIR' to build `mkdocs' because paths in
# `mkdocs.yml' are relative to the current working directory.
#
VENV_NAME := env
VENV_DIR := $(DOC_DIR)$(SEP)$(VENV_NAME)
ENV_PYTHON := $(VENV_DIR)$(SEP)$(BIN)$(SEP)$(PYTHON)
refdoc-venv:
@echo Setting up virtualenv for Python...
virtualenv --python=$(PYTHON) $(VENV_DIR)
@echo Installing docwriter...
$(ENV_PYTHON) -m pip install docwriter
@echo Running docwriter...
$(ENV_PYTHON) -m docwriter \
--prefix=ft2 \
--title=FreeType-$(version) \
--site=reference \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
@echo Building static site...
cd $(DOC_DIR) && $(VENV_NAME)$(SEP)$(BIN)$(SEP)python -m mkdocs build
@echo Done.
.PHONY: clean_project_std distclean_project_std
@ -373,9 +326,10 @@ remove_ftmodule_h:
.PHONY: clean distclean
# The `config.mk' file must define `clean_project' and `distclean_project'.
# Implementations may use to relay these to either the `std' or `dos'
# versions from above, or simply provide their own implementation.
# The `config.mk' file must define `clean_freetype' and
# `distclean_freetype'. Implementations may use to relay these to either
# the `std' or `dos' versions from above, or simply provide their own
# implementation.
#
clean: clean_project
distclean: distclean_project remove_config_mk remove_ftmodule_h

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -38,6 +38,7 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
:src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@ -82,6 +83,7 @@ ObjFiles-68K = \xB6
"{ObjDir}ftbdf.c.o" \xB6
"{ObjDir}ftbitmap.c.o" \xB6
"{ObjDir}ftdebug.c.o" \xB6
"{ObjDir}ftfntfmt.c.o" \xB6
"{ObjDir}ftfstype.c.o" \xB6
"{ObjDir}ftglyph.c.o" \xB6
"{ObjDir}ftgxval.c.o" \xB6
@ -159,6 +161,7 @@ FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
"{ObjDir}ftfntfmt.c.o" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c

View File

@ -37,6 +37,7 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
:src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@ -81,6 +82,7 @@ ObjFiles-68K = \xB6
"{ObjDir}ftbdf.c.o" \xB6
"{ObjDir}ftbitmap.c.o" \xB6
"{ObjDir}ftdebug.c.o" \xB6
"{ObjDir}ftfntfmt.c.o" \xB6
"{ObjDir}ftfstype.c.o" \xB6
"{ObjDir}ftglyph.c.o" \xB6
"{ObjDir}ftgxval.c.o" \xB6
@ -158,6 +160,7 @@ FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
"{ObjDir}ftfntfmt.c.o" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c

View File

@ -38,6 +38,7 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
:src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@ -82,6 +83,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftbdf.c.x" \xB6
"{ObjDir}ftbitmap.c.x" \xB6
"{ObjDir}ftdebug.c.x" \xB6
"{ObjDir}ftfntfmt.c.x" \xB6
"{ObjDir}ftfstype.c.x" \xB6
"{ObjDir}ftglyph.c.x" \xB6
"{ObjDir}ftgxval.c.x" \xB6
@ -162,6 +164,7 @@ FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\x
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
"{ObjDir}ftfntfmt.c.x" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c

View File

@ -38,6 +38,7 @@ SrcFiles = \xB6
:src:base:ftbdf.c \xB6
:src:base:ftbitmap.c \xB6
:src:base:ftdebug.c \xB6
:src:base:ftfntfmt.c \xB6
:src:base:ftfstype.c \xB6
:src:base:ftglyph.c \xB6
:src:base:ftgxval.c \xB6
@ -82,6 +83,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftbdf.c.x" \xB6
"{ObjDir}ftbitmap.c.x" \xB6
"{ObjDir}ftdebug.c.x" \xB6
"{ObjDir}ftfntfmt.c.x" \xB6
"{ObjDir}ftfstype.c.x" \xB6
"{ObjDir}ftglyph.c.x" \xB6
"{ObjDir}ftgxval.c.x" \xB6
@ -162,6 +164,7 @@ FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\
"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
"{ObjDir}ftfntfmt.c.x" \xC4 :src:base:ftfntfmt.c
"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c

View File

@ -46,7 +46,7 @@ environment by Metrowerks. GCC for MPW and Symantec
Required files are downloadable from:
http://macintoshgarden.org/apps/macintosh-programmers-workshop
http://developer.apple.com/tools/mpw-tools/index.html
Also you can find documents how to update by MPW-PR.
@ -54,7 +54,7 @@ environment by Metrowerks. GCC for MPW and Symantec
skeletons. Python bundled to Mac OS X is enough. For
classic MacOS, MacPython is available:
https://homepages.cwi.nl/~jack/macpython/
http://homepages.cwi.nl/~jack/macpython/
MPW requires all files are typed by resource fork.
ResEdit bundled to MPW is enough. In Mac OS X,
@ -280,7 +280,7 @@ APPENDIX I
migrate to FSRef datatype. The big differences of FSRef
against FSSpec are explained in Apple TechNotes 2078.
https://developer.apple.com/library/archive/technotes/tn2078/
http://developer.apple.com/technotes/tn2002/tn2078.html
- filename length: the max length of file
name of FSRef is 255 chars (it is limit of HFS+),
@ -314,7 +314,7 @@ APPENDIX I
of FontManager emulation without QuickDraw is
explained in
http://gyvern.ipc.hiroshima-u.ac.jp/~mpsuzuki/ats_benchmark.html
http://www.gyve.org/~mpsuzuki/ats_benchmark.html
A-3. Framework Availabilities
-----------------------------

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@ -9,7 +9,7 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>freetype</string>
<string>FreeType</string>
<key>CFBundleGetInfoString</key>
<string>FreeType ${PROJECT_VERSION}</string>

View File

@ -5,7 +5,7 @@
/* Mac FOND support. Written by just@letterror.com. */
/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */
/* */
/* Copyright (C) 1996-2022 by */
/* Copyright 1996-2016 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -62,9 +62,10 @@
*/
#include <freetype/freetype.h>
#include <freetype/tttags.h>
#include <freetype/internal/ftstream.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_STREAM_H
#include "ftbase.h"
#if defined( __GNUC__ ) || defined( __IBMC__ )
@ -97,7 +98,7 @@
#define FT_DEPRECATED_ATTRIBUTE
#include <freetype/ftmac.h>
#include FT_MAC_H
/* undefine blocking-macros in ftmac.h */
#undef FT_GetFile_From_Mac_Name
@ -447,7 +448,7 @@ typedef short ResourceIndex;
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = NULL;
stream->base = 0;
}
@ -779,10 +780,9 @@ typedef short ResourceIndex;
style = (StyleTable*)p;
p += sizeof ( StyleTable );
string_count = EndianS16_BtoN( *(short*)(p) );
string_count = FT_MIN( 64, string_count );
p += sizeof ( short );
for ( i = 0; i < string_count; i++ )
for ( i = 0; i < string_count && i < 64; i++ )
{
names[i] = p;
p += names[i][0];
@ -799,7 +799,7 @@ typedef short ResourceIndex;
ps_name[ps_name_len] = 0;
}
if ( style->indexes[face_index] > 1 &&
style->indexes[face_index] <= string_count )
style->indexes[face_index] <= FT_MIN( string_count, 64 ) )
{
unsigned char* suffixes = names[style->indexes[face_index] - 1];
@ -939,8 +939,8 @@ typedef short ResourceIndex;
if ( lwfn_file_name[0] )
{
err = lookup_lwfn_by_fond( pathname, lwfn_file_name,
buff, sizeof ( buff ) );
if ( !err )
buff, sizeof ( buff ) );
if ( FT_Err_Ok == err )
have_lwfn = 1;
}
@ -1011,7 +1011,7 @@ typedef short ResourceIndex;
old_total_size = total_size;
}
if ( FT_QALLOC( buffer, (FT_Long)total_size ) )
if ( FT_ALLOC( buffer, (FT_Long)total_size ) )
goto Error;
/* Second pass: append all POST data to the buffer, add PFB fields. */
@ -1127,7 +1127,7 @@ typedef short ResourceIndex;
return FT_THROW( Invalid_Handle );
sfnt_size = (FT_ULong)GetHandleSize( sfnt );
if ( FT_QALLOC( sfnt_data, (FT_Long)sfnt_size ) )
if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
{
ReleaseResource( sfnt );
return error;
@ -1217,7 +1217,7 @@ typedef short ResourceIndex;
}
CloseResFile( res_ref );
if ( !error && aface )
if ( FT_Err_Ok == error && NULL != aface )
(*aface)->num_faces = num_faces_in_res;
return error;
}
@ -1279,7 +1279,7 @@ typedef short ResourceIndex;
error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
path_lwfn, sizeof ( path_lwfn ) );
if ( !error )
if ( FT_Err_Ok == error )
have_lwfn = 1;
}
@ -1315,7 +1315,7 @@ typedef short ResourceIndex;
error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
path_lwfn, sizeof ( path_lwfn ) );
if ( !error )
if ( FT_Err_Ok == error )
have_lwfn = 1;
}
@ -1332,7 +1332,7 @@ typedef short ResourceIndex;
error = FT_ERR( Unknown_File_Format );
found_no_lwfn_file:
if ( have_sfnt && error )
if ( have_sfnt && FT_Err_Ok != error )
error = FT_New_Face_From_SFNT( library,
sfnt_id,
face_index,
@ -1363,7 +1363,7 @@ typedef short ResourceIndex;
/* if it works, fine. */
error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface );
if ( !error )
if ( error == 0 )
return error;
/* let it fall through to normal loader (.ttf, .otf, etc.); */
@ -1403,7 +1403,7 @@ typedef short ResourceIndex;
/* try resourcefork based font: LWFN, FFIL */
error = FT_New_Face_From_Resource( library, (UInt8 *)pathname,
face_index, aface );
if ( error || *aface )
if ( error != 0 || *aface != NULL )
return error;
/* let it fall through to normal loader (.ttf, .otf, etc.) */
@ -1423,7 +1423,7 @@ typedef short ResourceIndex;
/* accepts an FSRef instead of a path. */
/* */
/* This function is deprecated because Carbon data types (FSRef) */
/* are not cross-platform, and thus not suitable for the FreeType API. */
/* are not cross-platform, and thus not suitable for the freetype API. */
FT_EXPORT_DEF( FT_Error )
FT_New_Face_From_FSRef( FT_Library library,
const FSRef* ref,
@ -1458,7 +1458,7 @@ typedef short ResourceIndex;
error = FT_ERR( Cannot_Open_Resource );
error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
if ( error || *aface )
if ( error != 0 || *aface != NULL )
return error;
/* fallback to datafork font */
@ -1481,7 +1481,7 @@ typedef short ResourceIndex;
/* accepts an FSSpec instead of a path. */
/* */
/* This function is deprecated because Carbon data types (FSSpec) */
/* are not cross-platform, and thus not suitable for the FreeType API. */
/* are not cross-platform, and thus not suitable for the freetype API. */
FT_EXPORT_DEF( FT_Error )
FT_New_Face_From_FSSpec( FT_Library library,
const FSSpec* spec,
@ -1515,7 +1515,7 @@ typedef short ResourceIndex;
error = FT_ERR( Cannot_Open_Resource );
error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
if ( error || *aface )
if ( error != 0 || *aface != NULL )
return error;
/* fallback to datafork font */

View File

@ -1,117 +0,0 @@
#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 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.
"""Extract the FreeType version numbers from `<freetype/freetype.h>`.
This script parses the header to extract the version number defined there.
By default, the full dotted version number is printed, but `--major`,
`--minor` or `--patch` can be used to only print one of these values
instead.
"""
from __future__ import print_function
import argparse
import os
import re
import sys
# Expected input:
#
# ...
# #define FREETYPE_MAJOR 2
# #define FREETYPE_MINOR 10
# #define FREETYPE_PATCH 2
# ...
RE_MAJOR = re.compile(r"^ \#define \s+ FREETYPE_MAJOR \s+ (.*) $", re.X)
RE_MINOR = re.compile(r"^ \#define \s+ FREETYPE_MINOR \s+ (.*) $", re.X)
RE_PATCH = re.compile(r"^ \#define \s+ FREETYPE_PATCH \s+ (.*) $", re.X)
def parse_freetype_header(header):
major = None
minor = None
patch = None
for line in header.splitlines():
line = line.rstrip()
m = RE_MAJOR.match(line)
if m:
assert major == None, "FREETYPE_MAJOR appears more than once!"
major = m.group(1)
continue
m = RE_MINOR.match(line)
if m:
assert minor == None, "FREETYPE_MINOR appears more than once!"
minor = m.group(1)
continue
m = RE_PATCH.match(line)
if m:
assert patch == None, "FREETYPE_PATCH appears more than once!"
patch = m.group(1)
continue
assert (
major and minor and patch
), "This header is missing one of FREETYPE_MAJOR, FREETYPE_MINOR or FREETYPE_PATCH!"
return (major, minor, patch)
def main():
parser = argparse.ArgumentParser(description=__doc__)
group = parser.add_mutually_exclusive_group()
group.add_argument(
"--major",
action="store_true",
help="Only print the major version number.",
)
group.add_argument(
"--minor",
action="store_true",
help="Only print the minor version number.",
)
group.add_argument(
"--patch",
action="store_true",
help="Only print the patch version number.",
)
parser.add_argument(
"input",
metavar="FREETYPE_H",
help="The input freetype.h header to parse.",
)
args = parser.parse_args()
with open(args.input) as f:
header = f.read()
version = parse_freetype_header(header)
if args.major:
print(version[0])
elif args.minor:
print(version[1])
elif args.patch:
print(version[2])
else:
print("%s.%s.%s" % version)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,115 +0,0 @@
#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 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.
"""Extract the libtool version from `configure.raw`.
This script parses the `configure.raw` file to extract the libtool version
number. By default, the full dotted version number is printed, but
`--major`, `--minor` or `--patch` can be used to only print one of these
values instead.
"""
from __future__ import print_function
import argparse
import os
import re
import sys
# Expected input:
#
# ...
# version_info='23:2:17'
# ...
RE_VERSION_INFO = re.compile(r"^version_info='(\d+):(\d+):(\d+)'")
def parse_configure_raw(header):
major = None
minor = None
patch = None
for line in header.splitlines():
line = line.rstrip()
m = RE_VERSION_INFO.match(line)
if m:
assert major == None, "version_info appears more than once!"
major = m.group(1)
minor = m.group(2)
patch = m.group(3)
continue
assert (
major and minor and patch
), "This input file is missing a version_info definition!"
return (major, minor, patch)
def main():
parser = argparse.ArgumentParser(description=__doc__)
group = parser.add_mutually_exclusive_group()
group.add_argument(
"--major",
action="store_true",
help="Only print the major version number.",
)
group.add_argument(
"--minor",
action="store_true",
help="Only print the minor version number.",
)
group.add_argument(
"--patch",
action="store_true",
help="Only print the patch version number.",
)
group.add_argument(
"--soversion",
action="store_true",
help="Only print the libtool library suffix.",
)
parser.add_argument(
"input",
metavar="CONFIGURE_RAW",
help="The input configure.raw file to parse.",
)
args = parser.parse_args()
with open(args.input) as f:
raw_file = f.read()
version = parse_configure_raw(raw_file)
if args.major:
print(version[0])
elif args.minor:
print(version[1])
elif args.patch:
print(version[2])
elif args.soversion:
# Convert libtool version_info to the library suffix.
# (current,revision, age) -> (current - age, age, revision)
print(
"%d.%s.%s"
% (int(version[0]) - int(version[2]), version[2], version[1])
)
else:
print("%s.%s.%s" % version)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,89 +0,0 @@
#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 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.
"""Generate FreeType reference documentation."""
from __future__ import print_function
import argparse
import glob
import os
import subprocess
import sys
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--input-dir",
required=True,
help="Top-level FreeType source directory.",
)
parser.add_argument(
"--version", required=True, help='FreeType version (e.g. "2.x.y").'
)
parser.add_argument(
"--output-dir", required=True, help="Output directory."
)
args = parser.parse_args()
# Get the list of input files of interest.
include_dir = os.path.join(args.input_dir, "include")
include_config_dir = os.path.join(include_dir, "config")
include_cache_dir = os.path.join(include_dir, "cache")
all_headers = (
glob.glob(os.path.join(args.input_dir, "include", "freetype", "*.h"))
+ glob.glob(
os.path.join(
args.input_dir, "include", "freetype", "config", "*.h"
)
)
+ glob.glob(
os.path.join(
args.input_dir, "include", "freetype", "cache", "*.h"
)
)
)
if not os.path.exists(args.output_dir):
os.makedirs(args.output_dir)
else:
assert os.path.isdir(args.output_dir), (
"Not a directory: " + args.output_dir
)
cmds = [
sys.executable,
"-m",
"docwriter",
"--prefix=ft2",
"--title=FreeType-" + args.version,
"--site=reference",
"--output=" + args.output_dir,
] + all_headers
print("Running docwriter...")
subprocess.check_call(cmds)
print("Building static site...")
subprocess.check_call(
[sys.executable, "-m", "mkdocs", "build"], cwd=args.output_dir
)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,171 +0,0 @@
#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 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.
"""Parse modules.cfg and dump its output either as ftmodule.h or a list of
base extensions.
"""
from __future__ import print_function
import argparse
import os
import re
import sys
# Expected input:
#
# ...
# FONT_MODULES += <name>
# HINTING_MODULES += <name>
# RASTER_MODULES += <name>
# AUX_MODULES += <name>
# BASE_EXTENSIONS += <name>
# ...
def parse_modules_cfg(input_file):
lists = {
"FONT_MODULES": [],
"HINTING_MODULES": [],
"RASTER_MODULES": [],
"AUX_MODULES": [],
"BASE_EXTENSIONS": [],
}
for line in input_file.splitlines():
line = line.rstrip()
# Ignore empty lines and those that start with a comment.
if not line or line[0] == "#":
continue
items = line.split()
assert len(items) == 3 and items[1] == "+=", (
"Unexpected input line [%s]" % line
)
assert items[0] in lists, (
"Unexpected configuration variable name " + items[0]
)
lists[items[0]].append(items[2])
return lists
def generate_ftmodule(lists):
result = "/* This is a generated file. */\n"
for driver in lists["FONT_MODULES"]:
if driver == "sfnt": # Special case for the sfnt 'driver'.
result += "FT_USE_MODULE( FT_Module_Class, sfnt_module_class )\n"
continue
name = {
"truetype": "tt",
"type1": "t1",
"cid": "t1cid",
"type42": "t42",
"winfonts": "winfnt",
}.get(driver, driver)
result += (
"FT_USE_MODULE( FT_Driver_ClassRec, %s_driver_class )\n" % name
)
for module in lists["HINTING_MODULES"]:
result += (
"FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module
)
for module in lists["RASTER_MODULES"]:
name = {
"raster": "ft_raster1",
"smooth": "ft_smooth",
"svg": "ft_svg",
}.get(module)
result += (
"FT_USE_MODULE( FT_Renderer_Class, %s_renderer_class )\n" % name
)
for module in lists["AUX_MODULES"]:
if module in ("psaux", "psnames", "otvalid", "gxvalid"):
result += (
"FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module
)
result += "/* EOF */\n"
return result
def generate_main_modules(lists):
return "\n".join(
lists["FONT_MODULES"]
+ lists["HINTING_MODULES"]
+ lists["RASTER_MODULES"]
)
def generate_aux_modules(lists):
return "\n".join(lists["AUX_MODULES"])
def generate_base_extensions(lists):
return "\n".join(lists["BASE_EXTENSIONS"])
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--format",
required=True,
choices=(
"ftmodule.h",
"main-modules",
"aux-modules",
"base-extensions-list",
),
help="Select output format.",
)
parser.add_argument(
"input",
metavar="CONFIGURE_RAW",
help="The input configure.raw file to parse.",
)
parser.add_argument("--output", help="Output file (default is stdout).")
args = parser.parse_args()
with open(args.input) as f:
input_data = f.read()
lists = parse_modules_cfg(input_data)
if args.format == "ftmodule.h":
result = generate_ftmodule(lists)
elif args.format == "main-modules":
result = generate_main_modules(lists)
elif args.format == "aux-modules":
result = generate_aux_modules(lists)
elif args.format == "base-extensions-list":
result = generate_base_extensions(lists)
else:
assert False, "Invalid output format!"
if args.output:
with open(args.output, "w") as f:
f.write(result)
else:
print(result)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,115 +0,0 @@
#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 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.
"""Toggle settings in `ftoption.h` file based on command-line arguments.
This script takes an `ftoption.h` file as input and rewrites
`#define`/`#undef` lines in it based on `--enable=CONFIG_VARNAME` or
`--disable=CONFIG_VARNAME` arguments passed to it, where `CONFIG_VARNAME` is
configuration variable name, such as `FT_CONFIG_OPTION_USE_LZW`, that may
appear in the file.
Note that if one of `CONFIG_VARNAME` is not found in the input file, this
script exits with an error message listing the missing variable names.
"""
import argparse
import os
import re
import sys
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"input", metavar="FTOPTION_H", help="Path to input ftoption.h file."
)
parser.add_argument("--output", help="Output to file instead of stdout.")
parser.add_argument(
"--enable",
action="append",
default=[],
help="Enable a given build option (e.g. FT_CONFIG_OPTION_USE_LZW).",
)
parser.add_argument(
"--disable",
action="append",
default=[],
help="Disable a given build option.",
)
args = parser.parse_args()
common_options = set(args.enable) & set(args.disable)
if common_options:
parser.error(
"Options cannot be both enabled and disabled: %s"
% sorted(common_options)
)
return 1
with open(args.input) as f:
input_file = f.read()
options_seen = set()
new_lines = []
for line in input_file.splitlines():
# Expected formats:
# #define <CONFIG_VAR>
# /* #define <CONFIG_VAR> */
# #undef <CONFIG_VAR>
line = line.rstrip()
if line.startswith("/* #define ") and line.endswith(" */"):
option_name = line[11:-3].strip()
option_enabled = False
elif line.startswith("#define "):
option_name = line[8:].strip()
option_enabled = True
elif line.startswith("#undef "):
option_name = line[7:].strip()
option_enabled = False
else:
new_lines.append(line)
continue
options_seen.add(option_name)
if option_enabled and option_name in args.disable:
line = "#undef " + option_name
elif not option_enabled and option_name in args.enable:
line = "#define " + option_name
new_lines.append(line)
result = "\n".join(new_lines) + "\n"
# Sanity check that all command-line options were actually processed.
cmdline_options = set(args.enable) | set(args.disable)
assert cmdline_options.issubset(
options_seen
), "Could not find options in input file: " + ", ".join(
sorted(cmdline_options - options_seen)
)
if args.output:
with open(args.output, "w") as f:
f.write(result)
else:
print(result)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -41,7 +41,7 @@ endif
define FTMODULE_H_INIT
$(REMOVE_MODULE)
$(info Generating modules list in $(FTMODULE_H)...)
@-echo Generating modules list in $(FTMODULE_H)...
$(OPEN_MODULE)/* This is a generated file. */$(CLOSE_MODULE)
endef
@ -56,7 +56,7 @@ endef
define FTMODULE_H_DONE
$(OPEN_MODULE)/* EOF */$(CLOSE_MODULE)
$(info done.)
@echo done.
endef

1
builds/newline Normal file
View File

@ -0,0 +1 @@

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -40,40 +40,32 @@ ifeq ($(PLATFORM),os2)
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := os2-icc.mk
CC := icc
.PHONY: visualage
visualage: setup
@cd .
.PHONY: visualage
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := os2-wat.mk
CC := wcc386
.PHONY: watcom
watcom: setup
@cd .
.PHONY: watcom
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
CONFIG_FILE := os2-bcc.mk
CC := bcc32
.PHONY: borlandc
borlandc: setup
@cd .
.PHONY: borlandc
endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := os2-dev.mk
CC := gcc
.PHONY: devel
devel: setup
@cd .
.PHONY: devel
endif
setup: std_setup
setup: dos_setup
endif # test PLATFORM os2

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,15 +13,11 @@
# fully.
DELETE := del
CAT := type
SEP := $(strip \ )
PLATFORM_DIR := $(TOP_DIR)/builds/os2
PLATFORM := os2
# This is used for `make refdoc' and `make refdoc-venv'
#
BIN := Scripts
DELETE := del
CAT := type
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/os2
PLATFORM := os2
# The executable file extension (for tools), *with* leading dot.
#

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -2,7 +2,7 @@
// FreeType 2 project for the symbian platform
//
// Copyright (C) 2008-2022 by
// Copyright 2008-2016 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@ -25,14 +25,10 @@ PRJ_EXPORTS
../../include/freetype/config/ftoption.h config/ftoption.h
../../include/freetype/config/ftstdlib.h config/ftstdlib.h
../../include/freetype/freetype.h freetype.h
../../include/freetype/ftadvanc.h ftadvanc.h
../../include/freetype/ftautoh.h ftautoh.h
../../include/freetype/ftbbox.h ftbbox.h
../../include/freetype/ftbdf.h ftbdf.h
../../include/freetype/ftbitmap.h ftbitmap.h
../../include/freetype/ftbzip2.h ftbzip2.h
../../include/freetype/ftcache.h ftcache.h
../../include/freetype/ftcffdrv.h ftcffdrv.h
../../include/freetype/ftcid.h ftcid.h
../../include/freetype/fterrdef.h fterrdef.h
../../include/freetype/fterrors.h fterrors.h
@ -41,6 +37,7 @@ PRJ_EXPORTS
../../include/freetype/ftglyph.h ftglyph.h
../../include/freetype/ftgxval.h ftgxval.h
../../include/freetype/ftgzip.h ftgzip.h
../../include/freetype/ftbzip2.h ftbzip2.h
../../include/freetype/ftimage.h ftimage.h
../../include/freetype/ftincrem.h ftincrem.h
../../include/freetype/ftlcdfil.h ftlcdfil.h
@ -52,8 +49,6 @@ PRJ_EXPORTS
../../include/freetype/ftmoderr.h ftmoderr.h
../../include/freetype/ftotval.h ftotval.h
../../include/freetype/ftoutln.h ftoutln.h
../../include/freetype/ftparams.h ftparams.h
../../include/freetype/ftpcfdrv.h ftpcfdrv.h
../../include/freetype/ftpfr.h ftpfr.h
../../include/freetype/ftrender.h ftrender.h
../../include/freetype/ftsizes.h ftsizes.h
@ -61,12 +56,11 @@ PRJ_EXPORTS
../../include/freetype/ftstroke.h ftstroke.h
../../include/freetype/ftsynth.h ftsynth.h
../../include/freetype/ftsystem.h ftsystem.h
../../include/freetype/ftt1drv.h ftt1drv.h
../../include/freetype/fttrigon.h fttrigon.h
../../include/freetype/ftttdrv.h ftttdrv.h
../../include/freetype/fttypes.h fttypes.h
../../include/freetype/ftwinfnt.h ftwinfnt.h
../../include/freetype/t1tables.h t1tables.h
../../include/freetype/ttnameid.h ttnameid.h
../../include/freetype/tttables.h tttables.h
../../include/freetype/tttags.h tttags.h
../../include/freetype/ttunpat.h ttunpat.h

View File

@ -2,7 +2,7 @@
// FreeType 2 makefile for the symbian platform
//
// Copyright (C) 2008-2022 by
// Copyright 2008-2016 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@ -28,11 +28,13 @@ source ftbbox.c
source ftbdf.c
source ftbitmap.c
source ftcid.c
source ftfntfmt.c
source ftfstype.c
source ftgasp.c
source ftglyph.c
source ftgxval.c
source ftinit.c
source ftlcdfil.c
source ftmm.c
source ftotval.c
source ftpatent.c
@ -47,10 +49,6 @@ sourcepath ..\..\src\bdf
source bdf.c
sourcepath ..\..\src\bzip2
source ftbzip2.c
sourcepath ..\..\src\cache
source ftcache.c
@ -67,6 +65,10 @@ sourcepath ..\..\src\gzip
source ftgzip.c
sourcepath ..\..\src\bzip2
source ftbzip2.c
sourcepath ..\..\src\lzw
source ftlzw.c
@ -124,12 +126,12 @@ systeminclude ..\..\include
systeminclude \epoc32\include\stdapis
userinclude ..\..\src\autofit
userinclude ..\..\src\bdf
userinclude ..\..\src\bzip2
userinclude ..\..\src\cache
userinclude ..\..\src\cff
userinclude ..\..\src\cid
userinclude ..\..\src\gxvalid
userinclude ..\..\src\gzip
userinclude ..\..\src\bzip2
userinclude ..\..\src\lzw
userinclude ..\..\src\otvalid
userinclude ..\..\src\pcf

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -103,7 +103,6 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),)
check_platform := 1
endif
# Include the automatic host platform detection rules when we need to
# check the platform.
#
@ -113,17 +112,6 @@ ifdef check_platform
include $(TOP_DIR)/builds/detect.mk
# For builds directly from the git repository we need to copy files
# from `subprojects/dlg' to `src/dlg' and `include/dlg'.
#
ifeq ($(wildcard $(TOP_DIR)/src/dlg/dlg.*),)
ifeq ($(wildcard $(TOP_DIR)/subprojects/dlg/*),)
copy_submodule: check_out_submodule
endif
setup: copy_submodule
endif
# This rule makes sense for Unix only to remove files created by a run of
# the configure script which hasn't been successful (so that no
# `config.mk' has been created). It uses the built-in $(RM) command of
@ -166,23 +154,6 @@ else
endif # test check_platform
.PHONY: check_out_submodule copy_submodule
check_out_submodule:
$(info Checking out submodule in `subprojects/dlg')
git submodule init
git submodule update
copy_submodule:
$(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg')
ifeq ($(wildcard include/dlg),)
mkdir $(subst /,$(SEP),include/dlg)
endif
$(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg)
$(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg)
$(COPY) $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg)
# We always need the list of modules in ftmodule.h.
#
all setup: $(FTMODULE_H)
@ -201,8 +172,7 @@ include $(TOP_DIR)/builds/modules.mk
# get FreeType version string, using a
# poor man's `sed' emulation with make's built-in string functions
#
work := $(strip $(shell $(CAT) \
$(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
work := $(strip $(shell $(CAT) $(TOP_DIR)/include/freetype/freetype.h))
work := $(subst |,x,$(work))
work := $(subst $(space),|,$(work))
work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
@ -220,14 +190,13 @@ work := $(word 2,$(work))
patch := $(subst |,$(space),$(work))
patch := $(firstword $(patch))
# ifneq ($(findstring x0x,x$(patch)x),)
# version := $(major).$(minor)
# winversion := $(major)$(minor)
# else
ifneq ($(findstring x0x,x$(patch)x),)
version := $(major).$(minor)
winversion := $(major)$(minor)
else
version := $(major).$(minor).$(patch)
winversion := $(major)$(minor)$(patch)
version_tag := VER-$(major)-$(minor)-$(patch)
# endif
endif
# This target builds the tarballs.
@ -238,7 +207,7 @@ patch := $(firstword $(patch))
dist:
-rm -rf tmp
rm -f freetype-$(version).tar.gz
rm -f freetype-$(version).tar.xz
rm -f freetype-$(version).tar.bz2
rm -f ft$(winversion).zip
for d in `find . -wholename '*/.git' -prune \
@ -249,26 +218,30 @@ dist:
currdir=`pwd` ; \
for f in `find . -wholename '*/.git' -prune \
-o -name .gitattributes \
-o -name .gitignore \
-o -name .gitlab-ci.yml \
-o -name .gitmodules \
-o -name .mailmap \
-o -type d \
-o -print` ; do \
ln -s $$currdir/$$f tmp/$$f ; \
done
@# Prevent generation of .pyc files. Python follows (soft) links if
@# the link's directory is write protected, so we have temporarily
@# disable write access here too.
chmod -w src/tools/docmaker
cd tmp ; \
$(MAKE) devel ; \
$(MAKE) do-dist
chmod +w src/tools/docmaker
mv tmp freetype-$(version)
tar -H ustar -chf - freetype-$(version) \
| gzip -9 -c > freetype-$(version).tar.gz
tar -H ustar -chf - freetype-$(version) \
| xz -c > freetype-$(version).tar.xz
| bzip2 -c > freetype-$(version).tar.bz2
@# Use CR/LF for zip files.
zip -lr9 ft$(winversion).zip freetype-$(version)
@ -283,10 +256,6 @@ dist:
CONFIG_GUESS = ~/git/config/config.guess
CONFIG_SUB = ~/git/config/config.sub
# We also use this repository to access the gnulib script that converts git
# commit messages to a ChangeLog file.
CHANGELOG_SCRIPT = ~/git/config/gitlog-to-changelog
# Don't say `make do-dist'. Always use `make dist' instead.
#
@ -304,19 +273,4 @@ do-dist: distclean refdoc
cp $(CONFIG_GUESS) builds/unix
cp $(CONFIG_SUB) builds/unix
@# Generate `ChangeLog' file with commits since release 2.11.0
@# (when we stopped creating this file manually).
$(CHANGELOG_SCRIPT) \
--format='%B%n' \
--no-cluster \
-- VER-2-11-0..$(version_tag) \
> ChangeLog
@# Remove intermediate files created by the `refdoc' target.
rm -rf docs/markdown
rm -f docs/mkdocs.yml
@# Remove more stuff related to git.
rm -rf subprojects/dlg
# EOF

View File

@ -10,7 +10,6 @@ configure.ac
freetype2.pc
freetype-config
ftconfig.h
ftoption.h
install-sh
libtool
ltmain.sh

View File

@ -1,177 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
#
# DESCRIPTION
#
# This macro compares two version strings. Due to the various number of
# minor-version numbers that can exist, and the fact that string
# comparisons are not compatible with numeric comparisons, this is not
# necessarily trivial to do in a autoconf script. This macro makes doing
# these comparisons easy.
#
# The six basic comparisons are available, as well as checking equality
# limited to a certain number of minor-version levels.
#
# The operator OP determines what type of comparison to do, and can be one
# of:
#
# eq - equal (test A == B)
# ne - not equal (test A != B)
# le - less than or equal (test A <= B)
# ge - greater than or equal (test A >= B)
# lt - less than (test A < B)
# gt - greater than (test A > B)
#
# Additionally, the eq and ne operator can have a number after it to limit
# the test to that number of minor versions.
#
# eq0 - equal up to the length of the shorter version
# ne0 - not equal up to the length of the shorter version
# eqN - equal up to N sub-version levels
# neN - not equal up to N sub-version levels
#
# When the condition is true, shell commands ACTION-IF-TRUE are run,
# otherwise shell commands ACTION-IF-FALSE are run. The environment
# variable 'ax_compare_version' is always set to either 'true' or 'false'
# as well.
#
# Examples:
#
# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
#
# would both be true.
#
# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
#
# would both be false.
#
# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
#
# would be true because it is only comparing two minor versions.
#
# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
#
# would be true because it is only comparing the lesser number of minor
# versions of the two values.
#
# Note: The characters that separate the version numbers do not matter. An
# empty string is the same as version 0. OP is evaluated by autoconf, not
# configure, so must be a string, not a variable.
#
# The author would like to acknowledge Guido Draheim whose advice about
# the m4_case and m4_ifvaln functions make this macro only include the
# portions necessary to perform the specific comparison specified by the
# OP argument in the final configure script.
#
# LICENSE
#
# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 13
dnl #########################################################################
AC_DEFUN([AX_COMPARE_VERSION], [
AC_REQUIRE([AC_PROG_AWK])
# Used to indicate true or false condition
ax_compare_version=false
# Convert the two version strings to be compared into a format that
# allows a simple string comparison. The end result is that a version
# string of the form 1.12.5-r617 will be converted to the form
# 0001001200050617. In other words, each number is zero padded to four
# digits, and non digits are removed.
AS_VAR_PUSHDEF([A],[ax_compare_version_A])
A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/[[^0-9]]//g'`
AS_VAR_PUSHDEF([B],[ax_compare_version_B])
B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/[[^0-9]]//g'`
dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
dnl # then the first line is used to determine if the condition is true.
dnl # The sed right after the echo is to remove any indented white space.
m4_case(m4_tolower($2),
[lt],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
],
[gt],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
],
[le],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
],
[ge],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
],[
dnl Split the operator from the subversion count if present.
m4_bmatch(m4_substr($2,2),
[0],[
# A count of zero means use the length of the shorter version.
# Determine the number of characters in A and B.
ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
# Set A to no more than B's length and B to no more than A's length.
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
],
[[0-9]+],[
# A count greater than zero means use only that many subversions
A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
],
[.+],[
AC_WARNING(
[invalid OP numeric parameter: $2])
],[])
# Pad zeros at end of numbers to make same length.
ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
B="$B`echo $A | sed 's/./0/g'`"
A="$ax_compare_version_tmp_A"
# Check for equality or inequality as necessary.
m4_case(m4_tolower(m4_substr($2,0,2)),
[eq],[
test "x$A" = "x$B" && ax_compare_version=true
],
[ne],[
test "x$A" != "x$B" && ax_compare_version=true
],[
AC_WARNING([invalid OP parameter: $2])
])
])
AS_VAR_POPDEF([A])dnl
AS_VAR_POPDEF([B])dnl
dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
if test "$ax_compare_version" = "true" ; then
m4_ifvaln([$4],[$4],[:])dnl
m4_ifvaln([$5],[else $5])dnl
fi
]) dnl AX_COMPARE_VERSION

View File

@ -1,66 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_prog_python_version.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_PYTHON_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
#
# DESCRIPTION
#
# Makes sure that python supports the version indicated. If true the shell
# commands in ACTION-IF-TRUE are executed. If not the shell commands in
# ACTION-IF-FALSE are run. Note if $PYTHON is not set (for example by
# running AC_CHECK_PROG or AC_PATH_PROG) the macro will fail.
#
# Example:
#
# AC_PATH_PROG([PYTHON],[python])
# AX_PROG_PYTHON_VERSION([2.4.4],[ ... ],[ ... ])
#
# This will check to make sure that the python you have supports at least
# version 2.4.4.
#
# NOTE: This macro uses the $PYTHON variable to perform the check.
# AX_WITH_PYTHON can be used to set that variable prior to running this
# macro. The $PYTHON_VERSION variable will be valorized with the detected
# version.
#
# LICENSE
#
# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 12
AC_DEFUN([AX_PROG_PYTHON_VERSION],[
AC_REQUIRE([AC_PROG_SED])
AC_REQUIRE([AC_PROG_GREP])
AS_IF([test -n "$PYTHON"],[
ax_python_version="$1"
AC_MSG_CHECKING([for python version])
changequote(<<,>>)
python_version=`$PYTHON -V 2>&1 | $GREP "^Python " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
changequote([,])
AC_MSG_RESULT($python_version)
AC_SUBST([PYTHON_VERSION],[$python_version])
AX_COMPARE_VERSION([$ax_python_version],[le],[$python_version],[
:
$2
],[
:
$3
])
],[
AC_MSG_WARN([could not find the python interpreter])
$3
])
])

View File

@ -1,522 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
# needed for multi-threaded programs (defaults to the value of CC
# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
# special cc_r/CC_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
# CXX="$PTHREAD_CXX"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 30
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_TARGET])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
ax_pthread_save_CC="$CC"
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok])
if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
CC="$ax_pthread_save_CC"
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items with a "," contain both
# C compiler flags (before ",") and linker flags (after ","). Other items
# starting with a "-" are C compiler flags, and remaining items are
# library names, except for "none" which indicates that we try without
# any flags at all, and "pthread-config" which is a program returning
# the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
# (Note: HP C rejects this with "bad form for `-t' option")
# -pthreads: Solaris/gcc (Note: HP C also rejects)
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads and
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
# is present but should not be used directly; and before -mthreads,
# because the compiler interprets this as "-mt" + "-hreads")
# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case $target_os in
freebsd*)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
;;
hpux*)
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
# multi-threading and also sets -lpthread."
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
;;
openedition*)
# IBM z/OS requires a feature-test macro to be defined in order to
# enable POSIX threads at all, so give the user a hint if this is
# not set. (We don't define these ourselves, as they can affect
# other portions of the system API in unpredictable ways.)
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
[
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
AX_PTHREAD_ZOS_MISSING
# endif
],
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
;;
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (N.B.: The stubs are missing
# pthread_cleanup_push, or rather a function called by this macro,
# so we could check for that, but who knows whether they'll stub
# that too in a future libc.) So we'll check first for the
# standard Solaris way of linking pthreads (-mt -lpthread).
ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
;;
esac
# Are we compiling with Clang?
AC_CACHE_CHECK([whether $CC is Clang],
[ax_cv_PTHREAD_CLANG],
[ax_cv_PTHREAD_CLANG=no
# Note that Autoconf sets GCC=yes for Clang as well as GCC
if test "x$GCC" = "xyes"; then
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
# if defined(__clang__) && defined(__llvm__)
AX_PTHREAD_CC_IS_CLANG
# endif
],
[ax_cv_PTHREAD_CLANG=yes])
fi
])
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
# Note that for GCC and Clang -pthread generally implies -lpthread,
# except when -nostdlib is passed.
# This is problematic using libtool to build C++ shared libraries with pthread:
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
# To solve this, first try -pthread together with -lpthread for GCC
AS_IF([test "x$GCC" = "xyes"],
[ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
AS_IF([test "x$ax_pthread_clang" = "xyes"],
[ax_pthread_flags="-pthread,-lpthread -pthread"])
# The presence of a feature test macro requesting re-entrant function
# definitions is, on some systems, a strong hint that pthreads support is
# correctly enabled
case $target_os in
darwin* | hpux* | linux* | osf* | solaris*)
ax_pthread_check_macro="_REENTRANT"
;;
aix*)
ax_pthread_check_macro="_THREAD_SAFE"
;;
*)
ax_pthread_check_macro="--"
;;
esac
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
[ax_pthread_check_cond=0],
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
if test "x$ax_pthread_ok" = "xno"; then
for ax_pthread_try_flag in $ax_pthread_flags; do
case $ax_pthread_try_flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
*,*)
PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
PTHREAD_CFLAGS="$ax_pthread_try_flag"
;;
pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
PTHREAD_LIBS="-l$ax_pthread_try_flag"
;;
esac
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
# if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
static void *some_global = NULL;
static void routine(void *a)
{
/* To avoid any unused-parameter or
unused-but-set-parameter warning. */
some_global = a;
}
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
AC_MSG_RESULT([$ax_pthread_ok])
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Clang needs special handling, because older versions handle the -pthread
# option in a rather... idiosyncratic way
if test "x$ax_pthread_clang" = "xyes"; then
# Clang takes -pthread; it has never supported any other flag
# (Note 1: This will need to be revisited if a system that Clang
# supports has POSIX threads in a separate library. This tends not
# to be the way of modern systems, but it's conceivable.)
# (Note 2: On some systems, notably Darwin, -pthread is not needed
# to get POSIX threads support; the API is always present and
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
# -pthread does define _REENTRANT, and while the Darwin headers
# ignore this macro, third-party headers might not.)
# However, older versions of Clang make a point of warning the user
# that, in an invocation where only linking and no compilation is
# taking place, the -pthread option has no effect ("argument unused
# during compilation"). They expect -pthread to be passed in only
# when source code is being compiled.
#
# Problem is, this is at odds with the way Automake and most other
# C build frameworks function, which is that the same flags used in
# compilation (CFLAGS) are also used in linking. Many systems
# supported by AX_PTHREAD require exactly this for POSIX threads
# support, and in fact it is often not straightforward to specify a
# flag that is used only in the compilation phase and not in
# linking. Such a scenario is extremely rare in practice.
#
# Even though use of the -pthread flag in linking would only print
# a warning, this can be a nuisance for well-run software projects
# that build with -Werror. So if the active version of Clang has
# this misfeature, we search for an option to squash it.
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
# Create an alternate version of $ac_link that compiles and
# links in two steps (.c -> .o, .o -> exe) instead of one
# (.c -> exe), because the warning occurs only in the second
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
ac_link="$ax_pthread_save_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[ac_link="$ax_pthread_2step_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[break])
])
done
ac_link="$ax_pthread_save_ac_link"
CFLAGS="$ax_pthread_save_CFLAGS"
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
])
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
no | unknown) ;;
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
esac
fi # $ax_pthread_clang = yes
# Various other checks:
if test "x$ax_pthread_ok" = "xyes"; then
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_CACHE_CHECK([for joinable pthread attribute],
[ax_cv_PTHREAD_JOINABLE_ATTR],
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $ax_pthread_attr; return attr /* ; */])],
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
[])
done
])
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
[$ax_cv_PTHREAD_JOINABLE_ATTR],
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
ax_pthread_joinable_attr_defined=yes
])
AC_CACHE_CHECK([whether more special flags are required for pthreads],
[ax_cv_PTHREAD_SPECIAL_FLAGS],
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
case $target_os in
solaris*)
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
;;
esac
])
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
test "x$ax_pthread_special_flags_added" != "xyes"],
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
ax_pthread_special_flags_added=yes])
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
[ax_cv_PTHREAD_PRIO_INHERIT],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
[[int i = PTHREAD_PRIO_INHERIT;
return i;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
ax_pthread_prio_inherit_defined=yes
])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != "xyes"; then
case $target_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[
AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
],
[
AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
]
)
])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
AC_SUBST([PTHREAD_CXX])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test "x$ax_pthread_ok" = "xyes"; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD

View File

@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
#
# Copyright (C) 2001-2022 by
# Copyright 2001-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -12,12 +12,12 @@
# fully.
AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype])
AC_CONFIG_SRCDIR([ftconfig.h.in])
AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update `docs/VERSIONS.TXT'!
version_info='24:3:18'
version_info='18:5:12'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@ -37,7 +37,6 @@ AC_SUBST(EXEEXT)
PKG_PROG_PKG_CONFIG([0.24])
LT_INIT(win32-dll)
AC_CHECK_HEADER([windows.h], [LT_PROG_RC])
# checks for native programs to generate building tool
@ -97,81 +96,138 @@ esac
# checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h unistd.h])
# checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
AC_ARG_ENABLE([freetype-config],
AS_HELP_STRING([--enable-freetype-config], [install freetype-config]),
[case "${enableval}" in
yes) enable_freetype_config="TRUE" ;;
no) enable_freetype_config="FALSE" ;;
*) AC_MSG_ERROR([unknown value '${enableval}' passed with --enable-freetype-config]) ;;
esac], [enable_freetype_config="FALSE"])
AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
# check whether cpp computation of size of int and long in ftconfig.in works
AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
orig_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
ac_clean_files=
for f in ft2build.h ftoption.h ftstdlib.h; do
if test ! -f $f; then
ac_clean_files="$ac_clean_files $f"
touch $f
fi
done
cat > conftest.c <<\_ACEOF
#include <limits.h>
#define FT_CONFIG_OPTIONS_H "ftoption.h"
#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
#define FT_UINT_MAX UINT_MAX
#define FT_ULONG_MAX ULONG_MAX
#include "ftconfig.in"
_ACEOF
echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
echo >> conftest.c "#endif"
echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
echo >> conftest.c "#endif"
${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh
eval `cat conftest.sh`
rm -f conftest.* $ac_clean_files
if test x != "x${ac_cpp_ft_sizeof_int}" \
-a x != x"${ac_cpp_ft_sizeof_long}"; then
unset ft_use_autoconf_sizeof_types
else
ft_use_autoconf_sizeof_types=yes
fi
AC_ARG_ENABLE(biarch-config,
[ --enable-biarch-config install biarch ftconfig.h to support multiple
architectures by single file], [], [])
case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
:yes:yes:)
AC_MSG_RESULT([broken but use it])
unset ft_use_autoconf_sizeof_types
;;
::no:)
AC_MSG_RESULT([works but ignore it])
ft_use_autoconf_sizeof_types=yes
;;
::yes: | :::)
AC_MSG_RESULT([yes])
unset ft_use_autoconf_sizeof_types
;;
*)
AC_MSG_RESULT([no])
ft_use_autoconf_sizeof_types=yes
;;
esac
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [],
[Define if autoconf sizeof types should be used.])
fi
CPPFLAGS="${orig_CPPFLAGS}"
# checks for library functions
AC_SYS_LARGEFILE
# Here we check whether we can use our mmap file component.
#
# Note that `ftsystem.c` for Windows has its own mmap-like implementation
# not covered by `AC_FUNC_MMAP` and/or `FT_UNMAP_PARAM`.
AC_ARG_ENABLE([mmap],
AS_HELP_STRING([--disable-mmap],
[do not check mmap() and do not use]),
[enable_mmap="no"], [enable_mmap="yes"])
[enable_mmap="no"],[enable_mmap="yes"])
if test "x${enable_mmap}" != "xno"; then
case "$host" in
*-*-mingw*)
AC_MSG_CHECKING([for working mmap])
AC_MSG_RESULT([using MapViewOfFile in Windows])
FTSYS_SRC='$(TOP_DIR)/builds/windows/ftsystem.c'
;;
*)
AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
AC_FUNC_MMAP
fi
if test "x${enable_mmap}" = "xno" \
-o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
else
FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
AC_CHECK_DECLS([munmap],
[],
[],
[
AC_CHECK_DECLS([munmap],
[],
[],
[
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/mman.h>
])
])
FT_MUNMAP_PARAM
fi
;;
esac
fi
if test -z "$FTSYS_SRC"; then
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
FT_MUNMAP_PARAM
fi
AC_SUBST([FTSYS_SRC])
AC_CHECK_FUNCS([memcpy memmove])
# get compiler flags right
#
# We try to make the compiler work for C99-strict source. Even if the
# C compiler is gcc and C99 flags are available, some system headers
# might be broken in C99 mode. We have to check whether compilation
# finishes successfully.
# We try to make the compiler work for C89-strict source. Even if the
# C compiler is gcc and C89 flags are available, some system headers
# (e.g., Android Bionic libc) are broken in C89 mode. We have to check
# whether the compilation finishes successfully.
#
# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW.
#
# To avoid zillions of
#
# ISO C90 does not support 'long long'
#
# warnings, we disable `-pedantic' for gcc version < 4.6.
#
if test "x$GCC" = xyes; then
XX_CFLAGS="-Wall"
@ -183,11 +239,23 @@ if test "x$GCC" = xyes; then
XX_ANSIFLAGS="-pedantic"
;;
*)
XX_ANSIFLAGS=""
GCC_VERSION=`$CC -dumpversion`
GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
for a in "-pedantic" "-std=c99"
XX_PEDANTIC=-pedantic
if test $GCC_MAJOR -lt 4; then
XX_PEDANTIC=
else
if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then
XX_PEDANTIC=
fi
fi
XX_ANSIFLAGS=""
for a in $XX_PEDANTIC -ansi
do
AC_MSG_CHECKING([$CC compiler flag ${a} to assure ANSI C99 works correctly])
AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
orig_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
AC_COMPILE_IFELSE([
@ -204,7 +272,7 @@ if test "x$GCC" = xyes; then
}
])],
[AC_MSG_RESULT([ok, adding to XX_ANSIFLAGS])
[AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
],
[AC_MSG_RESULT([no])])
@ -229,30 +297,6 @@ AC_SUBST([XX_CFLAGS])
AC_SUBST([XX_ANSIFLAGS])
# It is recommended that shared libraries hide symbols except those with
# explicit __attribute__((visibility("default"))).
#
found_visibility_flag=no
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
orig_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -fvisibility=hidden"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[found_visibility_flag=yes
AC_MSG_RESULT(yes)],
[CFLAGS="${orig_CFLAGS}"
AC_MSG_RESULT(no)])
if test "${found_visibility_flag}" = "no"; then
AC_MSG_CHECKING([for -xldscope=hidden compiler flag])
orig_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -xldscope=hidden"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[found_visibility_flag=yes
AC_MSG_RESULT(yes)],
[CFLAGS="${orig_CFLAGS}"
AC_MSG_RESULT(no)])
fi
# All library tests below try `pkg-config' first. If that fails, a function
# from the library is tested in the traditional autoconf way (zlib, bzip2),
# or a config script is called (libpng).
@ -317,12 +361,6 @@ if test x"$with_zlib" = xyes -a "$have_zlib" = no; then
AC_MSG_ERROR([external zlib support requested but library not found])
fi
SYSTEM_ZLIB=
if test "$have_zlib" != no; then
SYSTEM_ZLIB=yes
fi
AC_SUBST([SYSTEM_ZLIB])
# check for system libbz2
@ -405,7 +443,7 @@ if test x"$with_png" = xyes -o x"$with_png" = xauto; then
libpng_libsstaticconf="$LIBPNG_LIBS"
have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
else
# fall back to config script
# fall back to config script.
AC_MSG_CHECKING([for libpng-config])
if which libpng-config > /dev/null 2>&1; then
LIBPNG_CFLAGS=`libpng-config --cflags`
@ -435,7 +473,7 @@ AC_ARG_WITH([harfbuzz],
have_harfbuzz=no
if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then
harfbuzz_pkg="harfbuzz >= 2.0.0"
harfbuzz_pkg="harfbuzz >= 0.9.21"
have_harfbuzz_pkg=no
if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then
@ -470,94 +508,6 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then
fi
# check for system libbrotlidec
AC_ARG_WITH([brotli],
[AS_HELP_STRING([--with-brotli=@<:@yes|no|auto@:>@],
[support decompression of WOFF2 streams @<:@default=auto@:>@])],
[], [with_brotli=auto])
have_brotli=no
if test x"$with_brotli" = xyes -o x"$with_brotli" = xauto; then
brotli_pkg="libbrotlidec"
have_brotli_pkg=no
if test x"$BROTLI_CFLAGS" = x -a x"$BROTLI_LIBS" = x; then
PKG_CHECK_EXISTS([$brotli_pkg], [have_brotli_pkg=yes])
fi
PKG_CHECK_MODULES([BROTLI], [$brotli_pkg],
[have_brotli="yes (pkg-config)"], [:])
if test $have_brotli_pkg = yes; then
# we have libbrotlidec.pc
brotli_reqpriv="$brotli_pkg"
brotli_libspriv=
brotli_libsstaticconf=`$PKG_CONFIG --static --libs "$brotli_pkg"`
else
brotli_reqpriv=
if test "$have_brotli" != no; then
# BROTLI_CFLAGS and BROTLI_LIBS are set by the user
brotli_libspriv="$BROTLI_LIBS"
brotli_libsstaticconf="$BROTLI_LIBS"
have_brotli="yes (BROTLI_CFLAGS and BROTLI_LIBS)"
else
# since Brotli is quite a new library we don't fall back to a
# different test
:
fi
fi
fi
if test x"$with_brotli" = xyes -a "$have_brotli" = no; then
AC_MSG_ERROR([brotli support requested but library not found])
fi
# Checks for the demo programs.
#
# FreeType doesn't need this. However, since the demo program repository
# doesn't come with a `configure` script of its own, we integrate the tests
# here for simplicity.
# We need `clock_gettime` from 'librt' for the `ftbench` demo program.
#
# The code is modeled after gnulib's file `clock_time.m4`, ignoring
# very old Solaris systems.
LIB_CLOCK_GETTIME=
AC_SEARCH_LIBS([clock_gettime],
[rt],
[test "$ac_cv_search_clock_gettime" = "none required" \
|| LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
FT_DEMO_CFLAGS=""
FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME"
# '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])
AC_SUBST([FT_DEMO_LDFLAGS])
# Some options handling SDKs/archs in CFLAGS should be copied
# to LDFLAGS. Apple TechNote 2137 recommends to include these
# options in CFLAGS but not in LDFLAGS.
@ -968,68 +918,38 @@ case "$CFLAGS" in
;;
esac
# Check for pthreads
AX_PTHREAD([have_pthread=yes], [have_pthread=no])
# Check for Python and docwriter
have_py3=no
have_docwriter=no
PIP=pip
AC_CHECK_PROGS([PYTHON], [python3 python], [missing])
if test "x$PYTHON" != "xmissing"; then
AX_PROG_PYTHON_VERSION([3.5], [have_py3=yes], [])
if test "x$have_py3" = "xyes"; then
PIP="$PYTHON -m $PIP"
AC_MSG_CHECKING([for `docwriter' Python module])
$PYTHON -m docwriter -h > /dev/null 2>&1
if test "x$?" = "x0"; then
have_docwriter=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
fi
# entries in Requires.private are separated by commas
PKGCONFIG_REQUIRES_PRIVATE="$zlib_reqpriv, \
$bzip2_reqpriv, \
$libpng_reqpriv, \
$harfbuzz_reqpriv, \
$brotli_reqpriv"
# entries in Requires.private are separated by commas;
REQUIRES_PRIVATE="$zlib_reqpriv, \
$bzip2_reqpriv, \
$libpng_reqpriv, \
$harfbuzz_reqpriv"
# beautify
PKGCONFIG_REQUIRES_PRIVATE=`echo "$PKGCONFIG_REQUIRES_PRIVATE" \
| sed -e 's/^ *//' \
-e 's/ *$//' \
-e 's/, */,/g' \
-e 's/,,*/,/g' \
-e 's/^,*//' \
-e 's/,*$//' \
-e 's/,/, /g'`
REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \
| sed -e 's/^ *//' \
-e 's/ *$//' \
-e 's/, */,/g' \
-e 's/,,*/,/g' \
-e 's/^,*//' \
-e 's/,*$//' \
-e 's/,/, /g'`
PKGCONFIG_LIBS_PRIVATE="$zlib_libspriv \
$bzip2_libspriv \
$libpng_libspriv \
$harfbuzz_libspriv \
$brotli_libspriv \
$ft2_extra_libs"
LIBS_PRIVATE="$zlib_libspriv \
$bzip2_libspriv \
$libpng_libspriv \
$harfbuzz_libspriv \
$ft2_extra_libs"
# beautify
PKGCONFIG_LIBS_PRIVATE=`echo "$PKGCONFIG_LIBS_PRIVATE" \
| sed -e 's/^ *//' \
-e 's/ *$//' \
-e 's/ */ /g'`
LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \
| sed -e 's/^ *//' \
-e 's/ *$//' \
-e 's/ */ /g'`
LIBSSTATIC_CONFIG="-lfreetype \
$zlib_libsstaticconf \
$bzip2_libsstaticconf \
$libpng_libsstaticconf \
$harfbuzz_libsstaticconf \
$brotli_libsstaticconf \
$ft2_extra_libs"
# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later
# on if necessary; also beautify
@ -1040,28 +960,10 @@ LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \
-e 's/ *$//' \
-e 's/ */ /g'`
# If FreeType gets installed with `--disable-shared', don't use
# 'private' fields. `pkg-config' only looks into `.pc' files and is
# completely agnostic to whether shared libraries are actually present
# or not. As a consequence, the user had to specify `--static' while
# calling `pkg-config', which configure scripts are normally not
# prepared for.
PKGCONFIG_REQUIRES=
PKGCONFIG_LIBS='-L${libdir} -lfreetype'
if test $enable_shared = "no"; then
PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES $PKGCONFIG_REQUIRES_PRIVATE"
PKGCONFIG_REQUIRES_PRIVATE=
PKGCONFIG_LIBS="$PKGCONFIG_LIBS $PKGCONFIG_LIBS_PRIVATE"
PKGCONFIG_LIBS_PRIVATE=
fi
AC_SUBST([ftmac_c])
AC_SUBST([PKGCONFIG_REQUIRES])
AC_SUBST([PKGCONFIG_LIBS])
AC_SUBST([PKGCONFIG_REQUIRES_PRIVATE])
AC_SUBST([PKGCONFIG_LIBS_PRIVATE])
AC_SUBST([REQUIRES_PRIVATE])
AC_SUBST([LIBS_PRIVATE])
AC_SUBST([LIBSSTATIC_CONFIG])
AC_SUBST([hardcode_libdir_flag_spec])
@ -1072,76 +974,36 @@ AC_SUBST([build_libtool_libs])
# changing LDFLAGS value should only be done after
# lt_cv_prog_compiler_static_works test
ftoption_set()
{
regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\""
FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
}
ftoption_unset()
{
regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\""
FTOPTION_H_SED="$FTOPTION_H_SED $regexp"
}
if test "$have_zlib" != no; then
CFLAGS="$CFLAGS $ZLIB_CFLAGS"
CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
LDFLAGS="$LDFLAGS $ZLIB_LIBS"
ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB
else
ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB
fi
if test "$have_bzip2" != no; then
CFLAGS="$CFLAGS $BZIP2_CFLAGS"
CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
LDFLAGS="$LDFLAGS $BZIP2_LIBS"
ftoption_set FT_CONFIG_OPTION_USE_BZIP2
else
ftoption_unset FT_CONFIG_OPTION_USE_BZIP2
fi
if test "$have_libpng" != no; then
CFLAGS="$CFLAGS $LIBPNG_CFLAGS"
CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG"
LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
ftoption_set FT_CONFIG_OPTION_USE_PNG
else
ftoption_unset FT_CONFIG_OPTION_USE_PNG
fi
if test "$have_harfbuzz" != no; then
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ"
LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS"
ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ
else
ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ
fi
if test "$have_brotli" != no; then
CFLAGS="$CFLAGS $BROTLI_CFLAGS"
LDFLAGS="$LDFLAGS $BROTLI_LIBS"
ftoption_set FT_CONFIG_OPTION_USE_BROTLI
else
ftoption_unset FT_CONFIG_OPTION_USE_BROTLI
fi
if test "$have_pthread" != no; then
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS $PTHREAD_LIBS"
fi
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
# We don't want to use a template file for `ftoption.h', since compilation
# should work without calling a configure script also. For this reason, we
# copy the `include/freetype/config/ftoption.h' file to the `unix/builds'
# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just
# constructed $FTOPTION_H_SED regexp (using the post-action of
# `AC_CONFIG_FILES'); this is also the version that gets installed later on.
# configuration file -- stay in 8.3 limit
#
AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
[mv ftoption.h ftoption.tmp
eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
rm ftoption.tmp],
[FTOPTION_H_SED="$FTOPTION_H_SED"])
# since #undef doesn't survive in configuration header files we replace
# `/undef' with `#undef' after creating the output file
AC_CONFIG_HEADERS([ftconfig.h])
AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
[mv ftconfig.h ftconfig.tmp
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
rm ftconfig.tmp])
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
# and `builds/unix/unix-cc.mk' that will be used by the build system
@ -1149,6 +1011,10 @@ AC_CONFIG_HEADERS([ftconfig.h])
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
unix-def.mk:unix-def.in])
# re-generate the Jamfile to use libtool now
#
# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
AC_OUTPUT
AC_MSG_NOTICE([
@ -1158,29 +1024,6 @@ Library configuration:
bzip2: $have_bzip2
libpng: $have_libpng
harfbuzz: $have_harfbuzz
brotli: $have_brotli
pthread: $have_pthread
])
# Warn if docwriter is not installed
if test $have_docwriter = no; then
AC_MSG_WARN([
`make refdoc' will fail since pip package `docwriter' is not installed.
To install, run `$PIP install docwriter', or to use a Python
virtual environment, run `make refdoc-venv' (requires pip package
`virtualenv'). These operations require Python >= 3.5.
])
fi
# Warn if pthread is not available
if test $have_pthread = no; then
AC_MSG_WARN([
`FT_DEBUG_LOGGING' will not work since the `pthread' library is not
available. This warning can be safely ignored if you don't plan to use
this configuration macro.
])
fi
# end of configure.raw

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -40,10 +40,8 @@ ifeq ($(PLATFORM),unix)
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-dev.mk
CC := gcc
.PHONY: devel
devel: setup
@:
.PHONY: devel
else
# If `lcc' is the requested target, we use a special configuration
@ -52,10 +50,8 @@ ifeq ($(PLATFORM),unix)
ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-lcc.mk
CC := lcc
.PHONY: lcc
lcc: setup
@:
.PHONY: lcc
else
# If a Unix platform is detected, the configure script is called and
@ -72,11 +68,9 @@ ifeq ($(PLATFORM),unix)
# platform).
#
CONFIG_FILE := unix.mk
must_configure := 1
.PHONY: unix
unix: setup
@:
must_configure := 1
.PHONY: unix
endif
endif

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# Copyright (C) 2000-2022 by
# Copyright 2000-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -12,55 +12,11 @@
LC_ALL=C
export LC_ALL
# if `pkg-config' is available, use values from `freetype2.pc'
%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
if test $? -eq 0 ; then
# note that option `--variable' is not affected by the
# PKG_CONFIG_SYSROOT_DIR environment variable
if test "x$SYSROOT" != "x" ; then
PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
export PKG_CONFIG_SYSROOT_DIR
fi
prefix=`%PKG_CONFIG% --variable prefix freetype2`
exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
includedir=`%PKG_CONFIG% --variable includedir freetype2`
libdir=`%PKG_CONFIG% --variable libdir freetype2`
version=`%PKG_CONFIG% --modversion freetype2`
cflags=`%PKG_CONFIG% --cflags freetype2`
dynamic_libs=`%PKG_CONFIG% --libs freetype2`
static_libs=`%PKG_CONFIG% --static --libs freetype2`
else
prefix="%prefix%"
exec_prefix="%exec_prefix%"
includedir="%includedir%"
libdir="%libdir%"
version=%ft_version%
cflags="-I${SYSROOT}$includedir/freetype2"
dynamic_libs="-lfreetype"
static_libs="%LIBSSTATIC_CONFIG%"
if test "${SYSROOT}$libdir" != "/usr/lib" &&
test "${SYSROOT}$libdir" != "/usr/lib64" ; then
libs_L="-L${SYSROOT}$libdir"
fi
fi
orig_prefix=$prefix
orig_exec_prefix=$exec_prefix
orig_includedir=$includedir
orig_libdir=$libdir
include_suffix=`echo $includedir | sed "s|$prefix||"`
lib_suffix=`echo $libdir | sed "s|$exec_prefix||"`
prefix="%prefix%"
exec_prefix="%exec_prefix%"
exec_prefix_set="no"
includedir="%includedir%"
libdir="%libdir%"
usage()
{
@ -83,17 +39,14 @@ Options:
library
--static make command line options display flags
for static linking
--help display this help and exit
EOF
exit $1
}
if test $# -eq 0 ; then
usage 1 1>&2
fi
while test $# -gt 0 ; do
case "$1" in
-*=*)
@ -121,8 +74,8 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
echo_version=yes
break
echo %ft_version%
exit 0
;;
--ftversion)
echo_ft_version=yes
@ -139,9 +92,6 @@ while test $# -gt 0 ; do
--static)
show_static=yes
;;
--help)
usage 0
;;
*)
usage 1 1>&2
;;
@ -149,27 +99,12 @@ while test $# -gt 0 ; do
shift
done
if test "$local_prefix" = "yes" ; then
if test "$exec_prefix_set" != "yes" ; then
exec_prefix=$prefix
fi
fi
if test "$local_prefix" = "yes" ; then
includedir=${prefix}${include_suffix}
if test "$exec_prefix_set" = "yes" ; then
libdir=${exec_prefix}${lib_suffix}
else
libdir=${prefix}${lib_suffix}
fi
fi
if test "$echo_version" = "yes" ; then
echo $version
fi
if test "$echo_prefix" = "yes" ; then
echo ${SYSROOT}$prefix
fi
@ -178,6 +113,15 @@ if test "$echo_exec_prefix" = "yes" ; then
echo ${SYSROOT}$exec_prefix
fi
if test "$exec_prefix_set" = "yes" ; then
libdir=$exec_prefix/lib
else
if test "$local_prefix" = "yes" ; then
includedir=$prefix/include
libdir=$prefix/lib
fi
fi
if test "$echo_ft_version" = "yes" ; then
major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
| grep FREETYPE_MAJOR \
@ -192,20 +136,26 @@ if test "$echo_ft_version" = "yes" ; then
fi
if test "$echo_cflags" = "yes" ; then
echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|"
echo -I${SYSROOT}$includedir/freetype2
fi
if test "$echo_libs" = "yes" ; then
libs="-lfreetype"
staticlibs="%LIBSSTATIC_CONFIG%"
if test "$show_static" = "yes" ; then
libs="$libs_L $static_libs"
else
libs="$libs_L $dynamic_libs"
libs="$staticlibs"
fi
if test "${SYSROOT}$libdir" != "/usr/lib" &&
test "${SYSROOT}$libdir" != "/usr/lib64"; then
echo -L${SYSROOT}$libdir $libs
else
echo $libs
fi
echo $libs | sed "s|$orig_libdir|$libdir|"
fi
if test "$echo_libtool" = "yes" ; then
echo ${SYSROOT}$libdir/libfreetype.la
convlib="libfreetype.la"
echo ${SYSROOT}$libdir/$convlib
fi
# EOF

View File

@ -4,11 +4,11 @@ libdir=%libdir%
includedir=%includedir%
Name: FreeType 2
URL: https://freetype.org
URL: http://freetype.org
Description: A free, high-quality, and portable font engine.
Version: %ft_version%
Requires: %PKGCONFIG_REQUIRES%
Requires.private: %PKGCONFIG_REQUIRES_PRIVATE%
Libs: %PKGCONFIG_LIBS%
Libs.private: %PKGCONFIG_LIBS_PRIVATE%
Requires:
Requires.private: %REQUIRES_PRIVATE%
Libs: -L${libdir} -lfreetype
Libs.private: %LIBS_PRIVATE%
Cflags: -I${includedir}/freetype2

View File

@ -1,7 +1,7 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on `gtk.m4` by Owen Taylor
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
# Copyright (C) 2001-2022 by
# Copyright 2001-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -15,32 +15,32 @@
# generated by Autoconf, under the same distribution terms as the rest of
# that program.
#
# serial 6
# serial 4
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
# MINIMUM-VERSION is what libtool reports; the default is '7.0.1' (this is
# MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
# FreeType 2.0.4).
#
# To make this code work with older autoconf versions, `AS_HELP_STRING` is
# not quoted.
#
AC_DEFUN([AC_CHECK_FT2],
[# Get the cflags and libraries from the freetype-config script
#
AC_ARG_WITH([ft-prefix],
dnl don't quote AS_HELP_STRING!
AS_HELP_STRING([--with-ft-prefix=PREFIX],
[Prefix where FreeType is installed (optional)]),
[ft_config_prefix="$withval"],
[ft_config_prefix=""])
AC_ARG_WITH([ft-exec-prefix],
dnl don't quote AS_HELP_STRING!
AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
[Exec prefix where FreeType is installed (optional)]),
[ft_config_exec_prefix="$withval"],
[ft_config_exec_prefix=""])
AC_ARG_ENABLE([freetypetest],
dnl don't quote AS_HELP_STRING!
AS_HELP_STRING([--disable-freetypetest],
[Do not try to compile and run a test FreeType program]),
[],
@ -116,7 +116,7 @@ AC_DEFUN([AC_CHECK_FT2],
AC_LANG_SOURCE([[
#include <ft2build.h>
#include <freetype/freetype.h>
#include FT_FREETYPE_H
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,6 +1,6 @@
## FreeType specific autoconf tests
#
# Copyright (C) 2002-2022 by
# Copyright 2002-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -1,52 +0,0 @@
/****************************************************************************
*
* ftconfig.h.in
*
* UNIX-specific configuration file (specification only).
*
* Copyright (C) 1996-2022 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.
*
*/
/**************************************************************************
*
* This header file contains a number of macro definitions that are used by
* the rest of the engine. Most of the macros here are automatically
* determined at compile time, and you should not need to change it to port
* FreeType, except to compile the library with a non-ANSI compiler.
*
* Note however that if some specific modifications are needed, we advise
* you to place a modified copy in your build directory.
*
* The build directory is usually `builds/<system>`, and contains
* system-specific files that are always included first when building the
* library.
*
*/
#ifndef FTCONFIG_H_
#define FTCONFIG_H_
#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
#undef HAVE_UNISTD_H
#undef HAVE_FCNTL_H
#include <freetype/config/integer-types.h>
#include <freetype/config/public-macros.h>
#include <freetype/config/mac-support.h>
#endif /* FTCONFIG_H_ */
/* END */

503
builds/unix/ftconfig.in Normal file
View File

@ -0,0 +1,503 @@
/***************************************************************************/
/* */
/* ftconfig.in */
/* */
/* UNIX-specific configuration file (specification only). */
/* */
/* Copyright 1996-2016 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This header file contains a number of macro definitions that are used */
/* by the rest of the engine. Most of the macros here are automatically */
/* determined at compile time, and you should not need to change it to */
/* port FreeType, except to compile the library with a non-ANSI */
/* compiler. */
/* */
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
/* The build directory is usually `builds/<system>', and contains */
/* system-specific files that are always included first when building */
/* the library. */
/* */
/*************************************************************************/
#ifndef FTCONFIG_H_
#define FTCONFIG_H_
#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
/* */
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
/* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
#undef HAVE_UNISTD_H
#undef HAVE_FCNTL_H
#undef HAVE_STDINT_H
/* There are systems (like the Texas Instruments 'C54x) where a `char' */
/* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
/* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
/* is probably unexpected. */
/* */
/* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
/* `char' type. */
#ifndef FT_CHAR_BIT
#define FT_CHAR_BIT CHAR_BIT
#endif
#undef FT_USE_AUTOCONF_SIZEOF_TYPES
#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
#undef SIZEOF_INT
#undef SIZEOF_LONG
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* Following cpp computation of the bit length of int and long */
/* is copied from default include/freetype/config/ftconfig.h. */
/* If any improvement is required for this file, it should be */
/* applied to the original header file for the builders that */
/* do not use configure script. */
/* The size of an `int' type. */
#if FT_UINT_MAX == 0xFFFFUL
#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
#elif FT_UINT_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `int' type!"
#endif
/* The size of a `long' type. A five-byte `long' (as used e.g. on the */
/* DM642) is recognized but avoided. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `long' type!"
#endif
#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* FT_UNUSED is a macro used to indicate that a given parameter is not */
/* used -- this is only used to get rid of unpleasant compiler warnings */
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg) = (arg) )
#endif
/*************************************************************************/
/* */
/* AUTOMATIC CONFIGURATION MACROS */
/* */
/* These macros are computed from the ones defined above. Don't touch */
/* their definition, unless you know precisely what you are doing. No */
/* porter should need to mess with them. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* Mac support */
/* */
/* This is the only necessary change, so it is defined here instead */
/* providing a new configuration file. */
/* */
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
/* so guess the system version by maximum errno before inclusion */
#include <errno.h>
#ifdef ECANCELED /* defined since 10.2 */
#include "AvailabilityMacros.h"
#endif
#if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
/undef FT_MACINTOSH
#endif
#elif defined( __SC__ ) || defined( __MRC__ )
/* Classic MacOS compilers */
#include "ConditionalMacros.h"
#if TARGET_OS_MAC
#define FT_MACINTOSH 1
#endif
#endif
/* Fix compiler warning with sgi compiler */
#if defined( __sgi ) && !defined( __GNUC__ )
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
#pragma set woff 3505
#endif
#endif
/*************************************************************************/
/* */
/* <Section> */
/* basic_types */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Type> */
/* FT_Int16 */
/* */
/* <Description> */
/* A typedef for a 16bit signed integer type. */
/* */
typedef signed short FT_Int16;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt16 */
/* */
/* <Description> */
/* A typedef for a 16bit unsigned integer type. */
/* */
typedef unsigned short FT_UInt16;
/* */
/* this #if 0 ... #endif clause is for documentation purposes */
#if 0
/*************************************************************************/
/* */
/* <Type> */
/* FT_Int32 */
/* */
/* <Description> */
/* A typedef for a 32bit signed integer type. The size depends on */
/* the configuration. */
/* */
typedef signed XXX FT_Int32;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt32 */
/* */
/* A typedef for a 32bit unsigned integer type. The size depends on */
/* the configuration. */
/* */
typedef unsigned XXX FT_UInt32;
/*************************************************************************/
/* */
/* <Type> */
/* FT_Int64 */
/* */
/* A typedef for a 64bit signed integer type. The size depends on */
/* the configuration. Only defined if there is real 64bit support; */
/* otherwise, it gets emulated with a structure (if necessary). */
/* */
typedef signed XXX FT_Int64;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt64 */
/* */
/* A typedef for a 64bit unsigned integer type. The size depends on */
/* the configuration. Only defined if there is real 64bit support; */
/* otherwise, it gets emulated with a structure (if necessary). */
/* */
typedef unsigned XXX FT_UInt64;
/* */
#endif
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
#elif FT_SIZEOF_LONG == 4
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
#else
#error "no 32bit type found -- please check your configuration files"
#endif
/* look up an integer type that is at least 32 bits */
#if FT_SIZEOF_INT >= 4
typedef int FT_Fast;
typedef unsigned int FT_UFast;
#elif FT_SIZEOF_LONG >= 4
typedef long FT_Fast;
typedef unsigned long FT_UFast;
#endif
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
#define FT_UINT64 unsigned long
/*************************************************************************/
/* */
/* A 64-bit data type may create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable other 64-bit data */
/* types if __STDC__ is defined. You can however ignore this rule */
/* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
#define FT_LONG64
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/* this compiler provides the __int64 type */
#define FT_LONG64
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
#elif defined( __BORLANDC__ ) /* Borland C++ */
/* XXXX: We should probably check the value of __BORLANDC__ in order */
/* to test the compiler version. */
/* this compiler provides the __int64 type */
#define FT_LONG64
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
#elif defined( __WATCOMC__ ) /* Watcom C++ */
/* Watcom doesn't provide 64-bit data types */
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
#define FT_LONG64
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
#elif defined( __GNUC__ )
/* GCC provides the `long long' type */
#define FT_LONG64
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
#endif /* __STDC_VERSION__ >= 199901L */
#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_LONG64
typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif
/*************************************************************************/
/* */
/* miscellaneous */
/* */
/*************************************************************************/
#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
/* typeof condition taken from gnulib's `intprops.h' header file */
#if ( __GNUC__ >= 2 || \
defined( __IBM__TYPEOF__ ) || \
( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
#define FT_TYPEOF( type ) (__typeof__ (type))
#else
#define FT_TYPEOF( type ) /* empty */
#endif
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
#define FT_LOCAL_DEF( x ) static x
#else
#ifdef __cplusplus
#define FT_LOCAL( x ) extern "C" x
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define FT_LOCAL( x ) extern x
#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
#define FT_LOCAL_ARRAY( x ) extern const x
#define FT_LOCAL_ARRAY_DEF( x ) const x
#ifndef FT_BASE
#ifdef __cplusplus
#define FT_BASE( x ) extern "C" x
#else
#define FT_BASE( x ) extern x
#endif
#endif /* !FT_BASE */
#ifndef FT_BASE_DEF
#ifdef __cplusplus
#define FT_BASE_DEF( x ) x
#else
#define FT_BASE_DEF( x ) x
#endif
#endif /* !FT_BASE_DEF */
#ifndef FT_EXPORT
#ifdef __cplusplus
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
#endif /* !FT_EXPORT */
#ifndef FT_EXPORT_DEF
#ifdef __cplusplus
#define FT_EXPORT_DEF( x ) extern "C" x
#else
#define FT_EXPORT_DEF( x ) extern x
#endif
#endif /* !FT_EXPORT_DEF */
#ifndef FT_EXPORT_VAR
#ifdef __cplusplus
#define FT_EXPORT_VAR( x ) extern "C" x
#else
#define FT_EXPORT_VAR( x ) extern x
#endif
#endif /* !FT_EXPORT_VAR */
/* The following macros are needed to compile the library with a */
/* C++ compiler and with 16bit compilers. */
/* */
/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
/* must do that for structures which contain function pointers to */
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
/* */
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
/* */
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
/* that contains pointers to callback functions. */
/* */
/* */
/* Some 16bit compilers have to redefine these macros to insert */
/* the infamous `_cdecl' or `__fastcall' declarations. */
/* */
#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
#define FT_CALLBACK_DEF( x ) extern "C" x
#else
#define FT_CALLBACK_DEF( x ) static x
#endif
#endif /* FT_CALLBACK_DEF */
#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
#define FT_CALLBACK_TABLE_DEF extern "C"
#else
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF /* nothing */
#endif
#endif /* FT_CALLBACK_TABLE */
FT_END_HEADER
#endif /* FTCONFIG_H_ */
/* END */

View File

@ -1,29 +1,29 @@
/****************************************************************************
*
* ftsystem.c
*
* Unix-specific FreeType low-level system interface (body).
*
* Copyright (C) 1996-2022 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.
*
*/
/***************************************************************************/
/* */
/* ftsystem.c */
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2016 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. */
/* */
/***************************************************************************/
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include FT_CONFIG_CONFIG_H
#include <freetype/internal/ftdebug.h>
#include <freetype/ftsystem.h>
#include <freetype/fterrors.h>
#include <freetype/fttypes.h>
#include <freetype/internal/ftstream.h>
#include <ftconfig.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include FT_INTERNAL_STREAM_H
/* memory-mapping includes and definitions */
#ifdef HAVE_UNISTD_H
@ -70,40 +70,29 @@
#include <errno.h>
/**************************************************************************
*
* MEMORY MANAGEMENT INTERFACE
*
*/
/*************************************************************************/
/* */
/* MEMORY MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/**************************************************************************
*
* It is not necessary to do any error checking for the
* allocation-related functions. This will be done by the higher level
* routines like ft_mem_alloc() or ft_mem_realloc().
*
*/
/**************************************************************************
*
* @Function:
* ft_alloc
*
* @Description:
* The memory allocation function.
*
* @Input:
* memory ::
* A pointer to the memory object.
*
* size ::
* The requested size in bytes.
*
* @Return:
* The address of newly allocated block.
*/
/*************************************************************************/
/* */
/* <Function> */
/* ft_alloc */
/* */
/* <Description> */
/* The memory allocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* size :: The requested size in bytes. */
/* */
/* <Return> */
/* The address of newly allocated block. */
/* */
FT_CALLBACK_DEF( void* )
ft_alloc( FT_Memory memory,
long size )
@ -114,30 +103,26 @@
}
/**************************************************************************
*
* @Function:
* ft_realloc
*
* @Description:
* The memory reallocation function.
*
* @Input:
* memory ::
* A pointer to the memory object.
*
* cur_size ::
* The current size of the allocated memory block.
*
* new_size ::
* The newly requested size in bytes.
*
* block ::
* The current address of the block in memory.
*
* @Return:
* The address of the reallocated memory block.
*/
/*************************************************************************/
/* */
/* <Function> */
/* ft_realloc */
/* */
/* <Description> */
/* The memory reallocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* cur_size :: The current size of the allocated memory block. */
/* */
/* new_size :: The newly requested size in bytes. */
/* */
/* block :: The current address of the block in memory. */
/* */
/* <Return> */
/* The address of the reallocated memory block. */
/* */
FT_CALLBACK_DEF( void* )
ft_realloc( FT_Memory memory,
long cur_size,
@ -151,21 +136,19 @@
}
/**************************************************************************
*
* @Function:
* ft_free
*
* @Description:
* The memory release function.
*
* @Input:
* memory ::
* A pointer to the memory object.
*
* block ::
* The address of block in memory to be freed.
*/
/*************************************************************************/
/* */
/* <Function> */
/* ft_free */
/* */
/* <Description> */
/* The memory release function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
void* block )
@ -176,38 +159,38 @@
}
/**************************************************************************
*
* RESOURCE MANAGEMENT INTERFACE
*
*/
/*************************************************************************/
/* */
/* RESOURCE MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/**************************************************************************
*
* The macro FT_COMPONENT is used in trace mode. It is an implicit
* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
* messages during execution.
*/
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT io
#define FT_COMPONENT trace_io
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
/**************************************************************************
*
* @Function:
* ft_close_stream_by_munmap
*
* @Description:
* The function to close a stream which is opened by mmap.
*
* @Input:
* stream :: A pointer to the stream object.
*/
/*************************************************************************/
/* */
/* <Function> */
/* ft_close_stream_by_munmap */
/* */
/* <Description> */
/* The function to close a stream which is opened by mmap. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_close_stream_by_munmap( FT_Stream stream )
{
@ -215,29 +198,29 @@
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = NULL;
stream->base = 0;
}
/**************************************************************************
*
* @Function:
* ft_close_stream_by_free
*
* @Description:
* The function to close a stream which is created by ft_alloc.
*
* @Input:
* stream :: A pointer to the stream object.
*/
/*************************************************************************/
/* */
/* <Function> */
/* ft_close_stream_by_free */
/* */
/* <Description> */
/* The function to close a stream which is created by ft_alloc. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_close_stream_by_free( FT_Stream stream )
{
ft_free( stream->memory, stream->descriptor.pointer );
ft_free( NULL, stream->descriptor.pointer );
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = NULL;
stream->base = 0;
}
@ -313,7 +296,8 @@
file,
0 );
if ( stream->base != MAP_FAILED )
/* on some RTOS, mmap might return 0 */
if ( (long)stream->base != -1 && stream->base != NULL )
stream->close = ft_close_stream_by_munmap;
else
{
@ -323,7 +307,7 @@
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
stream->base = (unsigned char*)ft_alloc( stream->memory, stream->size );
stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
if ( !stream->base )
{
@ -364,16 +348,16 @@
stream->descriptor.pointer = stream->base;
stream->pathname.pointer = (char*)filepathname;
stream->read = NULL;
stream->read = 0;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
Fail_Read:
ft_free( stream->memory, stream->base );
ft_free( NULL, stream->base );
Fail_Map:
close( file );
@ -408,7 +392,7 @@
memory = (FT_Memory)malloc( sizeof ( *memory ) );
if ( memory )
{
memory->user = NULL;
memory->user = 0;
memory->alloc = ft_alloc;
memory->realloc = ft_realloc;
memory->free = ft_free;

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -30,20 +30,15 @@
#
# We also remove `$(includedir)/ft2build.h' for the same reason.
#
# Note that some header files get handled twice for simplicity; a special,
# configured version overwrites the generic one.
#
install: $(PROJECT_LIBRARY)
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
$(DESTDIR)$(datadir)/aclocal
ifeq ($(INSTALL_FT2_CONFIG),TRUE)
$(MKINSTALLDIRS) $(DESTDIR)$(bindir) \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/aclocal \
$(DESTDIR)$(mandir)/man1
endif
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
@ -54,24 +49,20 @@ endif
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
$(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
$(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
$(DESTDIR)$(includedir)/freetype2/ft2build.h
$(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
$(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
$(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h
$(INSTALL_SCRIPT) -m 644 $(PLATFORM_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
$(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
ifeq ($(INSTALL_FT2_CONFIG),TRUE)
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(DESTDIR)$(bindir)/freetype-config
$(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
$(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
$(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
$(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
$(DESTDIR)$(mandir)/man1/freetype-config.1
endif
uninstall:
@ -84,7 +75,7 @@ uninstall:
check:
$(info There is no validation suite for this package.)
@echo There is no validation suite for this package.
.PHONY: clean_project_unix distclean_project_unix
@ -92,11 +83,13 @@ check:
# Unix cleaning and distclean rules.
#
clean_project_unix:
-$(LIBTOOL) --mode=clean $(RM) $(OBJECTS_LIST)
-$(DELETE) $(CLEAN)
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
-$(DELETE) $(patsubst %.$O,%.$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
$(CLEAN)
distclean_project_unix: clean_project_unix
-$(LIBTOOL) --mode=clean $(RM) $(PROJECT_LIBRARY)
-$(DELETE) $(PROJECT_LIBRARY)
-$(DELDIR) $(OBJ_DIR)/.libs
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# EOF

View File

@ -53,7 +53,7 @@ fi[]dnl
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurrence in configure.ac, so if the first place
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------

View File

@ -2,7 +2,7 @@
# FreeType 2 template for Unix-specific compiler definitions
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -14,7 +14,7 @@
CC := @CC@
COMPILER_SEP := $(SEP)
FT_LIBTOOL_DIR ?= $(PLATFORM_DIR)
FT_LIBTOOL_DIR ?= $(BUILD_DIR)
LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
@ -73,16 +73,13 @@ T := -o$(space)
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enforce
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
# We use our own FreeType configuration files overriding defaults.
# We use our own FreeType configuration file.
#
CPPFLAGS := @CPPFLAGS@
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ \
$DFT_CONFIG_CONFIG_H="<ftconfig.h>" \
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
$DFT_CONFIG_OPTIONS_H="<ftoption.h>"
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ -DFT_CONFIG_CONFIG_H="<ftconfig.h>"
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -90,41 +87,28 @@ ANSIFLAGS := @XX_ANSIFLAGS@
# C compiler to use -- we use libtool!
#
# CC might be set on the command line; we store this value in `CCraw'.
# Consequently, we use the `override' directive to ensure that the
# libtool call is always prepended.
#
CCraw := $(CC)
override CC := $(LIBTOOL) --mode=compile $(CCraw)
# Resource compiler to use on Cygwin/MinGW, usually windres.
#
RCraw := @RC@
ifneq ($(RCraw),)
RC := $(LIBTOOL) --tag=RC --mode=compile $(RCraw)
endif
CCraw := $(CC)
CC := $(LIBTOOL) --mode=compile $(CCraw)
# Linker flags.
#
LDFLAGS := @LDFLAGS@
# export symbols
#
CCraw_build := @CC_BUILD@ # native CC of building system
E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system
E_BUILD := @EXEEXT_BUILD@ # extension for exexutable on building system
EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
CCexe := $(CCraw_build) # used to compile `apinames' only
# Library linking.
# Library linking
#
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
-rpath $(libdir) -version-info $(version_info) \
$(LDFLAGS) -no-undefined \
-export-symbols $(EXPORTS_LIST)
# For the demo programs.
FT_DEMO_CFLAGS := @FT_DEMO_CFLAGS@
FT_DEMO_LDFLAGS := @FT_DEMO_LDFLAGS@
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -21,13 +21,8 @@ DELDIR := rm -rf
CAT := cat
SEP := /
# This is used for `make refdoc' and `make refdoc-venv'
#
PYTHON := @PYTHON@
BIN := bin
# this is used for `make distclean' and `make install'
OBJ_BUILD ?= $(PLATFORM_DIR)
OBJ_BUILD ?= $(BUILD_DIR)
# don't use `:=' here since the path stuff will be included after this file
#
@ -48,7 +43,6 @@ DISTCLEAN += $(OBJ_BUILD)/config.cache \
$(OBJ_BUILD)/unix-def.mk \
$(OBJ_BUILD)/unix-cc.mk \
$(OBJ_BUILD)/ftconfig.h \
$(OBJ_BUILD)/ftoption.h \
$(LIBTOOL) \
$(OBJ_BUILD)/Makefile
@ -68,14 +62,11 @@ version_info := @version_info@
# Variables needed for `freetype-config' and `freetype.pc'.
#
PKG_CONFIG := @PKG_CONFIG@
PKGCONFIG_REQUIRES := @PKGCONFIG_REQUIRES@
PKGCONFIG_REQUIRES_PRIVATE := @PKGCONFIG_REQUIRES_PRIVATE@
PKGCONFIG_LIBS := @PKGCONFIG_LIBS@
PKGCONFIG_LIBS_PRIVATE := @PKGCONFIG_LIBS_PRIVATE@
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
build_libtool_libs := @build_libtool_libs@
ft_version := @ft_version@
REQUIRES_PRIVATE := @REQUIRES_PRIVATE@
LIBS_PRIVATE := @LIBS_PRIVATE@
LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@
build_libtool_libs := @build_libtool_libs@
ft_version := @ft_version@
# The directory where all library files are placed.
#
@ -111,7 +102,6 @@ NO_OUTPUT := 2> /dev/null
$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
rm -f $@ $@.tmp
sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \
-e 's|%PKG_CONFIG%|$(PKG_CONFIG)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
-e 's|%exec_prefix%|$(exec_prefix)|' \
-e 's|%ft_version%|$(ft_version)|' \
@ -121,7 +111,7 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
$< \
> $@.tmp
chmod +x $@.tmp
chmod go-w $@.tmp
chmod a-w $@.tmp
mv $@.tmp $@
# To support directory names with spaces (as might easily happen on Windows
@ -139,24 +129,19 @@ prefix_x := $(subst $(space),\\$(space),$(prefix))
$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
rm -f $@ $@.tmp
sed -e 's|%PKGCONFIG_REQUIRES%|$(PKGCONFIG_REQUIRES)|' \
-e 's|%PKGCONFIG_REQUIRES_PRIVATE%|$(PKGCONFIG_REQUIRES_PRIVATE)|' \
-e 's|%PKGCONFIG_LIBS%|$(PKGCONFIG_LIBS)|' \
-e 's|%PKGCONFIG_LIBS_PRIVATE%|$(PKGCONFIG_LIBS_PRIVATE)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
-e 's|%exec_prefix%|$(exec_prefix_x)|' \
-e 's|%ft_version%|$(ft_version)|' \
-e 's|%includedir%|$(includedir_x)|' \
-e 's|%libdir%|$(libdir_x)|' \
-e 's|%prefix%|$(prefix_x)|' \
$< \
sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \
-e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \
-e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
-e 's|%exec_prefix%|$(exec_prefix_x)|' \
-e 's|%ft_version%|$(ft_version)|' \
-e 's|%includedir%|$(includedir_x)|' \
-e 's|%libdir%|$(libdir_x)|' \
-e 's|%prefix%|$(prefix_x)|' \
$< \
> $@.tmp
chmod a-w $@.tmp
mv $@.tmp $@
# defines whether we should install `freetype-config' or not
INSTALL_FT2_CONFIG = @INSTALL_FT2_CONFIG@
all install: $(OBJ_BUILD)/freetype-config \
$(OBJ_BUILD)/freetype2.pc

View File

@ -6,7 +6,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -6,7 +6,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2016 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

Some files were not shown because too many files have changed in this diff Show More