未验证 提交 a70d7f5f 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #949 from enkiller/gui_updata_ftt_library

[gui]Update freetype library to version 2.6.2

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
# CMakeLists.txt
#
# Copyright 2013-2015 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.
#
#
# As a preliminary, create a compilation directory and change into it, for
# example
#
# mkdir ~/freetype2.compiled
# cd ~/freetype2.compiled
#
# Now you can say
#
# cmake <path-to-freetype2-src-dir>
#
# to create a Makefile that builds a static version of the library.
#
# For a dynamic library, use
#
# cmake <path-to-freetype2-src-dir> -D BUILD_SHARED_LIBS:BOOL=true
#
# For a framework on OS X, use
#
# cmake <path-to-freetype2-src-dir> -D BUILD_FRAMEWORK:BOOL=true -G Xcode
#
# instead.
#
# For an iOS static library, use
#
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=OS -G Xcode
#
# or
#
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=SIMULATOR -G Xcode
#
# 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.
#
# . If you want to disable the automatic generation of the distribution
# targets, add the `-D FREETYPE_NO_DIST=true' command line argument.
#
# . Set the `WITH_ZLIB', `WITH_BZip2', `WITH_PNG', and `WITH_HarfBuzz'
# CMake variables to `ON' or `OFF' to force or skip using a dependency.
# Leave a variable undefined (which is the default) to use the dependency
# only if it is available. Example:
#
# cmake ... -DWITH_ZLIB=ON -DWITH_HarfBuzz=OFF ...
cmake_minimum_required(VERSION 2.6)
include(CheckIncludeFile)
# 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")
message(FATAL_ERROR
"IOS_PLATFORM must be set to either OS or SIMULATOR")
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
${PROJECT_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)
if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
endif ()
# Disallow in-source builds
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
message(FATAL_ERROR
"
In-source builds are not permitted! Make a separate folder for"
" building, e.g.,"
"
mkdir build; cd build; cmake .."
"
Before that, remove the files created by this failed run with"
"
rm -rf CMakeCache.txt CMakeFiles")
endif ()
# Add local cmake modules
set(CMAKE_MODULE_PATH ${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_32_64_BIT)")
set(BUILD_SHARED_LIBS ON)
endif ()
set(VERSION_MAJOR "2")
set(VERSION_MINOR "6")
set(VERSION_PATCH "2")
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
# Compiler definitions for building the library
add_definitions(-DFT2_BUILD_LIBRARY)
# Find dependencies
foreach (d ZLIB BZip2 PNG HarfBuzz)
string(TOUPPER "${d}" D)
if (DEFINED WITH_${d} OR DEFINED WITH_${D})
if (WITH_${d} OR WITH_${D})
find_package(${d} QUIET REQUIRED)
endif ()
else ()
find_package(${d} QUIET)
endif ()
if (${d}_FOUND OR ${D}_FOUND)
message(STATUS "Building with ${d}")
endif()
endforeach ()
message(STATUS
"Creating directory ${PROJECT_BINARY_DIR}/include/freetype/config")
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
# Create the configuration file
message(STATUS
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
if (UNIX)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("stdint.h" HAVE_STDINT_H)
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
FTCONFIG_H)
if (HAVE_UNISTD_H)
string(REGEX REPLACE
"#undef +(HAVE_UNISTD_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_FCNTL_H)
string(REGEX REPLACE
"#undef +(HAVE_FCNTL_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
if (HAVE_STDINT_H)
string(REGEX REPLACE
"#undef +(HAVE_STDINT_H)" "#define \\1"
FTCONFIG_H "${FTCONFIG_H}")
endif ()
string(REPLACE "/undef " "#undef "
FTCONFIG_H "${FTCONFIG_H}")
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
"${FTCONFIG_H}")
else ()
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
FTCONFIG_H)
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
"${FTCONFIG_H}")
endif ()
# Create the options file
message(STATUS
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
FTOPTION_H)
if (ZLIB_FOUND)
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 ()
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h"
"${FTOPTION_H}")
# Specify library include directories
include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
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/ftfntfmt.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
src/base/ftlcdfil.c
src/base/ftmm.c
src/base/ftotval.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftstroke.c
src/base/ftsynth.c
src/base/ftsystem.c
src/base/fttype1.c
src/base/ftwinfnt.c
src/bdf/bdf.c
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/sfnt/sfnt.c
src/smooth/smooth.c
src/truetype/truetype.c
src/type1/type1.c
src/type42/type42.c
src/winfonts/winfnt.c
)
if (WIN32)
set(BASE_SRCS ${BASE_SRCS} builds/windows/ftdebug.c)
elseif (WINCE)
set(BASE_SRCS ${BASE_SRCS} builds/wince/ftdebug.c)
else ()
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
endif ()
if (BUILD_FRAMEWORK)
set(BASE_SRCS
${BASE_SRCS}
builds/mac/freetype-Info.plist
)
endif ()
set(CMAKE_DEBUG_POSTFIX d)
add_library(freetype
${PUBLIC_HEADERS}
${PUBLIC_CONFIG_HEADERS}
${PRIVATE_HEADERS}
${BASE_SRCS}
)
if (BUILD_SHARED_LIBS)
set_target_properties(freetype PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${SHARED_LIBRARY_VERSION}
COMPILE_DEFINITIONS freetype_EXPORTS
)
endif ()
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 builds/mac/freetype-Info.plist
PUBLIC_HEADER "${PUBLIC_HEADERS}"
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
)
endif ()
if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
target_include_directories(freetype
PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
endif ()
if (CMAKE_VERSION VERSION_LESS 2.8.12)
set(MAYBE_PRIVATE "")
else ()
set(MAYBE_PRIVATE "PRIVATE")
endif ()
if (ZLIB_FOUND)
target_link_libraries(freetype ${MAYBE_PRIVATE} ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
endif ()
if (BZIP2_FOUND)
target_link_libraries(freetype ${MAYBE_PRIVATE} ${BZIP2_LIBRARIES})
include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
endif ()
if (PNG_FOUND)
add_definitions(${PNG_DEFINITIONS})
target_link_libraries(freetype ${MAYBE_PRIVATE} ${PNG_LIBRARIES})
include_directories(${PNG_INCLUDE_DIRS})
endif ()
if (HARFBUZZ_FOUND)
target_link_libraries(freetype ${MAYBE_PRIVATE} ${HARFBUZZ_LIBRARIES})
include_directories(${HARFBUZZ_INCLUDE_DIRS})
endif ()
# Installations
# Note the trailing slash in the argument to the `DIRECTORY' directive
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include/freetype2
PATTERN "internal" EXCLUDE
PATTERN "ftconfig.h" EXCLUDE
PATTERN "ftoption.h" EXCLUDE
)
install(FILES
${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
DESTINATION include/freetype2/freetype/config
)
install(TARGETS freetype
EXPORT freetype-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION Library/Frameworks
)
install(EXPORT freetype-targets
DESTINATION lib/cmake/freetype
FILE freetype-config.cmake
)
# Packaging
# CPack version numbers for release tarball name.
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
endif ()
if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
CACHE INTERNAL "tarball basename"
)
endif ()
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
set(CPACK_GENERATOR TGZ)
include(CPack)
# Add `make dist' target if FREETYPE_DIST is set (which is the default)
if (NOT DEFINED FREETYPE_NO_DIST)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
endif ()
# eof
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
# FreeType 2 top Jamfile.
#
# Copyright 2001-2015 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
# files.
#
# We can compile FreeType 2 with classic Jam however thanks to
# the following code
#
if ! $(JAM_TOOLSET)
{
rule HDRMACRO
{
# nothing
}
}
# We need to invoke a SubDir rule if the FT2 source directory top is not the
# current directory. This allows us to build FreeType 2 as part of a larger
# project easily.
#
if $(FT2_TOP) != $(DOT)
{
SubDir FT2_TOP ;
}
# The following macros define the include directory, the source directory,
# and the final library name (without library extensions). They can be
# replaced by other definitions when the library is compiled as part of
# a larger project.
#
# Name of FreeType include directory during compilation.
# This is relative to FT2_TOP.
#
FT2_INCLUDE_DIR ?= include ;
# Name of FreeType source directory during compilation.
# This is relative to FT2_TOP.
#
FT2_SRC_DIR ?= src ;
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
# the location of a custom <ft2build.h> which will point to custom
# versions of `ftmodule.h' and `ftoption.h', for example.
#
FT2_BUILD_INCLUDE ?= ;
# The list of modules to compile on any given build of the library.
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
#
# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= autofit # auto-fitter
base # base component (public APIs)
bdf # BDF font driver
bzip2 # support for bzip2-compressed PCF font
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
gzip # support for gzip-compressed PCF font
lzw # support for LZW-compressed PCF font
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
pshinter # PostScript hinter module
psnames # PostScript names handling
raster # monochrome rasterizer
sfnt # SFNT-based format support routines
smooth # anti-aliased rasterizer
truetype # TrueType font driver
type1 # PostScript Type 1 font driver
type42 # PostScript Type 42 (embedded TrueType) driver
winfonts # Windows FON/FNT font driver
;
# Don't touch.
#
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
# Location of API Reference Documentation
#
if $(DOC_DIR)
{
DOC_DIR = $(DOCDIR:T) ;
}
else
{
DOC_DIR = docs/reference ;
}
# Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
CCFLAGS += -DDEBUG_HINTER ;
}
# We need `include' in the current include path in order to
# compile any part of FreeType 2.
#
HDRS += $(FT2_INCLUDE) ;
# We need to #define FT2_BUILD_LIBRARY so that our sources find the
# internal headers
#
CCFLAGS += -DFT2_BUILD_LIBRARY ;
# Uncomment the following line if you want to build individual source files
# for each FreeType 2 module. This is only useful during development, and
# is better defined as an environment variable anyway!
#
# FT2_MULTI = true ;
# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
# macros that are later used in #include statements. They need to be parsed
# in order to record these definitions.
#
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
# Now include the Jamfile in `freetype2/src', used to drive the compilation
# of each FreeType 2 component and/or module.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
# Handle the generation of the `ftexport.sym' file, which contains the list
# of exported symbols. This can be used on Unix by libtool.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
rule GenExportSymbols
{
local apinames = apinames$(SUFEXE) ;
local 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 include/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.6.2
--output=$(DOC_DIR)
$(FT2_INCLUDE)/freetype/*.h
$(FT2_INCLUDE)/freetype/config/*.h
}
RefDoc refdoc ;
# end of top Jamfile
# FreeType 2 JamRules.
#
# Copyright 2001-2015 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
#
# FreeType 2 build system -- top-level Makefile
#
# Copyright 1996-2015 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.
# Project names
#
PROJECT := freetype
PROJECT_TITLE := FreeType
# The variable TOP_DIR holds the path to the topmost directory in the project
# engine source hierarchy. If it is not defined, default it to `.'.
#
TOP_DIR ?= .
# The variable OBJ_DIR gives the location where object files and the
# FreeType library are built.
#
OBJ_DIR ?= $(TOP_DIR)/objs
include $(TOP_DIR)/builds/toplevel.mk
# EOF
FreeType 2.6.2
==============
Homepage: http://www.freetype.org
FreeType is a freely available software library to render fonts.
It is written in C, designed to be small, efficient, highly
customizable, and portable while capable of producing high-quality
output (glyph images) of most vector and bitmap font formats.
Please read the docs/CHANGES file, it contains IMPORTANT
INFORMATION.
Read the files `docs/INSTALL*' for installation instructions; see
the file `docs/LICENSE.TXT' for the available licenses.
The FreeType 2 API reference is located in `docs/reference'; use the
file `ft2-toc.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
http://download.savannah.gnu.org/releases/freetype/
and download one of the following files.
freetype-doc-2.6.2.tar.bz2
freetype-doc-2.6.2.tar.gz
ftdoc262.zip
To view the documentation online, go to
http://www.freetype.org/freetype2/documentation.html
Mailing Lists
=============
The preferred way of communication with the FreeType team is using
e-mail lists.
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
The lists are moderated; see
http://www.freetype.org/contact.html
how to subscribe.
Bugs
====
Please submit bug reports at
https://savannah.nongnu.org/bugs/?group=freetype
Alternatively, you might report bugs by e-mail to
`freetype-devel@nongnu.org'. Don't forget to send a detailed
explanation of the problem -- there is nothing worse than receiving
a terse message that only says `it doesn't work'.
Enjoy!
The FreeType Team
----------------------------------------------------------------------
Copyright 2006-2015 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.
--- end of README ---
The git archive doesn't contain pre-built configuration scripts for
UNIXish platforms. To generate them say
sh autogen.sh
which in turn depends on the following packages:
automake (1.10.1)
libtool (2.2.4)
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.
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).
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 which have GNU make (or makepp).
Similarly, a build with `cmake' can be done directly from the git
repository.
----------------------------------------------------------------------
Copyright 2005-2015 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.
--- end of README.git ---
# RT-Thread building script for bridge
import os
from building import *
cwd = GetCurrentDir()
src = Split('''
''')
list = os.listdir(cwd)
GroupPath = cwd
CPPDEFINES = ['FT2_BUILD_LIBRARY']
group = DefineGroup('freetype', src, depend = ['RTGUI_USING_TTF'], CPPDEFINES=CPPDEFINES, GroupPath = GroupPath)
if GetDepend('RTGUI_USING_TTF'):
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))
Return('group')
#!/bin/sh
# Copyright 2005-2015 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.
run ()
{
echo "running \`$*'"
eval $*
if test $? != 0 ; then
echo "error while running \`$*'"
exit 1
fi
}
get_major_version ()
{
echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
}
get_minor_version ()
{
echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
}
get_patch_version ()
{
# tricky: some version numbers don't include a patch
# separated with a point, but something like 1.4-p6
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
if test "$patch" = "$1"; then
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
# if there isn't any patch number, default to 0
if test "$patch" = "$1"; then
patch=0
fi
fi
echo $patch
}
# $1: version to check
# $2: minimum version
compare_to_minimum_version ()
{
MAJOR1=`get_major_version $1`
MAJOR2=`get_major_version $2`
if test $MAJOR1 -lt $MAJOR2; then
echo 0
return
else
if test $MAJOR1 -gt $MAJOR2; then
echo 1
return
fi
fi
MINOR1=`get_minor_version $1`
MINOR2=`get_minor_version $2`
if test $MINOR1 -lt $MINOR2; then
echo 0
return
else
if test $MINOR1 -gt $MINOR2; then
echo 1
return
fi
fi
PATCH1=`get_patch_version $1`
PATCH2=`get_patch_version $2`
if test $PATCH1 -lt $PATCH2; then
echo 0
else
echo 1
fi
}
# check the version of a given tool against a minimum version number
#
# $1: tool path
# $2: tool usual name (e.g. `aclocal')
# $3: tool variable (e.g. `ACLOCAL')
# $4: minimum version to check against
# $5: option field index used to extract the tool version from the
# output of --version
check_tool_version ()
{
field=$5
# assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
if test "$field"x = x; then
field=3 # default to 3 for all GNU autotools, after filtering enclosed string
fi
version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
version_check=`compare_to_minimum_version $version $4`
if test "$version_check"x = 0x; then
echo "ERROR: Your version of the \`$2' tool is too old."
echo " Minimum version $4 is required (yours is version $version)."
echo " Please upgrade or use the $3 variable to point to a more recent one."
echo ""
exit 1
fi
}
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
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=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
if test "$ACLOCAL"x = x; then
ACLOCAL=aclocal
fi
if test "$AUTOCONF"x = x; then
AUTOCONF=autoconf
fi
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_major, freetype_minor, and freetype_patch.
eval `sed -nf version.sed include/freetype/freetype.h`
# We set freetype-patch to an empty value if it is zero.
if test "$freetype_patch" = ".0"; then
freetype_patch=
fi
cd builds/unix
echo "generating \`configure.ac'"
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 install-sh
cd ../..
chmod +x ./configure
# EOF
# RT-Thread building script for bridge
import os
from building import *
cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')
README for the builds/amiga subdirectory.
Copyright 2005-2015 by
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.
The makefile.os4 is for the AmigaOS4 SDK. To use it, type
"make -f makefile.os4", it produces a link library libft2_ppc.a.
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted on
68k-Amiga producing MorphOS-PPC-binaries from http://www.morphos.de).
To use it, type "make assign", then "make"; it produces a link library
libft2_ppc.a.
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
latest sold version was 6.50, updates can be found in Aminet). It is
based on the version found in the sourcecode of ttf.library 0.83b for
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 (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
directory. The results are:
- A link library "ft2_680x0.lib" (where x depends on the setting of
the CPU entry in the smakefile) containing all FreeType2 parts
except of the init code, debugging code, and the system interface
code.
- ftsystem.o, an object module containing the standard version of the
system interface code which uses fopen() fclose() fread() fseek()
ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
- ftsystempure.o, an object module containing the pure version of the
system interface code which uses Open() Close() Read() Seek()
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
be used in both normal programs and in Amiga run-time shared system
librarys (can be linked with lib:libinit.o, no copying of DATA and
BSS hunks for each OpenLibrary() necessary). Source code is in
src/base/ftsystem.c.
- ftdebug.o, an object module containing the standard version of the
debugging code which uses vprintf() and exit() (not pure).
Debugging can be turned on in FT:include/freetype/config/ftoption.h
and with FT_SetTraceLevel().
- ftdebugpure.o, an object module containing the pure version of the
debugging code which uses KVPrintf() from lib:debug.lib and no
exit(). For debugging of Amiga run-time shared system libraries.
Source code is in src/base/ftdebug.c.
- NO ftinit.o. Because linking with a link library should result in
linking only the needed object modules in it, but standard
ftsystem.o would force ALL FreeType2 modules to be linked to your
program, I decided to use a different scheme: You must #include
FT:src/base/ftinit.c in your sourcecode and specify with #define
statements which modules you need. See
include/freetype/config/ftmodule.h.
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.
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
calling the FreeType2 functions, because the link library and the
object files are compiled with PARAMETERS=BOTH.
- "smake assign" (assign "FT:" to the FreeType2 main directory).
- Compile your program.
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
ft2_680x0.lib as link library.
To adapt to other compilers:
- The standard ANSI C maximum length of 31 significant characters in
identifiers is not enough for FreeType2. Check if your compiler has
a minimum length of 40 significant characters or can be switched to
it. "idlen=40" is the option for SAS/C. Setting #define
HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
- Make sure that the include directory in builds/amiga is searched
before the normal FreeType2 include directory, so you are able to
replace problematic include files with your own version (same may be
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
then includes the standard FreeType2 include file.
Local Variables:
coding: latin-1
End:
/***************************************************************************/
/* */
/* ftconfig.h */
/* */
/* Amiga-specific configuration file (specification only). */
/* */
/* Copyright 2005-2015 by */
/* Werner Lemberg and Detlef Wrkner. */
/* */
/* 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 an example how to override the default FreeType2 header files
* with Amiga-specific changes. When the compiler searches this directory
* before the default directory, we can do some modifications.
*
* Here we must change FT_EXPORT_DEF so that SAS/C does
* generate the needed XDEFs.
*/
#if 0
#define FT_EXPORT_DEF( x ) extern x
#endif
#undef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) x
/* Now include the original file */
#ifndef __MORPHOS__
#ifdef __SASC
#include "FT:include/freetype/config/ftconfig.h"
#else
#include "/FT/include/freetype/config/ftconfig.h"
#endif
#else
/* We must define that, it seems that
* lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
* ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
* binaries from http://www.morphos.de)
*/
#define _LIBC_LIMITS_H_
#include "/FT/include/freetype/config/ftconfig.h"
#endif
/*
Local Variables:
coding: latin-1
End:
*/
#
# FreeType 2 configuration rules for a `normal' ANSI system
#
# Copyright 1996-2015 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.
DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := lib$(PROJECT)
# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := -I
# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := -D
# The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
#
L := -l
# Target flag.
#
T := -o$(space)
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# 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 :=
# EOF
#
# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system
#
# Copyright 1996-2015 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 $(TOP_DIR)/builds/ansi/ansi-def.mk
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF
#
# FreeType 2 configuration rules for a BeOS system
#
# Copyright 1996-2015 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 $(TOP_DIR)/builds/beos/beos-def.mk
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF
#
# FreeType 2 configuration rules for the EMX gcc compiler
#
# Copyright 2003-2015 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 $(TOP_DIR)/builds/dos/dos-def.mk
include $(TOP_DIR)/builds/compiler/emx.mk
include $(TOP_DIR)/builds/link_dos.mk
# EOF
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册