Compare commits

..

14 Commits

Author SHA1 Message Date
suzuki toshiya d7aacf9ecf add note to docs/DEBUG 2011-01-15 02:39:37 +09:00
suzuki toshiya fa0acc4589 fix dir separator handling 2011-01-10 00:43:40 +09:00
suzuki toshiya 97c96f2995 use basename only in the site identification in alloc limiter 2011-01-10 00:43:40 +09:00
suzuki toshiya f6af979d2e introduce ft_basename(): if libgen.h is available, it is a macro to system basename() 2011-01-10 00:43:40 +09:00
suzuki toshiya dfaf70a056 s/PLATFORM_PATH_SEPARATOR/PLATFORM_DIR_SEPARATOR/ 2011-01-10 00:43:39 +09:00
suzuki toshiya b440828b6c use cpp-macro PLATFORM_PATH_SEPARATOR instead of raw ascii slash 2011-01-10 00:43:39 +09:00
suzuki toshiya 8967a174cd fix a bug to cause OOM 2011-01-10 00:42:22 +09:00
suzuki toshiya 82da8590f3 formatting 2011-01-09 23:33:29 +09:00
suzuki toshiya a434c5ab0a remove ft_basename() 2011-01-09 23:33:29 +09:00
suzuki toshiya d1543e350a update ft_mem_check_site_alloc_environment() for new syntax 2011-01-09 23:33:29 +09:00
suzuki toshiya 48b3386853 fix trace message bug in ft_mem_debug_alloc() 2011-01-09 23:33:29 +09:00
suzuki toshiya 09fe3e314b use ft_strchr() instead of index() 2011-01-09 23:33:28 +09:00
suzuki toshiya 2acbc01f74 fix trace levels 2011-01-09 23:33:28 +09:00
suzuki toshiya c6e0cdacfa introduce FT2_ALLOC_{TOTAL,CUR}_MAX_SITE environment to restrict memory allocation locally 2011-01-09 23:31:35 +09:00
826 changed files with 110680 additions and 191701 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

8
.gitignore vendored
View File

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

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 -U 'meson==0.59.*'
- 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 +0,0 @@
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>
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>
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,671 +0,0 @@
# CMakeLists.txt
#
# Copyright (C) 2013-2022 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written originally by John Cary <cary@txcorp.com>
#
# 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 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
#
# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
#
# for information about debug or release builds, for example
#
# cmake -B build -D CMAKE_BUILD_TYPE=Release
#
#
# For a dynamic library, use
#
# cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release
#
# For a framework on OS X, use
#
# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true ..
#
# For an iOS static library, use
#
# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS ..
#
# 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
#
# 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
#
# <build-directory>/include/freetype/config
#
# which should be further modified if necessary.
#
# - 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
# 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:
#
# 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 `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where
# `XXX' is a CMake package name like `BZip2'). Example for disabling all
# dependencies:
#
# 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
# `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)
# Support new IN_LIST if() operator.
cmake_policy(SET CMP0057 NEW)
endif ()
include(CheckIncludeFile)
include(CMakeDependentOption)
# 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")
message(FATAL_ERROR
"IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64")
endif ()
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
message(AUTHOR_WARNING
"You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
endif ()
if (BUILD_SHARED_LIBS)
message(FATAL_ERROR
"BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
endif ()
if (BUILD_FRAMEWORK)
message(FATAL_ERROR
"BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
endif ()
# iOS only uses static libraries
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_TOOLCHAIN_FILE
${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake)
endif ()
else ()
if (DEFINED IOS_PLATFORM)
message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
endif ()
endif ()
project(freetype C)
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)
# Disallow in-source builds
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_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")
endif ()
# Add local cmake modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake)
if (BUILD_FRAMEWORK)
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
message(FATAL_ERROR
"You should use Xcode generator with BUILD_FRAMEWORK enabled")
endif ()
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
set(BUILD_SHARED_LIBS ON)
endif ()
# Find dependencies
include(FindPkgConfig)
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 ()
if (NOT FT_DISABLE_PNG)
if (FT_REQUIRE_PNG)
find_package(PNG REQUIRED)
else ()
find_package(PNG)
endif ()
endif ()
if (NOT FT_DISABLE_ZLIB)
if (FT_REQUIRE_ZLIB)
find_package(ZLIB REQUIRED)
else ()
find_package(ZLIB)
endif ()
endif ()
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 ()
# Create the configuration file
if (UNIX)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
FTCONFIG_H)
if (HAVE_UNISTD_H)
string(REGEX REPLACE
"#undef +(HAVE_UNISTD_H)" "#define \\1 1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_FCNTL_H)
string(REGEX REPLACE
"#undef +(HAVE_FCNTL_H)" "#define \\1 1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
else ()
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
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 ()
# Create the options file
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
FTOPTION_H)
if (ZLIB_FOUND)
string(REGEX REPLACE
"/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
if (BZIP2_FOUND)
string(REGEX REPLACE
"/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
if (PNG_FOUND)
string(REGEX REPLACE
"/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
FTOPTION_H "${FTOPTION_H}")
endif ()
if (HARFBUZZ_FOUND)
string(REGEX REPLACE
"/\\* +(#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 ()
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 ()
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
set(BASE_SRCS
src/autofit/autofit.c
src/base/ftbase.c
src/base/ftbbox.c
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcid.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.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/fttype1.c
src/base/ftwinfnt.c
src/bdf/bdf.c
src/bzip2/ftbzip2.c
src/cache/ftcache.c
src/cff/cff.c
src/cid/type1cid.c
src/gzip/ftgzip.c
src/lzw/ftlzw.c
src/pcf/pcf.c
src/pfr/pfr.c
src/psaux/psaux.c
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")
else ()
list(APPEND BASE_SRCS "src/base/ftsystem.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)
endif ()
add_library(freetype
${PUBLIC_HEADERS}
${PUBLIC_CONFIG_HEADERS}
${PRIVATE_HEADERS}
${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})
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}
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
)
set_target_properties(freetype PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist
PUBLIC_HEADER "${PUBLIC_HEADERS}"
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
)
endif ()
# 'freetype-interface' is an interface library, to be accessed with
# `EXPORT_NAME Freetype::Freetype`. This is the target name provided by
# CMake's `FindFreetype.cmake`, so we provide it for compatibility.
add_library(freetype-interface INTERFACE)
set_target_properties(freetype-interface PROPERTIES
EXPORT_NAME Freetype::Freetype
INTERFACE_LINK_LIBRARIES freetype)
set(PKGCONFIG_REQUIRES "")
set(PKGCONFIG_REQUIRES_PRIVATE "")
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
set(PKGCONFIG_LIBS_PRIVATE "")
if (ZLIB_FOUND)
target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib")
endif ()
if (BZIP2_FOUND)
target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
if (PC_BZIP2_FOUND)
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2")
else ()
list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2")
endif ()
endif ()
if (PNG_FOUND)
target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS})
target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng")
endif ()
if (HarfBuzz_FOUND)
target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
list(APPEND 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")
endif ()
# Installation
include(GNUInstallDirs)
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)
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 freetype-interface
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(
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)
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")
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}")
if (WIN32)
set(CPACK_GENERATOR ZIP)
else ()
set(CPACK_GENERATOR TGZ)
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)

1831
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -330,7 +330,7 @@
2001-12-22 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
* src/pcf/pcfread.c (pcf_load_font): Handle property `POINT_SIZE'
* src/pfc/pcfread.c (pcf_load_font): Handle property `POINT_SIZE'
and fix incorrect computation of `available_sizes'.
2001-12-22 David Turner <david@freetype.org>
@ -412,7 +412,7 @@
* src/cff/cffgload.h: Updated.
* src/cff/cffobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_Size_Get_Globals_Funcs, CFF_Size_Done, CFF_Size_Init,
CFF_Size_Reset, CFF_GlyphSlot_Done, CFF_GlyphSlot_Init): New
CFF_Size_Reset, CFF_GlyphSlot_Done, CFF_GLyphSlot_Init): New
functions.
(CFF_Init_Face): Renamed to ...
(CFF_Face_Init): This.
@ -1056,7 +1056,7 @@
2001-08-30 Anthony Feik <afeick@hotmail.com>
* src/type1/t1afm.c (T1_Read_AFM): Now correctly sets the flag
* src/type1/t1afm.c (T1_Read_Afm): Now correctly sets the flag
FT_FACE_FLAG_KERNING when appropriate for Type1 + AFM files.
2001-08-25 Werner Lemberg <wl@gnu.org>
@ -1176,7 +1176,7 @@
* include/freetype/internal/psaux.h (PS_Table): Use FT_Offset for
`cursor' and `capacity'.
* src/psaux/psobjs.c (reallocate_t1_table): Use FT_Long for second
* src/psaux/psobjc.c (reallocate_t1_table): Use FT_Long for second
parameter.
(PS_Table_Add): Use FT_Offset for `new_size'.
@ -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>
@ -1710,7 +1710,7 @@
`FT_Err_*' with `CFF_Err_*'.
* src/cid/cidparse.c: Replaced `FT_Err_*' with `T1_Err_*'.
* src/psaux/psobjs.c, src/psaux/t1decode.c: Ditto.
* src/sfnt/sfobjs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with
* src/sfnt/sfobcs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with
`TT_Err_*'.
* src/truetype/ttgload.c, src/truetype/ttobjs.c: Ditto.
* src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c,
@ -1730,7 +1730,7 @@
* src/cff/cffobjs.c (CFF_Init_Face, CFF_Done_Face): Use
FT_LOCAL_DEF.
* src/cid/cidobjs.c (CID_Done_Driver): Ditto.
* src/truetype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size):
* src/trutype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size):
Ditto.
* src/type1/t1objs.c (T1_Done_Driver): Ditto.
* src/pcf/pcfdriver.c (PCF_Done_Face): Ditto.
@ -1759,7 +1759,7 @@
2001-03-20 Werner Lemberg <wl@gnu.org>
* builds/win32/detect.mk: Fix .PHONY target for Intel compiler.
* builds/win32/detekt.mk: Fix .PHONY target for Intel compiler.
2001-03-20 David Turner <david.turner@freetype.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.
@ -2338,7 +2338,7 @@
2000-12-06 Werner Lemberg <wl@gnu.org>
* builds/module.mk: Replaced `xxx #' with `xxx$(space).
* builds/os2/detect.mk, builds/win32/detect.mk: Moved comment to
* builds/os2/detekt.mk, builds/win32/detekt.mk: Moved comment to
avoid trailing spaces in variable.
* builds/freetype.mk: Use $(D) instead of $D to make statement more
readable.
@ -2412,7 +2412,7 @@
* builds/unix/detect.mk (.PHONY): Adding `devel', `unix', `lcc',
`setup'.
2000-11-30 David Turner <david.turner@freetype.org>
2000-11-30 David Turner <david.turner@freetype.ogr>
* INSTALL: Slightly updated the quick starter documentation to
include IDE compilation, prevent against BSD Make, and specify `make
@ -2597,7 +2597,7 @@
----------------------------------------------------------------------------
Copyright (C) 2000-2022 by
Copyright 2000, 2001, 2002, 2007 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>
@ -327,7 +327,7 @@
Blaskey <listtarget@danbala.com>).
* src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
* src/sfnt/ttcmap.c: Use SFNT_Err_Ok where appropriate.
* src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.
(tt_cmap0_validate, tt_cmap2_validate, tt_cmap6_validate,
tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Use
@ -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,
@ -571,7 +571,7 @@
doing anything else. This avoids unnecessary heap allocations
(400KByte of heap memory for the LZW decoder).
* src/gzip/ftgzip.c (FT_Stream_OpenGzip): Ditto for the gzip
* src/gzip/ftgzip.c (FT_Stream_OpenGZip): Ditto for the gzip
decoder, although the code savings are smaller.
* docs/CHANGES: Updated.
@ -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>
@ -756,7 +756,7 @@
(AF_AxisHintsRec): Add `max_segments' and `max_edges'.
(af_axis_hints_new_segment, af_axis_hints_new_edge): New prototypes.
* src/autofit/aflatin.c (af_latin_metrics_scale): Don't call
* src/autofit/aflatin.c (af_latin_metricsc_scale): Don't call
AF_SCALER_EQUAL_SCALES.
(af_latin_hints_compute_segments): Change return type to FT_Error.
Update all callers.
@ -1014,7 +1014,7 @@
t42_parse_charstrings, t42_parse_dict): Check parser error value
after call to T1_Skip_PS_Token (where necessary).
* src/psaux/psobjs.c (skip_string, ps_parser_skip_PS_token,
* src/psaux/psobjc.c (skip_string, ps_parser_skip_PS_token,
ps_tobytes): Add error messages.
2005-02-12 Werner Lemberg <wl@gnu.org>
@ -1112,7 +1112,7 @@
but return them as-is.
* docs/CHANGES: Mention new bitmap API.
* include/freetype/ftchapters.h: Updated.
* include/freetype/ftchapter.s: Updated.
2004-12-11 Robert Clark <freetype@ratty.org.uk>
@ -1159,7 +1159,7 @@
(ah_test_extremum, ah_get_orientation): Removed.
(ah_outline_load): Use FT_Outline_Get_Orientation.
* src/base/ftsynth.c (ft_test_extrema, ft_get_orientation): Removed.
* src/base/ftsynth.c (ft_test_extrama, ft_get_orientation): Removed.
(FT_GlyphSlot_Embolden): Use FT_Outline_Get_Orientation.
2004-11-23 Fernando Papa <fpapa@netgate.com.uy>
@ -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>
@ -1829,7 +1829,7 @@
2004-08-05 David Turner <david@freetype.org>
`Activate' gray-scale specifying hinting within the TrueType
`Activate' gray-scale specifing hinting within the TrueType
bytecode interpreter. This is an experimental feature which
should probably be made optional.
@ -1839,7 +1839,7 @@
(TT_Load_Glyph): Here.
Set `grayscale' flag except for `FT_LOAD_TARGET_MONO'.
* src/truetype/ttinterp.c (Ins_GETINFO): Return MS rasterizer
* src/truetyep/ttinterp.c (Ins_GETINFO): Return MS rasterizer
version 1.7.
Return rotation and stretching info only if glyph is rotated or
stretched, respectively.
@ -1868,7 +1868,7 @@
(LITTLE_ENDIAN_USHORT, LITTLE_ENDIAN_UINT): New macros.
(T1_Read_PFM): New function.
(T1_Read_Metrics): New higher-level function to be used instead of
T1_Read_AFM.
T1Read_AFM.
Update all callers.
2004-07-31 Werner Lemberg <wl@gnu.org>
@ -2048,7 +2048,7 @@
pcf_get_metrics, pcf_get_bitmaps, pcf_get_encodings): Improve
debugging messages.
* src/pcf/pcfdrivr.c (FT_COMPONENT): Move up.
* src/pcf/pcfdrivr.c (FT_COMPOMENT): Move up.
(PCF_Face_Init): Simplify code.
* src/bdf/bdfdrivr.h (BDF_FaceRec): New element `default_glyph'.
@ -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.
@ -2116,7 +2116,7 @@
* include/freetype/cache/ftcmru.h (FTC_MruNode_CompareFunc): Change
return type to FT_Bool.
* src/cache/ftcbasic.c (ftc_basic_family_compare): Change return
* src/cache/ftbasic.c (ftc_basic_family_compare): Change return
type to FT_Bool.
* src/cache/ftccache.c (FTC_Cache_Init, ftc_cache_init): Make
@ -2153,7 +2153,7 @@
* docs/CHANGES: Updated.
2004-06-04 David Chester <davidchester@qmx.net>
2004-06-04 David Chester <davidchester@gmx.net>
Improve inter-letter spacing for autohinted glyphs.
@ -2289,7 +2289,7 @@
* src/cff/cffgload.h (CFF_Builder): Remove `error'.
* src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace
`Memory_Error' with `Fail' and update all users.
`Memory_Error' with `Fail' und update all users.
2004-05-11 Werner Lemberg <wl@gnu.org>
@ -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
@ -2899,7 +2899,7 @@
Improve MacOS fond support. Provide a new API
`FT_New_Face_From_FSSpec' similar to `FT_New_Face'.
* src/base/ftmac.c [__MWERKS__]: Include FSp_fopen.h.
* src/base/ftmac.c [__MWERKS__]: Include FSp_fpopen.h.
STREAM_FILE [__MWERKS__]: New macro.
(ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions.
(file_spec_from_path) [__MWERKS__]: Updated #if statement.
@ -3331,7 +3331,7 @@
* src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
Info service function if the cmap comes from sfnt. Return 0 if the
cmap is synthesized in cff module.
cmap is sythesized in cff module.
2004-01-20 David Turner <david@freetype.org>
@ -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.
@ -3460,7 +3460,7 @@
2003-12-25 Werner Lemberg <wl@gnu.org>
* src/base/fttrigon.c, src/base/ftgloadr.c: Include
* src/base/fttrigon.c, src/base/ftgloadr.c: Inlude
FT_INTERNAL_OBJECTS_H.
* src/base/ftstroke.c (FT_Outline_GetInsideBorder,
@ -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.
@ -3539,7 +3539,7 @@
src/cache/ftcsbits.c,
src/cache/ftccmap.c,
src/cache/ftcbasic.c (added),
src/cache/ftlru.c (removed):
src/cache/ftclru.c (removed):
*Complete* rewrite of the cache sub-system to `solve' the
following points:
@ -4010,7 +4010,7 @@
* src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h: Don't
include FT_INTERNAL_CFF_TYPES_H but cfftypes.h directly.
* src/cid/cidriver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
* src/cif/cidriver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
(cid_ps_get_font_info): New function.
(cid_service_ps_info): New service.
(cid_services): Updated.
@ -4119,7 +4119,7 @@
(fnt_cmap_class_rec, fnt_cmap_class), src/bdf/bdflib.c (empty,
_num_bdf_properties), src/gzip/infutil.c (inflate_mask),
src/gzip/inffixed.h (fixed_bl, fixed_bd, fixed_tl, fixed_td),
src/gzip/inftrees.h (inflate_trees_fixed), src/gzip/inftrees.c
src/gzip/inftrees.h (inflate_trees_fixed), srf/gzip/inftrees.c
(inflate_trees_fixed): Decorate with more `const' to avoid
writable global variables which are disallowed on ARM.
@ -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
@ -4659,7 +4659,7 @@
* src/type42/t42drivr.c: Include FT_SERVICE_XFREE86_NAME_H,
FT_SERVICE_GLYPH_DICT_H, and FT_SERVICE_POSTSCRIPT_NAME_H.
(t42_service_glyph_dict, t42_service_ps_name): New structures
(t42_service_glyph_dict, t42_service_ps_name): New strucures
providing Type 42 services.
(t42_services): New services list.
(T42_Get_Interface): Use `ft_service_list_lookup'.
@ -4683,7 +4683,7 @@
(gindex,gindex).
* src/base/ftpfr.c (ft_pfr_check): Fix serious typo.
* src/pfr/pfrload.c: Remove dead code.
* src/pfr/prfload.c: Remove dead code.
(pfr_get_gindex, pfr_compare_kern_pairs, pfr_sort_kerning_pairs):
New functions.
(pfr_phy_font_done): Free `kern_pairs'.
@ -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>
@ -5115,7 +5116,7 @@
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBOX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
@ -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
@ -5345,7 +5346,7 @@
* src/cff/cffload (cff_subfont_load): Fix default values of
expansion_factor and blue_scale.
* src/cid/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000
* src/cif/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000
for blue_scale.
* src/pshinter/pshglob.c (psh_globals_new): Fix default value of
@ -5568,7 +5569,7 @@
* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
(PCF_Face_Init): Test for charset registry case-insensitively.
* src/gzip/ftgzip.c (ft_gzip_file_io): Revert change from yesterday;
* src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday;
it has already been fixed differently.
* src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around
@ -5705,7 +5706,7 @@
(ah_outline_compute_edges): Scale `edge_distance_threshold' down
after rounding instead of scaling comparison value in loop.
* src/autohint/ahhint.c (ah_hinter_align_strong_points): Provide
* src/autohint/ahhint.c (ah_hinter_align_stong_points): Provide
alternative code which runs faster.
Handle `before->scale == 0'.
@ -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>
@ -5959,7 +5960,7 @@
2003-03-27 David Turner <david@freetype.org>
* README: Updated.
* README: Udpated.
* README.UNX: Removed (now replaced by docs/INSTALL.UNX).
@ -6259,7 +6260,7 @@
Adding a new API `FT_Get_BDF_Property' to retrieve the BDF
properties of a given PCF or BDF font.
* include/freetype/ftbdf.h (BDF_PropertyType): New enumeration.
* include/freetype/ftbdf.h (FT_PropertyType): New enumeration.
(BDF_Property, BDF_PropertyRec): New structure.
FT_Get_BDF_Property): New function.
* include/freetype/internal/bdftypes.h: Include FT_BDF_H.
@ -6274,7 +6275,7 @@
(bdf_driver_class): Use `bdf_driver_requester'.
* src/pcf/pcfdrivr.c: Include FT_BDF_H.
(pcf_get_bdf_property, pcf_driver_requester): New functions
(pcf_get_bdf_property, pdc_driver_requester): New functions
(pcf_driver_class): Use `pcf_driver_requester'.
* src/pcf/pcfread.c: Include `pcfread.h'.
@ -6546,10 +6547,10 @@
2002-11-07 David Turner <david@freetype.org>
* src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that
* src/cache/ftcsbit.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
@ -6607,7 +6608,7 @@
2002-11-01 David Turner <david@freetype.org>
Added PFR-specific public API. Fixed the kerning retrieval routine
Added PFR-specific public API. Fixed the kerning retrievel routine
(it returned invalid values when the outline and metrics resolution
differ).
@ -6694,7 +6695,7 @@
* src/pfr/pfrgload.c: Include `pfrsbit.h'.
* src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): Rewritten.
(pfr_phy_font_done, pfr_phy_font_load): Updated.
* src/pfr/pfrobjs.c: Include `pfrsbit.h'.
* src/pfr/pfrobks.c: Include `pfrsbit.h'.
(pfr_face_init): Handle kerning and embedded bitmaps.
(pfr_slot_load): Load embedded bitmaps.
(PFR_KERN_INDEX): Removed.
@ -6972,7 +6973,7 @@
* src/pshinter/pshalgo2.c (psh2_glyph_find_strong_points),
src/pshinter/pshalgo3.c (psh3_glyph_find_strong_points): Adding fix
to prevent segfault when hints are provided in an empty glyph.
to prevent seg fault when hints are provided in an empty glyph.
* src/cache/ftccache.i (GEN_CACHE_LOOKUP) [FT_DEBUG_LEVEL_ERROR]:
Removed conditional code. This fixes a bug that prevented
@ -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.
@ -7031,7 +7032,7 @@
(FTC_Image_Cache_Lookup): This function.
(ftc_image_family_init): Updated.
* src/cache/ftcsbits.c (FTC_SBitQueryRec, FTC_SBitFamilyRec):
* src/cache/ftcsbit.c (FTC_SBitQueryRec, FTC_SBitFamilyRec):
Updated.
(ftc_sbit_node_load): Updated.
Moved code to convert type flags to load flags to...
@ -7154,7 +7155,7 @@
to ...
(FT_Glyph_{Init,Done,Transform,GetBBox,Copy,Prepare}Func): This.
(FTRenderer_{render,transform,getCBox,setMode}): Renamed to ...
(FT_Renderer_{RenderFunc,TransformFunc,GetCBoxFunc,SetModeFunc}):
(FT_Renderer_{RenderFunc,TransformFunc,GetCBoxFunc,SeteModeFunc}):
This.
Updated all affected code.
@ -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>
@ -7555,7 +7556,7 @@
Get glyph offset.
* src/truetype/ttobjs.c (TT_Face_Init)
[FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading
[FT_CONFIG_OPTION_INCOREMENTAL]: Added the incremental loading
system for the TrueType driver.
* src/cid/cidgload.c (cid_load_glyph)
@ -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
@ -7896,7 +7897,7 @@
2002-06-21 Sven Neumann <sven@convergence.de>
* src/pfr/pfrtypes.h (PFR_KernPair): New structure.
* src/prf/pfrtypes.h (PFR_KernPair): New structure.
(PFR_PhyFont): Use it.
(PFR_KernFlags): New enumeration.
* src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): New
@ -8244,7 +8245,7 @@
`fttype1.c' in src/base.
* src/pshinter/pshglob.c (psh_blues_scale_zones): Fixed a bug that
prevented family blue zones substitution from happening correctly.
prevented family blue zones substitution from hapenning correctly.
* include/freetype/ftbdf.h FT_Get_BDF_Charset_ID): Adding
documentation comment.
@ -8621,7 +8622,7 @@
2002-04-19 Werner Lemberg <wl@gnu.org>
* src/pfr/pfrload.c (pfr_extra_items_parse): Fix debug message.
* src/pfr/pfrload.c (pfr_extra_items_farse): Fix debug message.
(pfr_phy_font_load): s/size/Size/ for local variable to avoid
compiler warning.
* src/pfr/pfrobjs.c (pfr_face_init): Fix debug message.
@ -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
@ -8675,7 +8676,7 @@
2002-04-16 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
* src/pcf/pcfread.c (pcf_get_accel): Fix parsing of accelerator
* src/pcf/pcfread (pcf_get_accell): Fix parsing of accelerator
tables.
2002-04-15 David Turner <david@freetype.org>
@ -8715,7 +8716,7 @@
src/cache/ftcimage.c, src/cache/ftcsbits.c,
src/cff/cffdrivr.c, src/cff/cffload.c, src/cff/cffobjs.c,
src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
@ -9062,12 +9063,12 @@
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,
src/cidtoken.h, src/psaux/psobjs.c, src/psaux/psobjs.h,
src/psaux/t1decode.c, src/type1/t1load.c, src/type1/t1tokens.h:
src/psaux/t1decode.c, stc/type1/t1load.c, src/type1/t1tokens.h:
Updated common PostScript type definitions.
Renamed all enumeration values like to uppercase variants:
@ -9075,7 +9076,7 @@
t1_field_cid_info => T1_FIELD_LOCATION_CID_INFO
etc.
* include/freetype/internal/psglobal.h: Removed.
* include/freetype/internal/psglobals.h: Removed.
* include/freetype/internal/pshints.h, src/pshinter/pshglob.h:
Updated.
@ -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, 2003, 2004, 2005, 2007, 2008 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.
@ -260,7 +260,7 @@
2006-04-26 Werner Lemberg <wl@gnu.org>
* src/psaux/psobjs.c (shift_elements): Don't use FT_Long but
FT_PtrDist for `delta'. Reported by Céline PILLET
FT_PtrDiff for `delta'. Reported by Céline PILLET
<Celine.Pillet@Tagginfo.com>.
2006-04-21 David Turner <david@freetype.org>
@ -352,7 +352,7 @@
* src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'"
also.
2006-03-23 David Turner <david@freetype.org>
2006-03-23 David Turner <david@freetype.org>
Add FT_Get_SubGlyph_Info API to retrieve subglyph data. Note that
we do not expose the FT_SubGlyphRec structure.
@ -360,7 +360,7 @@
* include/freetype/internal/ftgloadr.h (FT_SUBGLYPH_FLAGS_*): Moved
to...
* include/freetype/freetype.h (FT_SUBGLYPH_FLAGS_*): Here.
(FT_Get_SubGlyph_Info): New declaration.
(FT_Get_SybGlyph_Info): New declaration.
* src/base/ftobjs.c (FT_Get_SubGlyph_Info): New function.
@ -387,10 +387,10 @@
(FTC_INode_Weight): Commented out.
* src/cache/ftcimage.h: Updated.
* src/cache/ftcmanag.c (FTC_Manager_Compress,
* src/cache/ftmanag.c (FTC_Manager_Compress,
FTC_Manager_RegisterCache, FTC_Manager_FlushN):
s/FT_EXPORT/FT_LOCAL/.
* src/cache/ftcmanag.h: Updated.
* src/cache/ftmanag.h: Updated.
* src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
@ -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
@ -934,7 +934,7 @@
* include/freetype/freetype.h (FT_GlyphSlotRec): Improve
documentation of `outline' field.
* src/sfnt/sfobjs.c: Include FT_INTERNAL_DEBUG_H.
* src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H.
* src/sfnt/sfdriver.c: Include ttmtx.h.
* src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
@ -1630,8 +1630,8 @@
* include/freetype/internal/t1types.h (T1_FaceRec): Updated.
* src/psaux/t1cmap.h (T1_CMapStdRec): Updated.
(T1_CMapUnicode, T1_CMapUnicodeRec): Removed.
* src/psaux/t1cmap.h (T1_CmapStdRec): Updated.
(T1_CmapUnicode, T1_CmapUnicodeRec): Removed.
* src/psaux/t1cmap.c (t1_get_glyph_name): New callback function.
(t1_cmap_unicode_init, t1_cmap_unicode_done,
@ -1781,7 +1781,7 @@
Note that this doesn't force auto-hinting for all fonts, however.
* src/autofit/afhints.c (af_glyph_hints_reload): Don't set
scaler_flags here but...
scaler_fiags here but...
(af_glyph_hints_rescale): Here.
* src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal
@ -1813,7 +1813,7 @@
[TT_CONFIG_OPTION_BDF]: New structure.
(TT_FaceRec) [TT_CONFIG_OPTION_BDF]: New member `bdf'.
* include/freetype/tttags.h (TTAG_BDF): New macro.
* include/freetype/ttags.h (TTAG_BDF): New macro.
* src/sfnt/Jamfile (_sources): Add ttbdf.
@ -1835,7 +1835,7 @@
2005-12-07 Werner Lemberg <wl@gnu.org>
* src/sfnt/sfobjs.c (sfnt_init_face): Move tag check to...
* src/sfnt/sfobjc.c (sfnt_init_face): Move tag check to...
* src/sfnt/ttload.c (sfnt_init): Here, before handling TTCs.
2005-12-06 Chia-I Wu <b90201047@ntu.edu.tw>
@ -1962,7 +1962,7 @@
* docs/CHANGES: Mention scaling bug.
2005-11-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2005-11-18 susuzki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* include/freetype/ftgxval.h, src/base/ftgxval.c
(FT_TrueTypeGX_Free, FT_ClassicKern_Free): New functions to free
@ -2311,16 +2311,16 @@
CJK font). A SING Glyphlet Font is an OpenType font that contains
the outline(s), either in a `glyf' or `CFF' table, for a glyph;
`cmap', `BASE', and `GSUB' tables are present with the same format
and functionality as a regular OpenType font; there are no `name',
and functionaliy as a regular OpenType font; there are no `name',
`head', `OS/2', and `post' tables; there are two new tables, `SING'
which contains details about the glyphlet, and `META' which contains
metadata.
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
* include/freetype/ttags.h (TTAG_SING, TTAG_META): New macros for
the OpenType tables `SING' and `META'. These two tables are used in
SING Glyphlet Format fonts.
@ -2371,7 +2371,7 @@
(gxv_kern_subtable_fmt1_valueTable_load,
gxv_kern_subtable_fmt1_subtable_setup,
gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors.
(gxv_kern_coverage_validate): Use KERN_DIALECT_UNKNOWN.
(gxv_kern_coverage_validate): Use KERN_DIALECT_UNKWOWN.
Improve trace message.
(gxv_kern_validate_generic): Fix C++ compiler error.
Improve trace message.
@ -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, 2006, 2007, 2008 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.
@ -139,7 +139,7 @@
Fix compilation warning.
* src/base/ftbase.h: s/LOCAL_DEF/LOCAL/.
* src/base/ftobjs.c: Include ftbase.h conditionally.
* src/base/ftobjc.s: Include ftbase.h conditionally.
2010-01-11 Kwang Yul Seo <skyul@company100.net>
@ -197,7 +197,7 @@
Fix Savannah bug #28395.
* src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c
(T1_Load_Glyph): Don't check `num_glyphs' if incremental interface
(T1_Loada_Glyph): Don't check `num_glyphs' if incremental interface
is used.
2010-01-05 Ken Sharp <ken.sharp@artifex.com>
@ -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.
@ -655,9 +655,9 @@
[Win64] Improve the computation of random seed from stack address.
On LLP64 platform, the conversion from pointer to FT_Fixed need
to drop higher 32-bit. Explicit casts are required. Reported by
to drop higher 32-bit. Explict 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.
@ -891,7 +891,7 @@
pcf: Fix a comparison between FT_Long and FT_ULong.
* src/pcf/pcfread.c (pcf_get_bitmaps): Return an error
if PCF_Face->nmetrics is negative.
if PCF_Face->nemetrics is negative.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -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>
@ -1150,7 +1150,7 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
cache: Insert explicit casts for LP64 systems.
cache: Insert explict casts for LP64 systems.
* src/cache/ftcbasic.c (FTC_ImageCache_Lookup,
FTC_SBitCache_Lookup): The type of FTC_ImageType->width
@ -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.
@ -1409,7 +1409,7 @@
base: Prevent some overflows on LP64 systems.
* src/base/ftadvanc.c (FT_Get_Advances): Cast the
* src/base/ftadvance.c (FT_Get_Advances): Cast the
unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32
for LP64 platforms.
@ -1499,7 +1499,7 @@
bdf: Fix some data types mismatching with their sources.
* src/bdf/bdfdrivr.c (bdf_cmap_char_index): The type
* src/bdf/bdrdrivr.c (bdf_cmap_char_index): The type
of `code' is matched with BDF_encoding_el->enc.
(bdf_cmap_char_next): The type of `charcode' is
matched with BDF_encoding_el->enc. When *acharcode
@ -1545,7 +1545,7 @@
* src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
the legacy behaviour from 16-bit platform, because the
current hack cannot detect the caller uses this function
via legacy convention.
via legacy convension.
(FTC_SBitCache_Lookup): Ditto.
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -1585,7 +1585,7 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
fttypes.h: Cast FT_MAKE_TAG output to FT_Tag explicitly.
fttypes.h: Cast FT_MAKE_TAG output to FT_Tag exlicitly.
* include/freetype/fttypes.h (FT_MAKE_TAG):
Cast the result to FT_Tag.
@ -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.
@ -1687,7 +1687,7 @@
sfnt: Count the size of the memory object by ptrdiff_t.
* src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of
`property_len' is changed from FT_UInt to FT_Offset,
`peroperty_len' is changed from FT_UInt to FT_Offset,
to match with size_t, which is appropriate type for the
object in the memory buffer.
@ -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>
@ -2122,10 +2122,10 @@
Use 16.16 format everywhere (except for large integers followed by a
`div').
[CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
code unconditionally.
code uncoditionally.
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.
@ -2479,7 +2479,7 @@
af_latin_script_class struct will have function to init it instead of
being allocated in the global scope.
Change af_latin_blue_chars to be PIC-compatible by being a two
dimensional array rather than array of pointers.
dimentional array rather than array of pointers.
* src/autofit/aflatin2.h declare af_latin2_script_class
@ -2489,11 +2489,11 @@
af_latin2_script_class struct will have function to init it instead of
being allocated in the global scope.
Change af_latin2_blue_chars to be PIC-compatible by being a two
dimensional array rather than array of pointers.
dimentional array rather than array of pointers.
* src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
af_script_classes array initialization was moved to afpic.c and
is later referred using macros defined in afpic.h.
is later refered using macros defeined in afpic.h.
New Files:
* src/autofit/afpic.h declare struct to hold PIC globals for autofit
@ -2573,7 +2573,7 @@
Macros will be used from rastpic.h in order to access
ft_standard_raster from the pic_container (allocated in ftraster.c).
In ft_raster1_render when PIC is enabled, the last letter of
module_name is used to verify the renderer class rather than the
module_name is used to verfy the renderer class rather than the
class pointer.
* src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined
@ -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
@ -2755,7 +2755,7 @@
And macros will be used from ttpic.h in order to access them
from the pic_container.
* src/truetype/ttobjs.c change trick_names array to be
PIC-compatible by being a two dimensional array rather than array
PIC-compatible by being a two dimentional array rather than array
of pointers.
New Files:
@ -2784,14 +2784,14 @@
Add macros to declare, allocate and initialize drivers
(FT_Driver_ClassRec).
* include/freetype/internal/ftpic.h new file to declare the
FT_PIC_Container struct and the functions to allocate and destroy it.
FT_PIC_Container struct and the functions to allocate and detroy it.
* include/freetype/internal/ftserv.h add macros to allocate and
destroy arrays of FT_ServiceDescRec.
destory arrays of FT_ServiceDescRec.
* include/freetype/internal/internal.h define macro to include
ftpic.h.
New Files:
* src/base/ftpic.c implement functions to allocate and destroy the
* src/base/ftpic.c implement functions to allocate and destory the
global pic_container.
* src/base/basepic.h declare struct to hold PIC globals for base and
macros to access them.
@ -2814,8 +2814,8 @@
* src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
in the pic_container instead of the global scope and use macros from
basepic.h to access them.
* src/base/ftbbox.c allocate bbox_interface struct on the stack
basepic.h to access them.
* src/base/ftbbox.c allocate bbox_interface stract on the stack
instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
* src/base/ftstroke.c access ft_outline_glyph_class allocated in
ftglyph.c via macros from basepic.h
@ -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.
@ -3519,7 +3519,7 @@
2008-12-21 Werner Lemberg <wl@gnu.org>
* src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
src/smooth/ftgrays.c, src/base/ftobjs.c, src/sfobjs.c:
src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for
errors in the bytecode interpreter only.
@ -3576,7 +3576,7 @@
* docs/CHANGES: Updated.
2008-12-18 David Bevan <dbevan@emtex.com>
2008-12-18 Bevan, David <dbevan@emtex.com>
Provide API for accessing embedding and subsetting restriction
information.
@ -3656,12 +3656,12 @@
* src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
nor bitmaps is scalable.
2008-12-05 Werner Lemberg <wl@gnu.org>
2008-12-05 Werner Lemberg <wl@nu.org>
* src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
fixes Savannah bug #21190 which also provides a basic patch.
2008-12-05 Werner Lemberg <wl@gnu.org>
2008-12-05 Werner Lemberg <wl@nu.org>
* include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
0x100 instead of 0x10000; the latter value is already occupied by
@ -4098,7 +4098,7 @@
2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined
in tttags.h instead of numerical value 0x4F54544FL.
in ttags.h instead of numerical value 0x4F54544FL.
2008-09-16 Werner Lemberg <wl@gnu.org>
@ -4156,11 +4156,11 @@
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'.
2008-09-01 David Turner <david@freetype.org>
2008-09-01 david turner <david@freetype.org>
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap
index to mean `use default cached FT_Face's charmap'. This fixes
@ -4248,7 +4248,7 @@
2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in
tttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
2008-08-28 Werner Lemberg <wl@gnu.org>
@ -4258,7 +4258,7 @@
2008-08-23 Werner Lemberg <wl@gnu.org>
* src/type/t1afm.c (compare_kern_pairs), src/psaux/afmparse.c
* src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
(afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug
#24119.
@ -4387,7 +4387,7 @@
* src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
Invert sids table only if `pure_cff' is set.
* src/cff/cffload.h: Updated.
* src/cff/cffload.h: Udpated.
* src/cff/cffobjs.c (cff_face_init): Updated.
Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
@ -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>
@ -4931,7 +4931,7 @@
tt_cmap14_find_variant): Return correct value.
(tt_cmap14_variant_chars): Fix check for `di'.
2008-02-29 Werner Lemberg <wl@gnu.org>
2008-02-29 Wermer Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.
@ -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
@ -5329,7 +5329,7 @@
2007-08-18 Werner Lemberg <wl@gnu.org>
* src/otvalid/otvcommn.c (otv_x_y_ux_sy): Skip context glyphs. Found
* src/otvalid/otvcmmn.c (otv_x_y_ux_sy): Skip context glyphs. Found
by Imran Yousaf. Fixes Savannah bug #20773.
(otv_Lookup_validate): Correct handling of LookupType. Found by
@ -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.
@ -5428,7 +5428,7 @@
* include/freetype/config/ftheader.h (FT_CID_H): New macro.
* include/freetype/ftcid.h: New file.
* include/freetype/internal/ftserv.h (FT_SERVICE_CID_H): New macro.
* include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
* include/freetype/internal/services/svcid.h: New file.
* src/base/ftcid.c: New file.
@ -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>
@ -5938,7 +5938,7 @@
Savannah patch #5929.
* include/freetype/tttables.h, src/base/ftobjs.c
* include/freetype/tttables.h, src/base/ftobjcs.c
(FT_Get_CMap_Format): New function.
* include/freetype/internal/services/svttcmap.c (TT_CMapInfo): Add
@ -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>
@ -6005,7 +6005,7 @@
2007-05-11 David Turner <david@freetype.org>
* src/cache/ftcbasic.c, include/freetype/ftcache.h
* src/cache/ftbasic.c, include/freetype/ftcache.h
(FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new
functions that allow us to look up glyphs using an FTC_Scaler object
to specify the size, making it possible to use fractional pixel
@ -6097,8 +6097,8 @@
2007-04-06 David Turner <david@freetype.org>
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite
bug (Savannah bug #19536).
* src/base/ftbimap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug
(Savannah bug #19536).
2007-04-04 Werner Lemberg <wl@gnu.org>
@ -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>
@ -6201,14 +6201,14 @@
conftest.c, to avoid unexpected shell evaluation. Possibly it is a
bug or undocumented behaviour of autoconf.
2007-03-18 David Turner <david@freetype.org>
2007-03-18 David Turner <david@freetype.org>
* src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression
fix; testing still needed.
* src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix.
2007-03-17 David Turner <david@freetype.org>
2007-03-17 David Turner <david@freetype.org>
* src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the
(undocumented) twilight zone special case.
@ -6256,7 +6256,7 @@
case FT_Init_FreeType fails for some reason. Problem reported by
Maximilian Schwerin <maximilian.schwerin@buelowssiege.de>.
* src/truetype/ttobjs.c (tt_size_init_bytecode): Clear the `x_ppem'
* src/truetype/ttobs.c (tt_size_init_bytecode): Clear the `x_ppem'
and `y_ppem' fields of the `TT_Size.metrics' structure, not those of
`TT_Size.root.metrics'. Problem reported by Daniel Glöckner
<daniel-gl@gmx.net>.
@ -6335,7 +6335,7 @@
* src/base/ftutil.c (ft_mem_dup, ft_mem_strdup, ft_mem_strcpyn): New
functions.
* src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Init),
* src/bfd/bfddrivr.c (bdf_interpret_style, BDF_Face_Init),
src/bdf/bdflib.c (_bdf_add_property), src/pcf/pcfread.c
(pcf_get_properties, pcf_interpret_style, pcf_load_font),
src/cff/cffdrivr.c (cff_get_glyph_name), src/cff/cffload.c
@ -6546,7 +6546,7 @@
2007-01-16 David Turner <david@freetype.org>
* src/autofit/aflatin.c (af_latin_hints_compute_segments),
src/cff/cffdrivr.c (cff_ps_get_font_info), src/truetype/ttobjs.c
src/cff/cffdriver.c (cff_ps_get_font_info), src/truetype/ttobjs.c
(tt_face_init), src/truetype/ttinterp.c (Ins_SHC): Fix compiler
warnings.
@ -6592,7 +6592,7 @@
* src/cff/cffload.c: Include FT_TYPE1_TABLES_H.
(cff_font_done): Free font->font_info if necessary.
* src/cff/cffdrivr.c (cff_ps_get_font_info): New function.
* src/cff/cffdrvr.c (cff_ps_get_font_info): New function.
(cff_service_ps_info): Register cff_ps_get_font_info.
2007-01-13 Werner Lemberg <wl@gnu.org>
@ -6668,7 +6668,7 @@
2007-01-10 Derek Clegg <dclegg@apple.com>
* src/type1/t1load.c (T1_Get_MM_Var): Always return fixed-point
* src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point
values.
2007-01-08 David Turner <david@freetype.org>
@ -6734,7 +6734,7 @@
files are not used.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add members
`horz_metrics_offset' and `vert_metrics_offset'.
`horz_metrics_offset' and `vert_metrics_ofset'.
* src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics):
Updated.
@ -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.
@ -7517,14 +7517,14 @@
2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
build ftvalid in ft2demos. This has been inadvertently changed
build ftvalid in ft2demos. This has been inadvertedly changed
2006-08-13.
2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
`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.
@ -7647,7 +7647,7 @@
`len_buildchar'.
Remove `keywords_flags'.
* src/type1/t1load.h (T1_LoaderRec): New field
* src/type1/t1load.h (T1_LoaderRect): New field
`keywords_encountered'.
(T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros.
@ -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
@ -7840,7 +7840,7 @@
* src/base/ftobjs.c (load_face_in_embedded_rfork): Replace
`FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
* src/base/ftrfork.c (raccess_guess_linux_double_from_file_name):
* src/base/ftrfrk.c (raccess_guess_linux_double_from_file_name):
Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
@ -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>
@ -7902,7 +7902,7 @@
(FT_Stream_OpenGzip): Use it to handle small files directly in
memory.
* src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode):
* src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_ConvEexecDecode):
Improve performance.
* src/truetype/ttgload.c (TT_Access_Glyph_Frame): Set `cursor' and
@ -7932,7 +7932,7 @@
----------------------------------------------------------------------------
Copyright (C) 2006-2022 by
Copyright 2006, 2007, 2008, 2009, 2010 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,

204
Jamfile Normal file
View File

@ -0,0 +1,204 @@
# FreeType 2 top Jamfile.
#
# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
pcf # PCF font driver
bzip2 # support for bzip2-compressed PCF font
gzip # support for gzip-compressed PCF font
lzw # support for LZW-compressed PCF font
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
pshinter # PostScript hinter module
psnames # PostScript names handling
raster # monochrome rasterizer
smooth # anti-aliased rasterizer
sfnt # SFNT-based format support routines
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 `freetype2/include' in the current include path in order to
# compile any part of FreeType 2.
#: updating documentation for upcoming release
HDRS += $(FT2_INCLUDE) ;
# We need to #define FT2_BUILD_LIBRARY so that our sources find the
# internal headers
#
DEFINES += FT2_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 file <freetype/config/ftheader.h> is used to define macros that are
# later used in #include statements. It needs to be parsed in order to
# record these definitions.
#
HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir include freetype internal internal.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 contain 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 headers = [ Glob $(2) : *.h ] ;
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 include/freetype/cache ;
# 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.4.4 --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, 2002, 2003 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-2000, 2002, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

109
README
View File

@ -1,100 +1,57 @@
FreeType 2.12.1
===============
Special notes to Unix users
===========================
Homepage: https://www.freetype.org
Please read the file `docs/UPGRADE.UNIX'. It contains important
information regarding the installation of FreeType on Unix systems,
especially GNU based operating systems like GNU/Linux.
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/
FreeType 2's library is called `libfreetype', FreeType 1's library
is called `libttf'. They are *not* compatible!
Mailing Lists
-------------
FreeType 2.4.4
==============
The preferred way of communication with the FreeType team is using
e-mail lists.
Please read the docs/CHANGES file, it contains IMPORTANT
INFORMATION.
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
Read the files `docs/INSTALL' for installation instructions.
The lists are moderated; see
The FreeType 2 API reference is located in `docs/reference'; use the
file `ft2-doc.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
https://www.freetype.org/contact.html
http://download.savannah.gnu.org/releases/freetype/
how to subscribe.
and download one of the following files.
freetype-doc-2.4.4.tar.bz2
freetype-doc-2.4.4.tar.gz
ftdoc244.zip
Bugs
----
Bugs
====
Please submit bug reports at
Please 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'.
https://gitlab.freedesktop.org/freetype/freetype/-/issues
Alternatively, you may submit a bug report at
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'.
https://savannah.nongnu.org/bugs/?group=freetype
Patches
-------
For larger changes please provide merge requests at
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
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
Enjoy!
Enjoy!
The FreeType Team
The FreeType Team
----------------------------------------------------------------------
Copyright (C) 2006-2022 by
Copyright 2006, 2007, 2008, 2009, 2010 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,30 @@ 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`).
should work on all platforms which 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.
Code of Conduct
---------------
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, 2006, 2007, 2008, 2009, 2010 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

63
autogen.sh Executable file → Normal file
View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (C) 2005-2022 by
# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -55,7 +55,7 @@ compare_to_minimum_version ()
if test $MAJOR1 -lt $MAJOR2; then
echo 0
return
else
else
if test $MAJOR1 -gt $MAJOR2; then
echo 1
return
@ -67,7 +67,7 @@ compare_to_minimum_version ()
if test $MINOR1 -lt $MINOR2; then
echo 0
return
else
else
if test $MINOR1 -gt $MINOR2; then
echo 1
return
@ -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
@ -121,12 +118,9 @@ fi
# On MacOS X, the GNU libtool is named `glibtool'.
HOSTOS=`uname`
if test "$LIBTOOLIZE"x != x; then
:
elif test "$HOSTOS"x = Darwinx; then
LIBTOOLIZE=libtoolize
if test "$HOSTOS"x = Darwinx; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
if test "$ACLOCAL"x = x; then
@ -141,60 +135,29 @@ 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
run $LIBTOOLIZE --force --copy --install
run autoconf --force
chmod +x mkinstalldirs
chmod +x install-sh
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 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
@ -71,8 +71,8 @@ directory. The results are:
To use in your own programs:
- Insert the #define and #include statements from top of
include/freetype/config/ftmodule.h in your source code and
uncomment the #define statements for the FreeType2 modules you need.
include/freetype/config/ftmodule.h in your source code and uncomment
the #define statements for the FreeType2 modules you need.
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
calling the FreeType2 functions, because the link library and the
@ -101,8 +101,8 @@ To adapt to other compilers:
useful for the src directory).
- An example of how to replace/workaround a problematic include file
is include/freetype/config/ftconfig.h; it changes a #define that
would prevent SAS/C from generating XDEF's where it should do that and
is include/config/ftconfig.h; it changes a #define that would
prevent SAS/C from generating XDEF's where it should do that and
then includes the standard FreeType2 include file.
Local Variables:

View File

@ -4,7 +4,7 @@
/* */
/* Amiga-specific configuration file (specification only). */
/* */
/* Copyright (C) 2005-2022 by */
/* Copyright 2005, 2006, 2007 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 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, 2006, 2007, 2009 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -108,6 +108,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 $@ $<
@ -132,6 +135,9 @@ fttype1.ppc.o: $(FTSRC)/base/fttype1.c
ftwinfnt.ppc.o: $(FTSRC)/base/ftwinfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
ftxf86.ppc.o: $(FTSRC)/base/ftxf86.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library autofitting module
#
@ -263,11 +269,11 @@ gxvalid.ppc.o: $(FTSRC)/gxvalid/gxvalid.c
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 \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o
BASEPPC = 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 \
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 \
ftxf86.ppc.o
DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005, 2006, 2007, 2009 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -111,6 +111,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
@ -135,6 +138,9 @@ fttype1.ppc.o: FT:src/base/fttype1.c
ftwinfnt.ppc.o: FT:src/base/ftwinfnt.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftwinfnt.c
ftxf86.ppc.o: FT:src/base/ftxf86.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftxf86.c
#
# FreeType2 library autofitting module
#
@ -267,11 +273,11 @@ gxvalid.ppc.o: FT:src/gxvalid/gxvalid.c
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 \
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
fttype1.ppc.o ftwinfnt.ppc.o
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 \
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 \
ftxf86.ppc.o
DEBUG = ftdebug.ppc.o ftdebugpure.ppc.o

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 2005-2022 by
# Copyright 2005,2006, 2007, 2009 by
# Werner Lemberg and Detlef Würkner.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -42,9 +42,9 @@
# (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 \
ftpatent.o ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.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 ftxf86.o
OBJSYSTEM = ftsystem.o ftsystempure.o
@ -141,6 +141,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
@ -157,6 +159,8 @@ fttype1.o: $(CORE)base/fttype1.c
sc $(SCFLAGS) objname=$@ $<
ftwinfnt.o: $(CORE)base/ftwinfnt.c
sc $(SCFLAGS) objname=$@ $<
ftxf86.o: $(CORE)base/ftxf86.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library autofitter module

View File

@ -1,89 +1,87 @@
/****************************************************************************
*
* 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 (body). */
/* */
/* Copyright 1996-2001, 2002, 2004, 2005 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. */
/* */
/*************************************************************************/
/*
* Based on the default ftdebug.c,
* replaced vprintf() with KVPrintF(),
* commented out exit(),
* replaced getenv() with GetVar().
*/
/**************************************************************************
*
* 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'.
*/
#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 */
FT_BASE_DEF( void )
FT_Message( const char* fmt,
... )
FT_Message( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
}
@ -92,42 +90,17 @@
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Panic( const char* fmt,
... )
FT_Panic( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
/* vprintf( fmt, ap ); */
KVPrintF( fmt, ap );
va_end( ap );
/* exit( EXIT_FAILURE ); */
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( int )
FT_Throw( FT_Error error,
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;
/* exit( EXIT_FAILURE ); */
}
#endif /* FT_DEBUG_LEVEL_ERROR */
@ -136,23 +109,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 +149,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;
@ -245,9 +193,6 @@
while ( *p && *p != ':' )
p++;
if ( !*p )
break;
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
@ -276,7 +221,7 @@
p++;
if ( *p )
{
level = *p - '0';
level = *p++ - '0';
if ( level < 0 || level > 7 )
level = -1;
}
@ -287,16 +232,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 +269,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-2001, 2002, 2005, 2006, 2007, 2010 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;
}
@ -386,7 +386,7 @@ Free_VecPooled( APTR poolHeader,
if ( !stream )
return FT_THROW( Invalid_Stream_Handle );
return FT_Err_Invalid_Stream_Handle;
#ifdef __amigaos4__
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
@ -398,7 +398,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
}
sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
if ( !sysfile->file )
@ -407,7 +407,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
}
fib = AllocDosObject( DOS_FIB, NULL );
@ -418,7 +418,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
}
if ( !( ExamineFH( sysfile->file, fib ) ) )
{
@ -428,7 +428,7 @@ Free_VecPooled( APTR poolHeader,
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
}
stream->size = fib->fib_Size;
FreeDosObject( DOS_FIB, fib );
@ -447,7 +447,7 @@ Free_VecPooled( APTR poolHeader,
ft_amiga_stream_close( stream );
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
return FT_THROW( Cannot_Open_Stream );
return FT_Err_Cannot_Open_Stream;;
}
FT_TRACE1(( "FT_Stream_Open:" ));

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2003, 2006 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-2000 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,4 +1,4 @@
#if defined( GXVALID_H_ )
#if defined( __GXVALID_H__ )
#pragma warn -aus /* too many unevaluated variables in gxvalid */
#endif

View File

@ -15,11 +15,11 @@ 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_
#define FT2_BUILD_GENERIC_H_
#ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_GENERIC_H__
#include "ATARI.H"
@ -40,11 +40,11 @@ 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_
#define FT2_BUILD_GENERIC_H_
#ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_GENERIC_H__
#include "ATARI.H"

View File

@ -15,7 +15,7 @@ function shift( array, \
function init_cpp_src_line()
{
logical_line = ""
delete break_pos
delete break_pos
}
@ -110,8 +110,8 @@ function shrink_spaces_to_linebreak( pos, \
{
for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ )
;
if ( break_pos[i] < 1 )
if ( break_pos[i] < 1 )
return;
part_str = substr( logical_line, pos, break_pos[i] - pos + 1 )

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2003, 2006 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-2000, 2002, 2005 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-2000, 2003, 2006 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,203 +0,0 @@
# 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:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Intel Corporation nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# 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
#[=======================================================================[.rst:
FindHarfBuzz
--------------
Find HarfBuzz headers and libraries.
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_library(HarfBuzz_LIBRARY
NAMES ${HarfBuzz_NAMES} harfbuzz
HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS}
)
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}")
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}")
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 ()
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 ()
mark_as_advanced(
HarfBuzz_INCLUDE_DIR
HarfBuzz_ICU_INCLUDE_DIR
HarfBuzz_LIBRARY
HarfBuzz_ICU_LIBRARY
)
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,270 +0,0 @@
# iOS.cmake
#
# Copyright (C) 2014-2022 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written by David Wimsey <david@wimsey.us>
#
# 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 is derived from the files `Platform/Darwin.cmake' and
# `Platform/UnixPaths.cmake', which are part of CMake 2.8.4. It has been
# altered for iOS development.
# Options
# -------
#
# IOS_PLATFORM = OS | SIMULATOR
#
# This decides whether SDKS are selected from the `iPhoneOS.platform' or
# `iPhoneSimulator.platform' folders.
#
# OS - the default, used to build for iPhone and iPad physical devices,
# which have an ARM architecture.
# SIMULATOR - used to build for the Simulator platforms, which have an
# x86 architecture.
#
# CMAKE_IOS_DEVELOPER_ROOT = /path/to/platform/Developer folder
#
# By default, this location is automatically chosen based on the
# IOS_PLATFORM value above. If you manually set this variable, it
# overrides the default location and forces the use of a particular
# Developer Platform.
#
# CMAKE_IOS_SDK_ROOT = /path/to/platform/Developer/SDKs/SDK folder
#
# By default, this location is automatically chosen based on the
# CMAKE_IOS_DEVELOPER_ROOT value. In this case it is always the most
# up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If you
# manually set this variable, it forces the use of a specific SDK
# version.
#
#
# Macros
# ------
#
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
#
# A convenience macro for setting Xcode specific properties on targets.
#
# Example:
#
# set_xcode_property(myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
#
# find_host_package (PROGRAM ARGS)
#
# A macro to find executable programs on the host system, not within the
# iOS environment. Thanks to the `android-cmake' project for providing
# the command.
# standard settings
set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_SYSTEM_VERSION 1)
set(UNIX True)
set(APPLE True)
set(IOS True)
# required as of cmake 2.8.10
set(CMAKE_OSX_DEPLOYMENT_TARGET ""
CACHE STRING "Force unset of the deployment target for iOS" FORCE
)
# determine the cmake host system version so we know where to find the iOS
# SDKs
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
if (CMAKE_UNAME)
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1"
DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
endif (CMAKE_UNAME)
# skip the platform compiler checks for cross compiling
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_C_COMPILER_WORKS TRUE)
# all iOS/Darwin specific settings - some may be redundant
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "")
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG
"-compatibility_version ")
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG
"-current_version ")
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG
"${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG
"${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
# hidden visibility is required for cxx on iOS
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT
"-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
set(CMAKE_C_LINK_FLAGS
"-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set(CMAKE_CXX_LINK_FLAGS
"-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
"-dynamiclib -headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"-bundle -headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG
"-Wl,-bundle_loader,")
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG
"-Wl,-bundle_loader,")
set(CMAKE_FIND_LIBRARY_SUFFIXES
".dylib" ".so" ".a")
# hack: If a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
# build tree (where `install_name_tool' was hardcoded), and where
# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't
# fail in `CMakeFindBinUtils.cmake' (because it isn't rerun), hardcode
# CMAKE_INSTALL_NAME_TOOL here to `install_name_tool' so it behaves as
# it did before.
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# set up iOS platform unless specified manually with IOS_PLATFORM
if (NOT DEFINED IOS_PLATFORM)
set(IOS_PLATFORM "OS")
endif (NOT DEFINED IOS_PLATFORM)
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
# check the platform selection and setup for developer root
if (${IOS_PLATFORM} STREQUAL "OS")
set(IOS_PLATFORM_LOCATION "iPhoneOS.platform")
# this causes the installers to properly locate the output libraries
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
# this causes the installers to properly locate the output libraries
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
else (${IOS_PLATFORM} STREQUAL "OS")
message(FATAL_ERROR
"Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR.")
endif (${IOS_PLATFORM} STREQUAL "OS")
# set up iOS developer location unless specified manually with
# CMAKE_IOS_DEVELOPER_ROOT --
# note that Xcode 4.3 changed the installation location; choose the most
# recent one available
set(XCODE_POST_43_ROOT
"/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
set(XCODE_PRE_43_ROOT
"/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
if (EXISTS ${XCODE_POST_43_ROOT})
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
elseif (EXISTS ${XCODE_PRE_43_ROOT})
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
endif (EXISTS ${XCODE_POST_43_ROOT})
endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT}
CACHE PATH "Location of iOS Platform"
)
# find and use the most recent iOS SDK unless specified manually with
# CMAKE_IOS_SDK_ROOT
if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
if (_CMAKE_IOS_SDKS)
list(SORT _CMAKE_IOS_SDKS)
list(REVERSE _CMAKE_IOS_SDKS)
list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
else (_CMAKE_IOS_SDKS)
message(FATAL_ERROR
"No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
endif (_CMAKE_IOS_SDKS)
message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT}
CACHE PATH "Location of the selected iOS SDK"
)
# set the sysroot default to the most recent SDK
set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT}
CACHE PATH "Sysroot used for iOS support"
)
# set the architecture for iOS --
# note that currently both ARCHS_STANDARD_32_BIT and
# ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
if (${IOS_PLATFORM} STREQUAL "OS")
set(IOS_ARCH $(ARCHS_STANDARD_32_64_BIT))
else (${IOS_PLATFORM} STREQUAL "OS")
set(IOS_ARCH i386)
endif (${IOS_PLATFORM} STREQUAL "OS")
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH}
CACHE string "Build architecture for iOS"
)
# set the find root to the iOS developer roots and to user defined paths
set(CMAKE_FIND_ROOT_PATH
${CMAKE_IOS_DEVELOPER_ROOT}
${CMAKE_IOS_SDK_ROOT}
${CMAKE_PREFIX_PATH}
CACHE string "iOS find search path root"
)
# default to searching for frameworks first
set(CMAKE_FIND_FRAMEWORK FIRST)
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
)
# only search the iOS SDKs, not the remainder of the host filesystem
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# this little macro lets you set any Xcode specific property
macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
set_property(TARGET ${TARGET}
PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
endmacro(set_xcode_property)
# this macro lets you find executable programs on the host system
macro(find_host_package)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
set(IOS FALSE)
find_package(${ARGN})
set(IOS TRUE)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endmacro(find_host_package)
# eof

View File

@ -1,157 +0,0 @@
#!/bin/sh -e
# Copyright (C) 2015-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 script tests the CMake build. Simply run
#
# builds/cmake/testbuild.sh
#
# or
#
# BUILD_SHARED_LIBS=1 builds/cmake/testbuild.sh
#
# The script:
#
# - builds the main CMakeLists.txt
# - builds and runs a small test app in a separate build tree so
# the config-module is tested, too
#
# Options (environment variables):
#
# - The variable BUILD_SHARED_LIBS will be forwarded to the CMake project
# that builds the library.
#
# prepare temporary dir
cd `dirname $0`/../..
ftdir=`pwd`
tmpdir=/tmp/freetype-cmake-testbuild
rm -rf $tmpdir
mkdir -p $tmpdir
# build and install freetype
if test -n "$BUILD_SHARED_LIBS"; then
bsl=-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
else
bsl=-UBUILD_SHARED_LIBS
fi
build_opts="-DWITH_ZLIB=0 \
-DWITH_BZip2=0 \
-DWITH_PNG=0 \
-DWITH_HarfBuzz=0 \
$bsl \
-DCMAKE_INSTALL_PREFIX=$tmpdir/out"
(set -x; cmake -H$ftdir \
-B$tmpdir/ftb \
-DCMAKE_BUILD_TYPE=Debug \
$build_opts)
(set -x; cmake --build $tmpdir/ftb \
--config Debug \
--target install)
(set -x; cmake $tmpdir/ftb \
-DCMAKE_BUILD_TYPE=Release)
(set -x; cmake --build $tmpdir/ftb \
--config Release \
--target install \
--clean-first)
# create test project CMakeLists.txt
cat >$tmpdir/CMakeLists.txt << END
cmake_minimum_required(VERSION 2.6)
project(freetype-cmake-testbuild)
find_package(Freetype REQUIRED CONFIG)
add_executable(freetype-cmake-test main.c)
target_link_libraries(freetype-cmake-test freetype)
enable_testing()
add_test(freetype-cmake-test freetype-cmake-test)
END
# create test project main.c
cat >$tmpdir/main.c << END
#include <stdio.h>
#include <stdlib.h>
#include <ft2build.h>
#include <freetype/freetype.h>
FT_Library library;
int main(int argc,
char*argv[])
{
FT_Error error;
FT_Int major = 0;
FT_Int minor = 0;
FT_Int patch = 0;
error = FT_Init_FreeType(&library);
if (error)
return EXIT_FAILURE;
FT_Library_Version(library, &major, &minor, &patch);
if (major != FREETYPE_MAJOR
|| minor != FREETYPE_MINOR
|| patch != FREETYPE_PATCH)
return EXIT_FAILURE;
printf("FT_Library_Version: %d.%d.%d\n", major, minor, patch);
error = FT_Done_FreeType(library);
if (error)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
END
# build and test
mkdir -p $tmpdir/tb
cd $tmpdir/tb
LD_LIBRARY_PATH=$tmpdir/out/lib:$LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$tmpdir/out/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
(set -x; cmake $tmpdir \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH=$tmpdir/out)
(set -x; cmake --build . \
--config Debug)
(set -x; ctest -V -C Debug)
(set -x; cmake . \
-DCMAKE_BUILD_TYPE=Release)
(set -x; cmake --build . \
--config Release \
--clean-first)
(set -x; ctest -V -C Release)
rm -rf $tmpdir
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2003, 2006 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-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -53,21 +53,21 @@ L :=
# Target flag -- no trailing space.
#
T := -o
TE := -e
TE := -e
# C flags
#
# 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-2000, 2003, 2006 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, 2006 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-2000, 2003, 2004, 2005, 2006 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-2000, 2003, 2005, 2006, 2009 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-2000, 2003, 2006 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-2000, 2003, 2006 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-2000, 2003, 2006 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-2000, 2003, 2005, 2006, 2008 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-2000, 2003, 2006 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-2000, 2003, 2006 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-2000, 2001, 2002, 2003, 2006, 2008 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -16,9 +16,9 @@
# 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
# `builds/$(PLATFORM)' but can be different for custom builds
# of the library.
# BUILD_DIR The configuration and system-specific directory. Usually
# `freetype/builds/$(PLATFORM)' but can be different for
# custom builds of the library.
#
# The following variables must be defined in system specific `detect.mk'
# files:
@ -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 (the latter needs python)."
@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 (the latter needs python).
@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-2000, 2003, 2004, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -45,12 +45,12 @@ ifeq ($(PLATFORM),ansi)
endif
# We also try to recognize Dos 7.x without Windows 9X launched.
# See builds/windows/detect.mk for explanations about the logic.
# See builds/win32/detect.mk for explanations about the logic.
#
ifeq ($(is_dos),)
ifdef winbootdir
#ifneq ($(OS),Windows_NT)
# If windows is available, do not trigger this test.
# If win32 is available, do not trigger this test.
ifndef windir
is_dos := $(findstring Windows,$(strip $(shell ver)))
endif
@ -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
@ -134,7 +124,7 @@ ifeq ($(PLATFORM),dos)
CAT := type
# Setting COPY is a bit trickier. We can be running DJGPP on some
# Windows NT derivatives, like XP. See builds/windows/detect.mk for
# Windows NT derivatives, like XP. See builds/win32/detect.mk for
# explanations why we need hacking here.
#
ifeq ($(OS),Windows_NT)
@ -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-2000, 2003, 2005, 2006 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 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-2000, 2003 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 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, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -40,11 +40,7 @@ ifneq ($(EXPORTS_LIST),)
endif
# The list of public headers we're going to parse.
PUBLIC_HEADERS := $(filter-out $(PUBLIC_DIR)/ftmac.h, \
$(wildcard $(PUBLIC_DIR)/*.h))
ifneq ($(ftmac_c),)
PUBLIC_HEADERS += $(PUBLIC_DIR)/ftmac.h
endif
PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h)
# The `apinames' source and executable. We use $E_BUILD as the host
# executable suffix, which *includes* the final dot.
@ -55,7 +51,7 @@ ifneq ($(EXPORTS_LIST),)
APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
$(APINAMES_EXE): $(APINAMES_SRC)
$(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
$(CCexe) $(TE)$@ $<
.PHONY: symbols_list

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 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.
#
@ -116,26 +116,16 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
# before the standard include list. Porters are then able to
# put their own version of some of the FreeType components
# in the `builds/<system>' directory, as these files will
# override the default sources.
# in the `freetype/builds/<system>' directory, as these
# files will override the default sources.
#
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)
endif
# C flags used for the compilation of an object file. This must include at
# least the paths for the `base' and `builds/<system>' directories;
@ -148,13 +138,23 @@ endif
# FreeType. This is required to let our sources include the internal
# headers (something forbidden by clients).
#
# `CPPFLAGS' might be specified by the user in the environment.
# 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.
#
FT_CFLAGS = $(CPPFLAGS) \
$(CFLAGS) \
$DFT2_BUILD_LIBRARY
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_H := $(OBJ_DIR)/ftoption.h
FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
endif
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
FT_CFLAGS = $(CPPFLAGS) \
$(INCLUDE_FLAGS) \
$(CFLAGS) \
$DFT2_BUILD_LIBRARY \
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
$(FTOPTION_FLAG)
FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
# Include the `exports' rules file.
@ -169,22 +169,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)/freetype/config/*.h) \
$(FTMODULE_H) \
$(FTOPTION_H)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
@ -220,7 +214,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 +236,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 +261,49 @@ objects: $(OBJECTS_LIST)
library: $(PROJECT_LIBRARY)
# Run `docwriter' in the current Python environment.
#
PYTHON ?= python
dll: $(PROJECT_LIBRARY) exported_symbols
.c.$O:
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
ifneq ($(findstring refdoc,$(MAKECMDGOALS)),)
# poor man's `sed' emulation with make's built-in string functions
work := $(strip $(shell $(CAT) $(PUBLIC_DIR)/freetype.h))
work := $(subst |,x,$(work))
work := $(subst $(space),|,$(work))
work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
work := $(word 2,$(work))
major := $(subst |,$(space),$(work))
major := $(firstword $(major))
work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
work := $(word 2,$(work))
minor := $(subst |,$(space),$(work))
minor := $(firstword $(minor))
work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
work := $(word 2,$(work))
patch := $(subst |,$(space),$(work))
patch := $(firstword $(patch))
version := $(major).$(minor).$(patch)
endif
# We write-protect the docmaker directory to suppress generation
# of .pyc files.
#
refdoc:
@echo Running docwriter...
$(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) && mkdocs build
@echo Done.
-chmod -w $(SRC_DIR)/tools/docmaker
python $(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
-chmod +w $(SRC_DIR)/tools/docmaker
# 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 +348,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-2000 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-2000 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -17,7 +17,6 @@ Includes = \xB6
Sym-68K = -sym off
COptions = \xB6
-d FT_MACINTOSH=1 \xB6
-d HAVE_FSSPEC=1 \xB6
-d HAVE_FSREF=0 \xB6
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
@ -50,6 +49,7 @@ SrcFiles = \xB6
:src:base:ftsystem.c \xB6
:src:base:fttype1.c \xB6
:src:base:ftwinfnt.c \xB6
:src:base:ftxf86.c \xB6
:src:cache:ftcache.c \xB6
:src:bdf:bdf.c \xB6
:src:cff:cff.c \xB6
@ -94,6 +94,7 @@ ObjFiles-68K = \xB6
"{ObjDir}ftsystem.c.o" \xB6
"{ObjDir}fttype1.c.o" \xB6
"{ObjDir}ftwinfnt.c.o" \xB6
"{ObjDir}ftxf86.c.o" \xB6
"{ObjDir}ftcache.c.o" \xB6
"{ObjDir}bdf.c.o" \xB6
"{ObjDir}cff.c.o" \xB6
@ -171,6 +172,7 @@ FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
"{ObjDir}ftxf86.c.o" \xC4 :src:base:ftxf86.c
"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c

View File

@ -16,7 +16,6 @@ Includes = \xB6
Sym-68K = -sym off
COptions = \xB6
-d FT_MACINTOSH=1 \xB6
-d HAVE_FSSPEC=1 \xB6
-d HAVE_FSREF=0 \xB6
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
@ -49,6 +48,7 @@ SrcFiles = \xB6
:src:base:ftsystem.c \xB6
:src:base:fttype1.c \xB6
:src:base:ftwinfnt.c \xB6
:src:base:ftxf86.c \xB6
:src:cache:ftcache.c \xB6
:src:bdf:bdf.c \xB6
:src:cff:cff.c \xB6
@ -93,6 +93,7 @@ ObjFiles-68K = \xB6
"{ObjDir}ftsystem.c.o" \xB6
"{ObjDir}fttype1.c.o" \xB6
"{ObjDir}ftwinfnt.c.o" \xB6
"{ObjDir}ftxf86.c.o" \xB6
"{ObjDir}ftcache.c.o" \xB6
"{ObjDir}bdf.c.o" \xB6
"{ObjDir}cff.c.o" \xB6
@ -170,6 +171,7 @@ FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
"{ObjDir}ftxf86.c.o" \xC4 :src:base:ftxf86.c
"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c

View File

@ -17,7 +17,6 @@ Includes = \xB6
Sym-PPC = -sym off
PPCCOptions = \xB6
-d FT_MACINTOSH=1 \xB6
-d HAVE_FSSPEC=1 \xB6
-d HAVE_FSREF=1 \xB6
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
@ -50,6 +49,7 @@ SrcFiles = \xB6
:src:base:ftsystem.c \xB6
:src:base:fttype1.c \xB6
:src:base:ftwinfnt.c \xB6
:src:base:ftxf86.c \xB6
:src:cache:ftcache.c \xB6
:src:bdf:bdf.c \xB6
:src:cff:cff.c \xB6
@ -94,6 +94,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftsystem.c.x" \xB6
"{ObjDir}fttype1.c.x" \xB6
"{ObjDir}ftwinfnt.c.x" \xB6
"{ObjDir}ftxf86.c.x" \xB6
"{ObjDir}ftcache.c.x" \xB6
"{ObjDir}bdf.c.x" \xB6
"{ObjDir}cff.c.x" \xB6
@ -174,6 +175,7 @@ FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\x
"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
"{ObjDir}ftxf86.c.x" \xC4 :src:base:ftxf86.c
"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c

View File

@ -17,7 +17,6 @@ Includes = \xB6
Sym-PPC = -sym off
PPCCOptions = \xB6
-d FT_MACINTOSH=1 \xB6
-d HAVE_FSSPEC=1 \xB6
-d HAVE_FSREF=0 \xB6
-d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
@ -50,6 +49,7 @@ SrcFiles = \xB6
:src:base:ftsystem.c \xB6
:src:base:fttype1.c \xB6
:src:base:ftwinfnt.c \xB6
:src:base:ftxf86.c \xB6
:src:cache:ftcache.c \xB6
:src:bdf:bdf.c \xB6
:src:cff:cff.c \xB6
@ -94,6 +94,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}ftsystem.c.x" \xB6
"{ObjDir}fttype1.c.x" \xB6
"{ObjDir}ftwinfnt.c.x" \xB6
"{ObjDir}ftxf86.c.x" \xB6
"{ObjDir}ftcache.c.x" \xB6
"{ObjDir}bdf.c.x" \xB6
"{ObjDir}cff.c.x" \xB6
@ -174,6 +175,7 @@ FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\
"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
"{ObjDir}ftxf86.c.x" \xC4 :src:base:ftxf86.c
"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c

View File

@ -1,8 +1,8 @@
This folder contains
* Makefile skeletons for Apple MPW (Macintosh's Programmer's Workshop)
* Makefile skeltons for Apple MPW (Macintosh's Programmers Workshop)
* Python script to generate MPW makefile from skeleton
* Python script to generate MPW makefile from skelton
* Metrowerks CodeWarrior 9.0 project file in XML format
@ -46,15 +46,15 @@ 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.
Python is required to restore MPW makefiles from the
skeletons. Python bundled to Mac OS X is enough. For
skeltons. 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,
@ -78,10 +78,10 @@ environment by Metrowerks. GCC for MPW and Symantec
Detailed building procedure by Apple MPW is
described in following.
3-1-1. Generate MPW makefiles from the skeletons
3-1-1. Generate MPW makefiles from the skeltons
------------------------------------------------
Here are 4 skeletons for following targets are
Here are 4 skeltons for following targets are
included.
- FreeType.m68k_far.make.txt
@ -109,7 +109,7 @@ environment by Metrowerks. GCC for MPW and Symantec
MPW makefile syntax uses 8bit characters. To keep
from violating them during version control, here
we store skeletons in pure ASCII format. You must
we store skeltons in pure ASCII format. You must
generate MPW makefile by Python script ascii2mpw.py.
In Mac OS X terminal, you can convert as:
@ -118,10 +118,10 @@ environment by Metrowerks. GCC for MPW and Symantec
< builds/mac/FreeType.m68k_far.make.txt \
> FreeType.m68k_far.make
The skeletons are designed to use in the top
The skeltons are designed to use in the top
directory where there are builds, include, src etc.
You must name the generated MPW makefile by removing
".txt" from source skeleton name.
".txt" from source skelton name.
3-1-2. Add resource forks to related files
------------------------------------------
@ -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
-----------------------------
@ -392,10 +392,12 @@ ATSFontGetFileSpecification() | x | x | x | x |
ATS font manager is not published in these versions.
------------------------------------------------------------
Last update: 2013-Nov-03.
Last update: 2009-Jul-25.
Currently maintained by
suzuki toshiya, <mpsuzuki@hiroshima-u.ac.jp>
Originally prepared by
Leonard Rosenthol, <leonardr@lazerware.com>
Just van Rossum, <just@letterror.com>
This directory is now actively maintained as part of the FreeType Project.

View File

@ -1,36 +0,0 @@
<?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">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>freetype</string>
<key>CFBundleGetInfoString</key>
<string>FreeType ${PROJECT_VERSION}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FreeType</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>${PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${PROJECT_VERSION}</string>
</dict>
</plist>

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-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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
@ -170,7 +171,6 @@ typedef short ResourceIndex;
#define PREFER_LWFN 1
#endif
#ifdef FT_MACINTOSH
#if !HAVE_QUICKDRAW_CARBON /* QuickDraw is deprecated since Mac OS X 10.4 */
@ -183,7 +183,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
return FT_THROW( Unimplemented_Feature );
return FT_Err_Unimplemented_Feature;
}
#else
@ -203,9 +203,6 @@ typedef short ResourceIndex;
FMFontFamily family = 0;
if ( !fontName || !face_index )
return FT_THROW( Invalid_Argument );
*face_index = 0;
while ( status == 0 && !the_font )
{
@ -272,7 +269,7 @@ typedef short ResourceIndex;
return FT_Err_Ok;
}
else
return FT_THROW( Unknown_File_Format );
return FT_Err_Unknown_File_Format;
}
#endif /* HAVE_QUICKDRAW_CARBON */
@ -325,10 +322,10 @@ typedef short ResourceIndex;
CFRelease( cf_fontName );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
return FT_THROW( Unknown_File_Format );
return FT_Err_Unknown_File_Format;
if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )
return FT_THROW( Unknown_File_Format );
return FT_Err_Unknown_File_Format;
/* face_index calculation by searching preceding fontIDs */
/* with same FSRef */
@ -367,7 +364,7 @@ typedef short ResourceIndex;
FT_UNUSED( maxPathSize );
FT_UNUSED( face_index );
return FT_THROW( Unimplemented_Feature );
return FT_Err_Unimplemented_Feature;
}
#else
@ -383,11 +380,11 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( err )
if ( FT_Err_Ok != err )
return err;
if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
return FT_THROW( Unknown_File_Format );
return FT_Err_Unknown_File_Format;
return FT_Err_Ok;
}
@ -406,7 +403,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
return FT_THROW( Unimplemented_Feature );
return FT_Err_Unimplemented_Feature;
}
#else
@ -422,12 +419,12 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( err )
if ( FT_Err_Ok != err )
return err;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
pathSpec, NULL ) )
return FT_THROW( Unknown_File_Format );
return FT_Err_Unknown_File_Format;
return FT_Err_Ok;
}
@ -447,7 +444,7 @@ typedef short ResourceIndex;
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = NULL;
stream->base = 0;
}
@ -582,7 +579,7 @@ typedef short ResourceIndex;
if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
/* at present, no support for dfont format */
err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );
@ -600,7 +597,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
/* at present, no support for dfont format without FSRef */
/* (see above), try original resource-fork font */
@ -698,9 +695,11 @@ typedef short ResourceIndex;
count_faces_scalable( char* fond_data )
{
AsscEntry* assoc;
FamRec* fond;
short i, face, face_all;
fond = (FamRec*)fond_data;
face_all = EndianS16_BtoN( *( (short *)( fond_data +
sizeof ( FamRec ) ) ) ) + 1;
assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );
@ -779,10 +778,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 +797,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];
@ -848,17 +846,17 @@ typedef short ResourceIndex;
/* We should not extract parent directory by string manipulation. */
if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, &par_ref ) )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
/* now we have absolute dirname in path_lwfn */
if ( path_lwfn[0] == '/' )
@ -871,11 +869,11 @@ typedef short ResourceIndex;
path_lwfn[dirname_len + base_lwfn[0]] = '\0';
if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, NULL ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
return FT_Err_Ok;
@ -887,7 +885,7 @@ typedef short ResourceIndex;
/* pathname for FSSpec is always HFS format */
if ( ft_strlen( (char *)path_fond ) > path_size )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
ft_strcpy( (char *)path_lwfn, (char *)path_fond );
@ -896,7 +894,7 @@ typedef short ResourceIndex;
i--;
if ( i + 1 + base_lwfn[0] > path_size )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
if ( ':' == path_lwfn[i] )
{
@ -910,7 +908,7 @@ typedef short ResourceIndex;
}
if ( noErr != FT_FSPathMakeSpec( path_lwfn, &spec, FALSE ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
return FT_Err_Ok;
@ -939,8 +937,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;
}
@ -1004,14 +1002,14 @@ typedef short ResourceIndex;
/* detect integer overflows */
if ( total_size < old_total_size )
{
error = FT_ERR( Array_Too_Large );
error = FT_Err_Array_Too_Large;
goto Error;
}
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. */
@ -1089,7 +1087,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeRes( pathname, &res ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
pfb_data = NULL;
pfb_size = 0;
@ -1124,10 +1122,10 @@ typedef short ResourceIndex;
sfnt = GetResource( TTAG_sfnt, sfnt_id );
if ( sfnt == NULL )
return FT_THROW( Invalid_Handle );
return FT_Err_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;
@ -1183,26 +1181,23 @@ typedef short ResourceIndex;
FT_Long face_index,
FT_Face* aface )
{
FT_Error error = FT_ERR( Cannot_Open_Resource );
FT_Error error = FT_Err_Cannot_Open_Resource;
ResFileRefNum res_ref;
ResourceIndex res_index;
Handle fond;
short num_faces_in_res;
short num_faces_in_res, num_faces_in_fond;
if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
UseResFile( res_ref );
if ( ResError() )
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
num_faces_in_res = 0;
for ( res_index = 1; ; ++res_index )
{
short num_faces_in_fond;
fond = Get1IndResource( TTAG_FOND, res_index );
if ( ResError() )
break;
@ -1217,7 +1212,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;
}
@ -1241,12 +1236,9 @@ typedef short ResourceIndex;
FT_Error error = FT_Err_Ok;
/* test for valid `aface' and `library' delayed to */
/* `FT_New_Face_From_XXX' */
GetResInfo( fond, &fond_id, &fond_type, fond_name );
if ( ResError() != noErr || fond_type != TTAG_FOND )
return FT_THROW( Invalid_File_Format );
return FT_Err_Invalid_File_Format;
HLock( fond );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
@ -1279,7 +1271,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 +1307,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;
}
@ -1329,10 +1321,10 @@ typedef short ResourceIndex;
face_index,
aface );
else
error = FT_ERR( Unknown_File_Format );
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 +1355,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.); */
@ -1396,14 +1388,15 @@ typedef short ResourceIndex;
/* test for valid `library' and `aface' delayed to FT_Open_Face() */
if ( !pathname )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
error = FT_Err_Ok;
*aface = NULL;
/* 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 +1416,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,
@ -1438,7 +1431,7 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
return FT_THROW( Unimplemented_Feature );
return FT_Err_Unimplemented_Feature;
#else
@ -1448,17 +1441,15 @@ typedef short ResourceIndex;
UInt8 pathname[PATH_MAX];
/* test for valid `library' and `aface' delayed to `FT_Open_Face' */
if ( !ref )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
err = FSRefMakePath( ref, pathname, sizeof ( pathname ) );
if ( err )
error = FT_ERR( Cannot_Open_Resource );
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 +1472,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,
@ -1495,7 +1486,7 @@ typedef short ResourceIndex;
if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
else
return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
@ -1508,14 +1499,14 @@ typedef short ResourceIndex;
if ( !spec )
return FT_THROW( Invalid_Argument );
return FT_Err_Invalid_Argument;
err = FT_FSpMakePath( spec, pathname, sizeof ( pathname ) );
if ( err )
error = FT_ERR( Cannot_Open_Resource );
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 */
@ -1530,13 +1521,11 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
return FT_THROW( Unimplemented_Feature );
return FT_Err_Unimplemented_Feature;
#endif /* HAVE_FSREF, HAVE_FSSPEC */
}
#endif /* FT_MACINTOSH */
/* END */

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-2000, 2003, 2006, 2008 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -28,7 +28,7 @@ $(FTMODULE_H): $(MODULES_CFG)
$(FTMODULE_H_CREATE)
$(FTMODULE_H_DONE)
ifneq ($(findstring $(PLATFORM),dos windows os2),)
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
OPEN_MODULE := @echo$(space)
CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H))
REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H))
@ -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-2000, 2003, 2006 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-2000, 2003, 2005, 2006 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-2000, 2003, 2006 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-2000 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, 2009 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@ -18,55 +18,49 @@ PRJ_MMPFILES
freetype.mmp
PRJ_EXPORTS
../../include/freetype/ft2build.h
../../include/freetype/config/ftconfig.h config/ftconfig.h
../../include/freetype/config/ftheader.h config/ftheader.h
../../include/freetype/config/ftmodule.h config/ftmodule.h
../../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
../../include/freetype/ftfntfmt.h ftfntfmt.h
../../include/freetype/ftgasp.h ftgasp.h
../../include/freetype/ftglyph.h ftglyph.h
../../include/freetype/ftgxval.h ftgxval.h
../../include/freetype/ftgzip.h ftgzip.h
../../include/freetype/ftimage.h ftimage.h
../../include/freetype/ftincrem.h ftincrem.h
../../include/freetype/ftlcdfil.h ftlcdfil.h
../../include/freetype/ftlist.h ftlist.h
../../include/freetype/ftlzw.h ftlzw.h
../../include/freetype/ftmac.h ftmac.h
../../include/freetype/ftmm.h ftmm.h
../../include/freetype/ftmodapi.h ftmodapi.h
../../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
../../include/freetype/ftsnames.h ftsnames.h
../../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/ft2build.h
../../include/freetype/config/ftconfig.h freetype/config/ftconfig.h
../../include/freetype/config/ftheader.h freetype/config/ftheader.h
../../include/freetype/config/ftmodule.h freetype/config/ftmodule.h
../../include/freetype/config/ftoption.h freetype/config/ftoption.h
../../include/freetype/config/ftstdlib.h freetype/config/ftstdlib.h
../../include/freetype/freetype.h freetype/freetype.h
../../include/freetype/ftbbox.h freetype/ftbbox.h
../../include/freetype/ftbdf.h freetype/ftbdf.h
../../include/freetype/ftbitmap.h freetype/ftbitmap.h
../../include/freetype/ftcache.h freetype/ftcache.h
../../include/freetype/ftcid.h freetype/ftcid.h
../../include/freetype/fterrdef.h freetype/fterrdef.h
../../include/freetype/fterrors.h freetype/fterrors.h
../../include/freetype/ftgasp.h freetype/ftgasp.h
../../include/freetype/ftglyph.h freetype/ftglyph.h
../../include/freetype/ftgxval.h freetype/ftgxval.h
../../include/freetype/ftgzip.h freetype/ftgzip.h
../../include/freetype/ftbzip2.h freetype/ftbzip2.h
../../include/freetype/ftimage.h freetype/ftimage.h
../../include/freetype/ftincrem.h freetype/ftincrem.h
../../include/freetype/ftlcdfil.h freetype/ftlcdfil.h
../../include/freetype/ftlist.h freetype/ftlist.h
../../include/freetype/ftlzw.h freetype/ftlzw.h
../../include/freetype/ftmac.h freetype/ftmac.h
../../include/freetype/ftmm.h freetype/ftmm.h
../../include/freetype/ftmodapi.h freetype/ftmodapi.h
../../include/freetype/ftmoderr.h freetype/ftmoderr.h
../../include/freetype/ftotval.h freetype/ftotval.h
../../include/freetype/ftoutln.h freetype/ftoutln.h
../../include/freetype/ftpfr.h freetype/ftpfr.h
../../include/freetype/ftrender.h freetype/ftrender.h
../../include/freetype/ftsizes.h freetype/ftsizes.h
../../include/freetype/ftsnames.h freetype/ftsnames.h
../../include/freetype/ftstroke.h freetype/ftstroke.h
../../include/freetype/ftsynth.h freetype/ftsynth.h
../../include/freetype/ftsystem.h freetype/ftsystem.h
../../include/freetype/fttrigon.h freetype/fttrigon.h
../../include/freetype/fttypes.h freetype/fttypes.h
../../include/freetype/ftwinfnt.h freetype/ftwinfnt.h
../../include/freetype/ftxf86.h freetype/ftxf86.h
../../include/freetype/t1tables.h freetype/t1tables.h
../../include/freetype/ttnameid.h freetype/ttnameid.h
../../include/freetype/tttables.h freetype/tttables.h
../../include/freetype/tttags.h freetype/tttags.h
../../include/freetype/ttunpat.h freetype/ttunpat.h

View File

@ -2,7 +2,7 @@
// FreeType 2 makefile for the symbian platform
//
// Copyright (C) 2008-2022 by
// Copyright 2008, 2009 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used, modified,
@ -33,6 +33,7 @@ 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 +48,6 @@ sourcepath ..\..\src\bdf
source bdf.c
sourcepath ..\..\src\bzip2
source ftbzip2.c
sourcepath ..\..\src\cache
source ftcache.c
@ -67,6 +64,10 @@ sourcepath ..\..\src\gzip
source ftgzip.c
sourcepath ..\..\src\bzip2
source ftbzip2.c
sourcepath ..\..\src\lzw
source ftlzw.c
@ -124,12 +125,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-2000, 2001, 2003, 2006, 2008, 2009, 2010 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,28 +112,16 @@ 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
# 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
# GNU make. Similarly, `nul' is created if e.g. `make setup windows' has
# GNU make. Similarly, `nul' is created if e.g. `make setup win32' has
# been erroneously used.
#
# Note: This test is duplicated in `builds/unix/detect.mk'.
#
is_unix := $(strip $(wildcard /sbin/init) \
$(wildcard /usr/sbin/init) \
$(wildcard /dev/null) \
$(wildcard /hurd/auth))
ifneq ($(is_unix),)
@ -166,23 +153,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)
@ -198,47 +168,27 @@ modules:
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 := $(subst |,x,$(work))
work := $(subst $(space),|,$(work))
work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
work := $(word 2,$(work))
major := $(subst |,$(space),$(work))
major := $(firstword $(major))
work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
work := $(word 2,$(work))
minor := $(subst |,$(space),$(work))
minor := $(firstword $(minor))
work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
work := $(word 2,$(work))
patch := $(subst |,$(space),$(work))
patch := $(firstword $(patch))
# 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
# This target builds the tarballs.
#
# Not to be run by a normal user -- there are no attempts to make it
# generic.
# we check for `dist', not `distclean'
ifneq ($(findstring distx,$(MAKECMDGOALS)x),)
FT_H := include/freetype/freetype.h
major := $(shell sed -n 's/.*FREETYPE_MAJOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
minor := $(shell sed -n 's/.*FREETYPE_MINOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
patch := $(shell sed -n 's/.*FREETYPE_PATCH[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
version := $(major).$(minor).$(patch)
winversion := $(major)$(minor)$(patch)
endif
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 +199,29 @@ 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 -name .cvsignore \
-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) \
tar cfh - freetype-$(version) \
| gzip -9 -c > freetype-$(version).tar.gz
tar -H ustar -chf - freetype-$(version) \
| xz -c > freetype-$(version).tar.xz
tar cfh - freetype-$(version) \
| bzip2 -c > freetype-$(version).tar.bz2
@# Use CR/LF for zip files.
zip -lr9 ft$(winversion).zip freetype-$(version)
@ -283,10 +236,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 +253,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,8 +10,6 @@ configure.ac
freetype2.pc
freetype-config
ftconfig.h
ftoption.h
install-sh
libtool
ltmain.sh
unix-cc.mk

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

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2002, 2003, 2004, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -20,7 +20,6 @@ ifeq ($(PLATFORM),ansi)
#
is_unix := $(strip $(wildcard /sbin/init) \
$(wildcard /usr/sbin/init) \
$(wildcard /dev/null) \
$(wildcard /hurd/auth))
ifneq ($(is_unix),)
@ -40,10 +39,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 +49,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 +67,9 @@ ifeq ($(PLATFORM),unix)
# platform).
#
CONFIG_FILE := unix.mk
must_configure := 1
.PHONY: unix
unix: setup
@:
must_configure := 1
.PHONY: unix
endif
endif
@ -86,10 +79,9 @@ ifeq ($(PLATFORM),unix)
ifdef must_configure
ifneq ($(have_Makefile),)
# we are building FT2 not in the src tree
$(TOP_DIR)/builds/unix/configure $(value CFG)
$(TOP_DIR)/builds/unix/configure $(value CFG)
else
cd builds/unix; \
./configure $(value CFG)
cd builds/unix; ./configure $(value CFG)
endif
endif

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# Copyright (C) 2000-2022 by
# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -9,58 +9,14 @@
# indicate that you have read the license and understand and accept it
# fully.
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@
enable_shared=@build_libtool_libs@
wl=@wl@
hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
usage()
{
@ -81,19 +37,14 @@ Options:
--libtool display library name for linking with libtool
--cflags display flags for compiling with the FreeType
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 +72,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
@ -136,12 +87,6 @@ while test $# -gt 0 ; do
--libtool)
echo_libtool=yes
;;
--static)
show_static=yes
;;
--help)
usage 0
;;
*)
usage 1 1>&2
;;
@ -149,27 +94,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 +108,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 +131,30 @@ if test "$echo_ft_version" = "yes" ; then
fi
if test "$echo_cflags" = "yes" ; then
echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|"
cflags="-I${SYSROOT}$includedir/freetype2"
if test "${SYSROOT}$includedir" != "/usr/include" ; then
echo $cflags -I${SYSROOT}$includedir
else
echo $cflags
fi
fi
if test "$echo_libs" = "yes" ; then
if test "$show_static" = "yes" ; then
libs="$libs_L $static_libs"
else
libs="$libs_L $dynamic_libs"
rpath=
if test "$enable_shared" = "yes" ; then
eval "rpath=\"$hardcode_libdir_flag_spec\""
fi
libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@"
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

@ -1,14 +1,12 @@
prefix=%prefix%
exec_prefix=%exec_prefix%
libdir=%libdir%
includedir=%includedir%
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: FreeType 2
URL: https://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%
Cflags: -I${includedir}/freetype2
Version: @ft_version@
Requires:
Libs: -L${libdir} -lfreetype
Libs.private: @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@
Cflags: -I${includedir}/freetype2 -I${includedir}

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, 2003, 2007, 2009 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 3
# 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]),
[],
@ -61,7 +61,7 @@ AC_DEFUN([AC_CHECK_FT2],
fi
if test "x$FT2_CONFIG" = x ; then
AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no])
AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
fi
min_ft_version=m4_if([$1], [], [7.0.1], [$1])
@ -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, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

61
builds/unix/ft2unix.h Normal file
View File

@ -0,0 +1,61 @@
/***************************************************************************/
/* */
/* ft2build.h */
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2001, 2003, 2006 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 is a Unix-specific version of <ft2build.h> that should be used */
/* exclusively *after* installation of the library. */
/* */
/* It assumes that `/usr/local/include/freetype2' (or whatever is */
/* returned by the `freetype-config --cflags' or `pkg-config --cflags' */
/* command) is in your compilation include path. */
/* */
/* We don't need to do anything special in this release. However, for */
/* a future FreeType 2 release, the following installation changes will */
/* be performed: */
/* */
/* - The contents of `freetype-2.x/include/freetype' will be installed */
/* to `/usr/local/include/freetype2' instead of */
/* `/usr/local/include/freetype2/freetype'. */
/* */
/* - This file will #include <freetype2/config/ftheader.h>, instead */
/* of <freetype/config/ftheader.h>. */
/* */
/* - The contents of `ftheader.h' will be processed with `sed' to */
/* replace all `<freetype/xxx>' with `<freetype2/xxx>'. */
/* */
/* - Adding `/usr/local/include/freetype2' to your compilation include */
/* path will not be necessary anymore. */
/* */
/* These changes will be transparent to client applications which use */
/* freetype-config (or pkg-config). No modifications will be necessary */
/* to compile with the new scheme. */
/* */
/*************************************************************************/
#ifndef __FT2_BUILD_UNIX_H__
#define __FT2_BUILD_UNIX_H__
/* `<prefix>/include/freetype2' must be in your current inclusion path */
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */
/* END */

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 */

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

@ -0,0 +1,497 @@
/***************************************************************************/
/* */
/* ftconfig.in */
/* */
/* UNIX-specific configuration file (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 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 `freetype/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 */
/* `freetype/builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
#undef HAVE_UNISTD_H
#undef HAVE_FCNTL_H
#undef HAVE_STDINT_H
#undef HAVE_LIBGEN_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 */
/* does 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 */
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
/* 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( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */
#include "AvailabilityMacros.h"
#if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
#define DARWIN_NO_CARBON 1
#else
#define FT_MACINTOSH 1
#endif
#elif defined( __SC__ ) || defined( __MRC__ )
/* Classic MacOS compilers */
#include "ConditionalMacros.h"
#if TARGET_OS_MAC
#define FT_MACINTOSH 1
#endif
#endif
/*************************************************************************/
/* */
/* Pathname separator used by resource-fork accessor & ft_basename() */
/* */
#ifdef PLATFORM_DIR_SEPARATOR
/* explicitly defined, do nothing */
#elif defined( __DOS__ ) || defined( __OS2__ ) || defined( _WIN32 ) || \
defined( __SYMBIAN32__ )
#define PLATFORM_DIR_SEPARATOR "\\"
#elif defined( FT_MACINTOSH ) && !defined( __MACH__ )
#define PLATFORM_DIR_SEPARATOR ":"
#elif defined( __riscos__ ) || defined( VMS )
#define PLATFORM_DIR_SEPARATOR "."
#else
#define PLATFORM_DIR_SEPARATOR "/"
#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
/*************************************************************************/
/* */
/* IntN types */
/* */
/* Used to guarantee the size of some specific integers. */
/* */
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
#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
#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
#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
#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
#elif defined( __GNUC__ )
/* GCC provides the `long long' type */
#define FT_LONG64
#define FT_INT64 long long int
#endif /* FT_SIZEOF_LONG == 8 */
/*************************************************************************/
/* */
/* A 64-bit data type will create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
/* is defined. You can however ignore this rule by defining the */
/* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
#ifdef __STDC__
/* Undefine the 64-bit macros in strict ANSI compilation mode. */
/* Since `#undef' doesn't survive in configuration header files */
/* we use the postprocessing facility of AC_CONFIG_HEADERS to */
/* replace the leading `/' with `#'. */
/undef FT_LONG64
/undef FT_INT64
#endif /* __STDC__ */
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
/* Provide assembler fragments for performance-critical functions. */
/* These must be defined `static __inline__' with GCC. */
#ifdef __GNUC__
#if defined( __arm__ ) && !defined( __thumb__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm__ __volatile__ (
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
"adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) );
return a;
}
#endif /* __arm__ && !__thumb__ */
#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
static __inline__ FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm__ __volatile__ (
"imul %%edx\n"
"movl %%edx, %%ecx\n"
"sarl $31, %%ecx\n"
"addl $0x8000, %%ecx\n"
"addl %%ecx, %%eax\n"
"adcl $0, %%edx\n"
"shrl $16, %%eax\n"
"shll $16, %%edx\n"
"addl %%edx, %%eax\n"
: "=a"(result), "+d"(b)
: "a"(a)
: "%ecx" );
return result;
}
#endif /* i386 */
#endif /* __GNUC__ */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER
#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
#endif
#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 */
#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-2001, 2002, 2004, 2005, 2006, 2007, 2008 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;
}
@ -252,7 +235,7 @@
if ( !stream )
return FT_THROW( Invalid_Stream_Handle );
return FT_Err_Invalid_Stream_Handle;
/* open the file */
file = open( filepathname, O_RDONLY );
@ -260,7 +243,7 @@
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Cannot_Open_Resource;
}
/* Here we ensure that a "fork" will _not_ duplicate */
@ -285,9 +268,9 @@
/* XXX: TODO -- real 64bit platform support */
/* */
/* `stream->size' is typedef'd to unsigned long (in `ftsystem.h'); */
/* `stat_buf.st_size', however, is usually typedef'd to off_t */
/* (in sys/stat.h). */
/* `stream->size' is typedef'd to unsigned long (in */
/* freetype/ftsystem.h); `stat_buf.st_size', however, is usually */
/* typedef'd to off_t (in sys/stat.h). */
/* On some platforms, the former is 32bit and the latter is 64bit. */
/* To avoid overflow caused by fonts in huge files larger than */
/* 2GB, do a test. Temporary fix proposed by Sean McBride. */
@ -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 )
{
@ -333,8 +317,7 @@
}
total_read_count = 0;
do
{
do {
ssize_t read_count;
@ -364,16 +347,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 );
@ -382,7 +365,7 @@
stream->size = 0;
stream->pos = 0;
return FT_THROW( Cannot_Open_Stream );
return FT_Err_Cannot_Open_Stream;
}
@ -408,7 +391,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;

519
builds/unix/install-sh Normal file
View File

@ -0,0 +1,519 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-12-25.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -3,7 +3,7 @@
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2002, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -24,26 +24,16 @@
# Unix installation and deinstallation targets.
#
# Note that we remove any data found in `$(includedir)/freetype2' before
# installing new files to avoid interferences with files installed by
# previous FreeType versions (which use slightly different locations).
#
# 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.
# Note that we no longer install internal headers, and we remove any
# `internal' subdirectory found in `$(includedir)/freetype2/freetype'.
#
install: $(PROJECT_LIBRARY)
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
$(DESTDIR)$(includedir)/freetype2/freetype/cache \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/aclocal
ifeq ($(INSTALL_FT2_CONFIG),TRUE)
$(MKINSTALLDIRS) $(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir)/man1
endif
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
@ -54,37 +44,39 @@ endif
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
$(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
$(DESTDIR)$(includedir)/freetype2/ft2build.h
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/cache/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/cache
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/internal/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/internal
$(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \
$(DESTDIR)$(includedir)/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 \
$(DESTDIR)$(mandir)/man1/freetype-config.1
endif
$(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
uninstall:
-$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
-$(DELETE) $(DESTDIR)$(bindir)/freetype-config
-$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
-$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
-$(DELETE) $(DESTDIR)$(mandir)/man1/freetype-config.1
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 +84,14 @@ 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)
-$(DELETE) $(OBJ_DIR)/.libs/*
-$(DELDIR) $(OBJ_DIR)/.libs
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# EOF

161
builds/unix/mkinstalldirs Executable file
View File

@ -0,0 +1,161 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2006-05-11.19
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,199 +0,0 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# 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
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR

View File

@ -2,7 +2,7 @@
# FreeType 2 template for Unix-specific compiler definitions
#
# Copyright (C) 1996-2022 by
# Copyright 1996-2000, 2002, 2003, 2005, 2006 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@
# -export-symbols $(EXPORTS_LIST)
# EOF

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