提交 d0540f0d 编写于 作者: G Grissiom

external: update freetype to 2.5.4

上级 df128a04
# CMakeLists.txt
#
# Copyright 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# Written 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.
#
#
# Say
#
# cmake CMakeLists.txt
#
# to create a Makefile that builds a static version of the library.
#
# For a dynamic library, use
#
# cmake CMakeLists.txt -DBUILD_SHARED_LIBS:BOOL=true
#
# For a framework on OS X, use
#
# cmake CMakeLists.txt -DBUILD_FRAMEWORK:BOOL=true -G Xcode
#
# instead.
#
# For an iOS static library, use
#
# cmake CMakeLists.txt -DIOS_PLATFORM=OS -G Xcode
#
# or
#
# cmake CMakeLists.txt -DIOS_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' will overwrite FreeType's original (top-level) `Makefile' file.
#
# . You can use `cmake' directly on a freshly cloned FreeType git
# repository.
#
# . `CMakeLists.txt' is provided as-is since it is not used by the
# developer team.
cmake_minimum_required(VERSION 2.6)
# 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 (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 "5")
set(VERSION_PATCH "4")
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
# Compiler definitions for building the library
add_definitions(-DFT2_BUILD_LIBRARY)
# Specify library include directories
include_directories("${PROJECT_SOURCE_DIR}/include")
# Create the configuration file
message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include/freetype2.")
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/freetype2)
# For the auto-generated ftconfig.h file
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include/freetype2")
message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h.")
execute_process(
COMMAND sed -e "s/FT_CONFIG_OPTIONS_H/<ftoption.h>/" -e "s/FT_CONFIG_STANDARD_LIBRARY_H/<ftstdlib.h>/" -e "s?/undef ?#undef ?"
INPUT_FILE ${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in
OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h
)
file(GLOB PUBLIC_HEADERS "include/*.h")
file(GLOB PUBLIC_CONFIG_HEADERS "include/config/*.h")
file(GLOB PRIVATE_HEADERS "include/internal/*.h")
set(BASE_SRCS
src/autofit/autofit.c
src/base/ftadvanc.c
src/base/ftbbox.c
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcalc.c
src/base/ftcid.c
src/base/ftdbgmem.c
src/base/ftdebug.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftgloadr.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
src/base/ftlcdfil.c
src/base/ftmm.c
src/base/ftobjs.c
src/base/ftotval.c
src/base/ftoutln.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftrfork.c
src/base/ftsnames.c
src/base/ftstream.c
src/base/ftstroke.c
src/base/ftsynth.c
src/base/ftsystem.c
src/base/fttrigon.c
src/base/fttype1.c
src/base/ftutil.c
src/base/ftwinfnt.c
src/base/ftxf86.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/psmodule.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
)
include_directories("src/truetype")
include_directories("src/sfnt")
include_directories("src/autofit")
include_directories("src/smooth")
include_directories("src/raster")
include_directories("src/psaux")
include_directories("src/psnames")
if (BUILD_FRAMEWORK)
set(BASE_SRCS
${BASE_SRCS}
builds/mac/freetype-Info.plist
)
endif ()
add_library(freetype
${PUBLIC_HEADERS}
${PUBLIC_CONFIG_HEADERS}
${PRIVATE_HEADERS}
${BASE_SRCS}
)
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 ()
# Installations
# Note the trailing slash in the argument to the `DIRECTORY' directive
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include/freetype2
PATTERN "internal" EXCLUDE
)
install(TARGETS freetype
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
FRAMEWORK DESTINATION Library/Frameworks
)
# 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
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
# eof
......@@ -6260,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 (FT_PropertyType): New enumeration.
* include/freetype/ftbdf.h (BDF_PropertyType): New enumeration.
(BDF_Property, BDF_PropertyRec): New structure.
FT_Get_BDF_Property): New function.
* include/freetype/internal/bdftypes.h: Include FT_BDF_H.
......
此差异已折叠。
此差异已折叠。
# FreeType 2 top Jamfile.
#
# Copyright 2001, 2002, 2003, 2004, 2005, 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.
# 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
gzip # support for gzip-compressed files
lzw # support for LZW-compressed files
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
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.3.12 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
}
RefDoc refdoc ;
# end of top Jamfile
# FreeType 2 top Jamfile.
#
# Copyright 2001-2014 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 <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 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.5.4 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
}
RefDoc refdoc ;
# end of top Jamfile
Special notes to Unix users
===========================
FreeType 2.5.4
==============
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.
Homepage: http://www.freetype.org
FreeType 2's library is called `libfreetype', FreeType 1's library
is called `libttf'. They are *not* compatible!
FreeType is a freely available software library to render fonts.
FreeType 2.3.12
===============
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.
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-doc.html' as the top entry point. Additional
file `ft2-toc.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
......@@ -26,23 +24,44 @@
and download one of the following files.
freetype-doc-2.3.12.tar.bz2
freetype-doc-2.3.12.tar.gz
ftdoc2312.zip
freetype-doc-2.5.4.tar.bz2
freetype-doc-2.5.4.tar.gz
ftdoc254.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
The lists are moderated; see
http://www.freetype.org/contact.html
how to subscribe.
Bugs
====
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'.
Alternatively, you may submit a bug report at
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!
......@@ -51,7 +70,7 @@
----------------------------------------------------------------------
Copyright 2006, 2007, 2008, 2009, 2010 by
Copyright 2006-2014 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
......
......@@ -31,9 +31,13 @@ configure script is necessary at all; saying
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, 2006, 2007, 2008, 2009 by
Copyright 2005-2010, 2013 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
......@@ -43,4 +47,4 @@ this file you indicate that you have read the license and understand
and accept it fully.
--- end of README.CVS ---
--- end of README.git ---
import os
Import('RTT_ROOT')
from building import *
def _ft_get_src_path(fn):
# from docs/INSTALL.ANY
ft_base_src = set([
# use the ftsystem ourown
#'ftsystem.c'
'ftinit.c',
'ftdebug.c',
'ftbase.c',
'ftbbox.c',
'ftglyph.c',
'ftbdf.c',
'ftbitmap.c',
'ftcid.c',
'ftfstype.c',
'ftgasp.c',
'ftgxval.c',
'ftlcdfil.c',
'ftmm.c',
'ftotval.c',
'ftpatent.c',
'ftpfr.c',
'ftstroke.c',
'ftsynth.c',
'fttype1.c',
'ftwinfnt.c',
'ftxf86.c',
'ftmac.c',
])
ft_s_fn = {
'type1cid.c' : 'src/cid/',
'winfnt.c' : 'src/winfonts/',
'ftcache.c' : 'src/cache/',
'ftgzip.c' : 'src/gzip/',
'ftlzw.c' : 'src/lzw/',
'ftbz2.c' : 'src/bz2/',
'ftsystem.c' : 'builds/rt-thread/',
'gb2312tounicode.c' : 'builds/rt-thread/',
}
# Always keep the path seperator in unix format.
if fn in ft_base_src:
return 'src/base/' + fn
# Handle special files
elif fn in ft_s_fn:
return ft_s_fn[fn] + fn
else:
# str.lstrip is not technically right here, but it just work(tm).
return 'src/' + fn.rstrip('.c') + '/' + fn
# from docs/INSTALL.ANY
ft_deps = {
'ftcache.c' : ['ftglyph.c'],
'ftfstype.c' : ['fttype1.c'],
'ftglyph.c' : ['ftbitmap.c'],
'ftstroke.c' : ['ftglyph.c'],
'ftsynth.c' : ['ftbitmap.c'],
'cff.c' : ['sfnt.c', 'pshinter.c', 'psnames.c'],
'truetype.c' : ['sfnt.c', 'psnames.c'],
'type1.c' : ['psaux.c' 'pshinter.c', 'psnames.c'],
'type1cid.c' : ['psaux.c', 'pshinter.c', 'psnames.c'],
'type42.c' : ['truetype.c'],
}
ft_modules = {
'autofit.c' : ['FT_Module_Class' , 'autofit_module_class' ],
'truetype.c': ['FT_Driver_ClassRec', 'tt_driver_class' ],
'type1.c' : ['FT_Driver_ClassRec', 't1_driver_class' ],
'cff.c' : ['FT_Driver_ClassRec', 'cff_driver_class' ],
'type1cid.c': ['FT_Driver_ClassRec', 't1cid_driver_class' ],
'pfr.c' : ['FT_Driver_ClassRec', 'pfr_driver_class' ],
'type42.c' : ['FT_Driver_ClassRec', 't42_driver_class' ],
'winfnt.c' : ['FT_Driver_ClassRec', 'winfnt_driver_class' ],
'pcf.c' : ['FT_Driver_ClassRec', 'pcf_driver_class' ],
'psaux.c' : ['FT_Module_Class' , 'psaux_module_class' ],
'psnames.c' : ['FT_Module_Class' , 'psnames_module_class' ],
'pshinter.c': ['FT_Module_Class' , 'pshinter_module_class' ],
'raster.c' : ['FT_Renderer_Class' , 'ft_raster1_renderer_class' ],
'sfnt.c' : ['FT_Module_Class' , 'sfnt_module_class' ],
'smooth.c' : ['FT_Renderer_Class' , 'ft_smooth_renderer_class' ],
#'smooth.c' : ['FT_Renderer_Class' , 'ft_smooth_lcd_renderer_class' ],
#'smooth.c' : ['FT_Renderer_Class' , 'ft_smooth_lcdv_renderer_class'],
'bdf.c' : ['FT_Driver_ClassRec', 'bdf_driver_class' ],
}
def _ft_build_dep_src(fnli):
dep_added = False
for i in fnli:
for k in ft_deps.get(i, []):
if k not in fnli:
dep_added = True
fnli.append(k)
if not dep_added:
return fnli
else:
return _ft_build_dep_src(fnli)
def _ft_add_basic_system(fnli):
for i in ('ftbase.c',
'ftbbox.c',
'ftfstype.c',
'ftglyph.c',
'ftinit.c',
'ftlcdfil.c',
'ftmm.c',
'ftpatent.c',
'gb2312tounicode.c',
'ftsystem.c',):
if i not in fnli:
fnli.append(i)
return fnli
group = []
# Test the depend before do any thing(copy config files etc).
if not GetDepend(['RT_USING_RTGUI', 'RTGUI_USING_TTF']):
Return('group')
###
# Configurations
###
enabled_modules = ['autofit.c', 'truetype.c', 'smooth.c']
###
#
###
enabled_modules = _ft_add_basic_system(enabled_modules)
enabled_modules = _ft_build_dep_src(enabled_modules)
proj_dir = str(Dir('#'))
config_dir = os.path.join(proj_dir, 'ftconfig')
if not os.path.exists(config_dir):
os.mkdir(config_dir)
for d, i in (('/include/config/', 'ftconfig.h'),
('/builds/rt-thread/', 'ftoption.h')):
if not os.path.exists(os.path.join(config_dir, i)):
import shutil
shutil.copy(GetCurrentDir() + d + i, config_dir)
if not os.path.exists(os.path.join(config_dir, 'ft2build.h')):
with open(os.path.join(config_dir, 'ft2build.h'), 'w') as e:
e.write('''
#ifndef __FT2BUILD_H__
#define __FT2BUILD_H__
#define FT_CONFIG_OPTIONS_H <ftoption.h>
#define FT_CONFIG_MODULES_H <ftmodule.h>
#define FT_CONFIG_CONFIG_H <ftconfig.h>
#include <config/ftheader.h>
#endif /* __FT2BUILD_H__ */
''')
f = open(os.path.join(config_dir, 'ftmodule.h'), 'w')
for m in enabled_modules:
if m in ft_modules:
f.write('FT_USE_MODULE( ' + ', '.join(ft_modules[m]) + ')\n')
# proj_dir/ftconfig should precede include/ in freetype
cpp_path = [config_dir, os.path.join(GetCurrentDir(), 'include/')]
src_file = [_ft_get_src_path(i) for i in enabled_modules]
group = DefineGroup('FreeType',
src_file,
CPPPATH = cpp_path,
# Depend is tested above
depend = [],
CPPDEFINES = ['FT2_BUILD_LIBRARY']
)
Return('group')
#!/bin/sh
# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
# Copyright 2005-2010, 2013 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
......@@ -118,9 +118,12 @@ fi
# On MacOS X, the GNU libtool is named `glibtool'.
HOSTOS=`uname`
LIBTOOLIZE=libtoolize
if test "$HOSTOS"x = Darwinx; then
if test "$LIBTOOLIZE"x != x; then
:
elif test "$HOSTOS"x = Darwinx; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
if test "$ACLOCAL"x = x; then
......@@ -136,7 +139,7 @@ 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`
eval `sed -nf version.sed include/freetype.h`
# We set freetype-patch to an empty value if it is zero.
if test "$freetype_patch" = ".0"; then
......
README for the builds/amiga subdirectory.
Copyright 2005 by
Copyright 2005, 2013 by
Werner Lemberg and Detlef Würkner.
This file is part of the FreeType project, and may only be used, modified,
......@@ -51,8 +51,8 @@ directory. The results are:
- 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().
Debugging can be turned on in FT:include/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
......@@ -64,15 +64,14 @@ directory. The results are:
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.
statements which modules you need. See include/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.
include/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
......
......@@ -4,7 +4,7 @@
/* */
/* Amiga-specific configuration file (specification only). */
/* */
/* Copyright 2005, 2006, 2007 by */
/* Copyright 2005-2007, 2013 by */
/* Werner Lemberg and Detlef Wrkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
......@@ -34,9 +34,9 @@
/* Now include the original file */
#ifndef __MORPHOS__
#ifdef __SASC
#include "FT:include/freetype/config/ftconfig.h"
#include "FT:include/config/ftconfig.h"
#else
#include "/FT/include/freetype/config/ftconfig.h"
#include "/FT/include/config/ftconfig.h"
#endif
#else
/* We must define that, it seems that
......@@ -45,7 +45,7 @@
* binaries from http://www.morphos.de)
*/
#define _LIBC_LIMITS_H_
#include "/FT/include/freetype/config/ftconfig.h"
#include "/FT/include/config/ftconfig.h"
#endif
/*
......
......@@ -5,7 +5,7 @@
#
# Copyright 2005, 2006, 2007, 2009 by
# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Wrkner.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -43,7 +43,7 @@
#
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
......@@ -234,6 +234,11 @@ pcf.ppc.o: $(FTSRC)/pcf/pcf.c
gzip.ppc.o: $(FTSRC)/gzip/ftgzip.c
$(CC) -c $(CFLAGS) -o $@ $<
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
#
bzip2.ppc.o: $(FTSRC)/bzip2/ftbzip2.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library compress support for compressed PCF bitmap fonts
#
......@@ -285,8 +290,8 @@ RASTERPPC = raster.ppc.o smooth.ppc.o
FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o lzw.ppc.o
$(AR) $@ $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o lzw.ppc.o
libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
$(AR) $@ $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
#Local Variables:
......
......@@ -4,7 +4,7 @@
#
# Copyright 2005, 2006, 2007, 2009 by
# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Wrkner.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -40,7 +40,7 @@
#
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
......@@ -237,6 +237,12 @@ pcf.ppc.o: FT:src/pcf/pcf.c
gzip.ppc.o: FT:src/gzip/ftgzip.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/gzip/ftgzip.c
#
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
#
bzip2.ppc.o: FT:src/bzip2/ftbzip2.c
$(CC) -c $(CFLAGS) -o $@ /FT/src/bzip2/ftbzip2.c
#
# FreeType2 library compress support for compressed PCF bitmap fonts
#
......
......@@ -3,7 +3,7 @@
#
# Copyright 2005,2006, 2007, 2009 by
# Copyright 2005-2007, 2009, 2013 by
# Werner Lemberg and Detlef Wrkner.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -40,7 +40,7 @@
#
# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
# (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).
# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h).
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 \
......@@ -98,8 +98,8 @@ assign:
# uses separate object modules in lib to make for easier debugging
# also, can make smaller programs if entire engine is not used
ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o
oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o
ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
clean:
-delete \#?.o
......@@ -262,6 +262,12 @@ pcf.o: $(CORE)pcf/pcf.c
gzip.o: $(CORE)gzip/ftgzip.c
sc $(SCFLAGS) define FAR objname=$@ $<
#
# freetype library bzip2 support for compressed PCF bitmap fonts
#
bzip2.o: $(CORE)bzip2/ftbzip2.c
sc $(SCFLAGS) define FAR objname=$@ $<
#
# freetype library compress support for compressed PCF bitmap fonts
#
......
......@@ -2,9 +2,9 @@
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component (body). */
/* Debugging and logging component for amiga (body). */
/* */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* Copyright 1996-2002, 2004, 2005, 2013 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Wrkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
......@@ -41,12 +41,12 @@
/*************************************************************************/
/*
* Based on the default ftdebug.c,
* replaced vprintf() with KVPrintF(),
* commented out exit(),
* replaced getenv() with GetVar().
*/
/*
* Based on the default ftdebug.c,
* replaced vprintf() with KVPrintF(),
* commented out exit(),
* replaced getenv() with GetVar().
*/
#include <exec/types.h>
#include <utility/tagitem.h>
......@@ -59,9 +59,9 @@
#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
......@@ -75,13 +75,13 @@ extern struct DOSIFace *IDOS;
/* 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 );
}
......@@ -90,19 +90,34 @@ extern struct DOSIFace *IDOS;
/* 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 )
{
FT_UNUSED( error );
FT_UNUSED( line );
FT_UNUSED( file );
return 0;
}
#endif /* FT_DEBUG_LEVEL_ERROR */
......@@ -161,7 +176,7 @@ extern struct DOSIFace *IDOS;
/* 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 */
/* See the file <include/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 7; 0 means quiet (except for serious */
......@@ -193,6 +208,9 @@ extern struct DOSIFace *IDOS;
while ( *p && *p != ':' )
p++;
if ( !*p )
break;
if ( *p == ':' && p > q )
{
FT_Int n, i, len = (FT_Int)( p - q );
......@@ -221,7 +239,7 @@ extern struct DOSIFace *IDOS;
p++;
if ( *p )
{
level = *p++ - '0';
level = *p - '0';
if ( level < 0 || level > 7 )
level = -1;
}
......
......@@ -4,7 +4,7 @@
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2001, 2002, 2005, 2006, 2007 by */
/* Copyright 1996-2002, 2005-2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Wrkner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
......@@ -386,7 +386,7 @@ Free_VecPooled( APTR poolHeader,
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
return FT_THROW( 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_Err_Cannot_Open_Resource;
return FT_THROW( 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_Err_Cannot_Open_Resource;
return FT_THROW( 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_Err_Cannot_Open_Resource;
return FT_THROW( 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_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
}
stream->size = fib->fib_Size;
FreeDosObject( DOS_FIB, fib );
......@@ -442,6 +442,14 @@ Free_VecPooled( APTR poolHeader,
stream->read = ft_amiga_stream_io;
stream->close = ft_amiga_stream_close;
if ( !stream->size )
{
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 );
}
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
filepathname, stream->size ));
......
......@@ -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 )
......
# iOS.cmake
#
# Copyright 2014 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)
# force the compilers to gcc for iOS
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(gcc gcc)
CMAKE_FORCE_CXX_COMPILER(g++ g++)
# 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
......@@ -53,7 +53,7 @@ L :=
# Target flag -- no trailing space.
#
T := -o
TE := -e
TE := -e
# C flags
......
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2002, 2003, 2006, 2008 by
# Copyright 1996-2003, 2006, 2008, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -17,8 +17,8 @@
# the following variables:
#
# BUILD_DIR The configuration and system-specific directory. Usually
# `freetype/builds/$(PLATFORM)' but can be different for
# custom builds of the library.
# `builds/$(PLATFORM)' but can be different for custom builds
# of the library.
#
# The following variables must be defined in system specific `detect.mk'
# files:
......@@ -124,7 +124,7 @@ std_setup:
@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 "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)."
@echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
......@@ -146,7 +146,7 @@ dos_setup:
@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).
@echo or 'make refdoc' to build the API reference (this needs python >= 2.6).
@type builds$(SEP)newline
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
......
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2004, 2006 by
# Copyright 1996-2000, 2003, 2004, 2006, 2014 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/win32/detect.mk for explanations about the logic.
# See builds/windows/detect.mk for explanations about the logic.
#
ifeq ($(is_dos),)
ifdef winbootdir
#ifneq ($(OS),Windows_NT)
# If win32 is available, do not trigger this test.
# If windows is available, do not trigger this test.
ifndef windir
is_dos := $(findstring Windows,$(strip $(shell ver)))
endif
......@@ -124,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/win32/detect.mk for
# Windows NT derivatives, like XP. See builds/windows/detect.mk for
# explanations why we need hacking here.
#
ifeq ($(OS),Windows_NT)
......
......@@ -51,7 +51,7 @@ ifneq ($(EXPORTS_LIST),)
APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
$(APINAMES_EXE): $(APINAMES_SRC)
$(CCexe) $(TE)$@ $<
$(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
.PHONY: symbols_list
......
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by
# Copyright 1996-2006, 2008, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -97,7 +97,7 @@ BASE_DIR := $(SRC_DIR)/base
# Other derived directories.
#
PUBLIC_DIR := $(TOP_DIR)/include/freetype
PUBLIC_DIR := $(TOP_DIR)/include
INTERNAL_DIR := $(PUBLIC_DIR)/internal
SERVICES_DIR := $(INTERNAL_DIR)/services
CONFIG_DIR := $(PUBLIC_DIR)/config
......@@ -116,8 +116,8 @@ 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 `freetype/builds/<system>' directory, as these
# files will override the default sources.
# in the `builds/<system>' directory, as these files will
# override the default sources.
#
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
$(DEVEL_DIR) \
......@@ -126,6 +126,14 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
ifdef DEVEL_DIR
# We assume that all library dependencies for FreeType are fulfilled for a
# development build, so we directly access the necessary include directory
# information using `pkg-config'.
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
harfbuzz )
endif
# C flags used for the compilation of an object file. This must include at
# least the paths for the `base' and `builds/<system>' directories;
......@@ -147,13 +155,14 @@ ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
endif
# Note that a build with the `configure' script uses $(CFLAGS) only.
#
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)
......@@ -178,7 +187,7 @@ PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
$(wildcard $(SERVICES_DIR)/*.h)
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
$(wildcard $(BUILD_DIR)/freetype/config/*.h) \
$(wildcard $(BUILD_DIR)/config/*.h) \
$(FTMODULE_H) \
$(FTOPTION_H)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
......@@ -261,8 +270,6 @@ objects: $(OBJECTS_LIST)
library: $(PROJECT_LIBRARY)
dll: $(PROJECT_LIBRARY) exported_symbols
.c.$O:
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
......@@ -290,19 +297,16 @@ ifneq ($(findstring refdoc,$(MAKECMDGOALS)),)
version := $(major).$(minor).$(patch)
endif
# We write-protect the docmaker directory to suppress generation
# of .pyc files.
# Option `-B' disables generation of .pyc files (available since python 2.6)
#
refdoc:
-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
python -B $(SRC_DIR)/tools/docmaker/docmaker.py \
--prefix=ft2 \
--title=FreeType-$(version) \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
.PHONY: clean_project_std distclean_project_std
......
......@@ -17,6 +17,7 @@ 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
......@@ -56,6 +57,7 @@ SrcFiles = \xB6
:src:cid:type1cid.c \xB6
# :src:gxvalid:gxvalid.c \xB6
:src:gzip:ftgzip.c \xB6
:src:bzip2:ftbzip2.c \xB6
:src:lzw:ftlzw.c \xB6
:src:otvalid:otvalid.c \xB6
:src:pcf:pcf.c \xB6
......@@ -100,6 +102,7 @@ ObjFiles-68K = \xB6
"{ObjDir}type1cid.c.o" \xB6
# "{ObjDir}gxvalid.c.o" \xB6
"{ObjDir}ftgzip.c.o" \xB6
"{ObjDir}ftbzip2.c.o" \xB6
"{ObjDir}ftlzw.c.o" \xB6
"{ObjDir}otvalid.c.o" \xB6
"{ObjDir}pcf.c.o" \xB6
......@@ -177,6 +180,7 @@ FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
# "{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
......
......@@ -16,6 +16,7 @@ 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
......@@ -55,6 +56,7 @@ SrcFiles = \xB6
:src:cid:type1cid.c \xB6
:src:gxvalid:gxvalid.c \xB6
:src:gzip:ftgzip.c \xB6
:src:bzip2:ftbzip2.c \xB6
:src:lzw:ftlzw.c \xB6
:src:otvalid:otvalid.c \xB6
:src:pcf:pcf.c \xB6
......@@ -99,6 +101,7 @@ ObjFiles-68K = \xB6
"{ObjDir}type1cid.c.o" \xB6
"{ObjDir}gxvalid.c.o" \xB6
"{ObjDir}ftgzip.c.o" \xB6
"{ObjDir}ftbzip2.c.o" \xB6
"{ObjDir}ftlzw.c.o" \xB6
"{ObjDir}otvalid.c.o" \xB6
"{ObjDir}pcf.c.o" \xB6
......@@ -176,6 +179,7 @@ FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5
"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
"{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
......
......@@ -17,6 +17,7 @@ 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
......@@ -56,6 +57,7 @@ SrcFiles = \xB6
:src:cid:type1cid.c \xB6
:src:gxvalid:gxvalid.c \xB6
:src:gzip:ftgzip.c \xB6
:src:bzip2:ftbzip2.c \xB6
:src:lzw:ftlzw.c \xB6
:src:otvalid:otvalid.c \xB6
:src:pcf:pcf.c \xB6
......@@ -100,6 +102,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}type1cid.c.x" \xB6
"{ObjDir}gxvalid.c.x" \xB6
"{ObjDir}ftgzip.c.x" \xB6
"{ObjDir}ftbzip2.c.x" \xB6
"{ObjDir}ftlzw.c.x" \xB6
"{ObjDir}otvalid.c.x" \xB6
"{ObjDir}pcf.c.x" \xB6
......@@ -180,6 +183,7 @@ FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\x
"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
......
......@@ -17,6 +17,7 @@ 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
......@@ -56,6 +57,7 @@ SrcFiles = \xB6
:src:cid:type1cid.c \xB6
:src:gxvalid:gxvalid.c \xB6
:src:gzip:ftgzip.c \xB6
:src:bzip2:ftbzip2.c \xB6
:src:lzw:ftlzw.c \xB6
:src:otvalid:otvalid.c \xB6
:src:pcf:pcf.c \xB6
......@@ -100,6 +102,7 @@ ObjFiles-PPC = \xB6
"{ObjDir}type1cid.c.x" \xB6
"{ObjDir}gxvalid.c.x" \xB6
"{ObjDir}ftgzip.c.x" \xB6
"{ObjDir}ftbzip2.c.x" \xB6
"{ObjDir}ftlzw.c.x" \xB6
"{ObjDir}otvalid.c.x" \xB6
"{ObjDir}pcf.c.x" \xB6
......@@ -180,6 +183,7 @@ FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\
"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
......
This folder contains
* Makefile skeltons for Apple MPW (Macintosh's Programmers Workshop)
* Makefile skeletons for Apple MPW (Macintosh's Programmer's Workshop)
* Python script to generate MPW makefile from skelton
* Python script to generate MPW makefile from skeleton
* Metrowerks CodeWarrior 9.0 project file in XML format
......@@ -51,7 +51,7 @@ environment by Metrowerks. GCC for MPW and Symantec
Also you can find documents how to update by MPW-PR.
Python is required to restore MPW makefiles from the
skeltons. Python bundled to Mac OS X is enough. For
skeletons. Python bundled to Mac OS X is enough. For
classic MacOS, MacPython is available:
http://homepages.cwi.nl/~jack/macpython/
......@@ -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 skeltons
3-1-1. Generate MPW makefiles from the skeletons
------------------------------------------------
Here are 4 skeltons for following targets are
Here are 4 skeletons 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 skeltons in pure ASCII format. You must
we store skeletons 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 skeltons are designed to use in the top
The skeletons 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 skelton name.
".txt" from source skeleton name.
3-1-2. Add resource forks to related files
------------------------------------------
......@@ -392,12 +392,10 @@ ATSFontGetFileSpecification() | x | x | x | x |
ATS font manager is not published in these versions.
------------------------------------------------------------
Last update: 2009-Jul-25.
Last update: 2013-Nov-03.
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.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://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>
......@@ -5,7 +5,7 @@
/* Mac FOND support. Written by just@letterror.com. */
/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* Copyright 1996-2008, 2013, 2014 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
......@@ -171,6 +171,7 @@ 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 +184,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
return FT_Err_Unimplemented_Feature;
return FT_THROW( Unimplemented_Feature );
}
#else
......@@ -203,6 +204,9 @@ typedef short ResourceIndex;
FMFontFamily family = 0;
if ( !fontName || !face_index )
return FT_THROW( Invalid_Argument );
*face_index = 0;
while ( status == 0 && !the_font )
{
......@@ -269,7 +273,7 @@ typedef short ResourceIndex;
return FT_Err_Ok;
}
else
return FT_Err_Unknown_File_Format;
return FT_THROW( Unknown_File_Format );
}
#endif /* HAVE_QUICKDRAW_CARBON */
......@@ -322,10 +326,10 @@ typedef short ResourceIndex;
CFRelease( cf_fontName );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
return FT_Err_Unknown_File_Format;
return FT_THROW( Unknown_File_Format );
if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )
return FT_Err_Unknown_File_Format;
return FT_THROW( Unknown_File_Format );
/* face_index calculation by searching preceding fontIDs */
/* with same FSRef */
......@@ -364,7 +368,7 @@ typedef short ResourceIndex;
FT_UNUSED( maxPathSize );
FT_UNUSED( face_index );
return FT_Err_Unimplemented_Feature;
return FT_THROW( Unimplemented_Feature );
}
#else
......@@ -380,11 +384,11 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( FT_Err_Ok != err )
if ( err )
return err;
if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
return FT_Err_Unknown_File_Format;
return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
}
......@@ -403,7 +407,7 @@ typedef short ResourceIndex;
FT_UNUSED( pathSpec );
FT_UNUSED( face_index );
return FT_Err_Unimplemented_Feature;
return FT_THROW( Unimplemented_Feature );
}
#else
......@@ -419,12 +423,12 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
if ( FT_Err_Ok != err )
if ( err )
return err;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
pathSpec, NULL ) )
return FT_Err_Unknown_File_Format;
return FT_THROW( Unknown_File_Format );
return FT_Err_Ok;
}
......@@ -579,7 +583,7 @@ typedef short ResourceIndex;
if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
/* at present, no support for dfont format */
err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );
......@@ -597,7 +601,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
/* at present, no support for dfont format without FSRef */
/* (see above), try original resource-fork font */
......@@ -695,11 +699,9 @@ 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 );
......@@ -846,17 +848,17 @@ typedef short ResourceIndex;
/* We should not extract parent directory by string manipulation. */
if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, &par_ref ) )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
/* now we have absolute dirname in path_lwfn */
if ( path_lwfn[0] == '/' )
......@@ -869,11 +871,11 @@ typedef short ResourceIndex;
path_lwfn[dirname_len + base_lwfn[0]] = '\0';
if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
NULL, NULL, NULL, NULL ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Ok;
......@@ -885,7 +887,7 @@ typedef short ResourceIndex;
/* pathname for FSSpec is always HFS format */
if ( ft_strlen( (char *)path_fond ) > path_size )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
ft_strcpy( (char *)path_lwfn, (char *)path_fond );
......@@ -894,7 +896,7 @@ typedef short ResourceIndex;
i--;
if ( i + 1 + base_lwfn[0] > path_size )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
if ( ':' == path_lwfn[i] )
{
......@@ -908,7 +910,7 @@ typedef short ResourceIndex;
}
if ( noErr != FT_FSPathMakeSpec( path_lwfn, &spec, FALSE ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
return FT_Err_Ok;
......@@ -1002,7 +1004,7 @@ 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;
}
......@@ -1087,7 +1089,7 @@ typedef short ResourceIndex;
if ( noErr != FT_FSPathMakeRes( pathname, &res ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
pfb_data = NULL;
pfb_size = 0;
......@@ -1122,7 +1124,7 @@ typedef short ResourceIndex;
sfnt = GetResource( TTAG_sfnt, sfnt_id );
if ( sfnt == NULL )
return FT_Err_Invalid_Handle;
return FT_THROW( Invalid_Handle );
sfnt_size = (FT_ULong)GetHandleSize( sfnt );
if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
......@@ -1181,23 +1183,26 @@ 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, num_faces_in_fond;
short num_faces_in_res;
if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( Cannot_Open_Resource );
UseResFile( res_ref );
if ( ResError() )
return FT_Err_Cannot_Open_Resource;
return FT_THROW( 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;
......@@ -1236,9 +1241,12 @@ 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_Err_Invalid_File_Format;
return FT_THROW( Invalid_File_Format );
HLock( fond );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
......@@ -1321,7 +1329,7 @@ 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 && FT_Err_Ok != error )
......@@ -1388,9 +1396,8 @@ typedef short ResourceIndex;
/* test for valid `library' and `aface' delayed to FT_Open_Face() */
if ( !pathname )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
error = FT_Err_Ok;
*aface = NULL;
/* try resourcefork based font: LWFN, FFIL */
......@@ -1431,7 +1438,7 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
return FT_Err_Unimplemented_Feature;
return FT_THROW( Unimplemented_Feature );
#else
......@@ -1441,12 +1448,14 @@ typedef short ResourceIndex;
UInt8 pathname[PATH_MAX];
/* test for valid `library' and `aface' delayed to `FT_Open_Face' */
if ( !ref )
return FT_Err_Invalid_Argument;
return FT_THROW( 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 != 0 || *aface != NULL )
......@@ -1486,7 +1495,7 @@ typedef short ResourceIndex;
if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )
return FT_Err_Invalid_Argument;
return FT_THROW( Invalid_Argument );
else
return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
......@@ -1499,11 +1508,11 @@ typedef short ResourceIndex;
if ( !spec )
return FT_Err_Invalid_Argument;
return FT_THROW( 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 != 0 || *aface != NULL )
......@@ -1521,11 +1530,13 @@ typedef short ResourceIndex;
FT_UNUSED( face_index );
FT_UNUSED( aface );
return FT_Err_Unimplemented_Feature;
return FT_THROW( Unimplemented_Feature );
#endif /* HAVE_FSREF, HAVE_FSSPEC */
}
#endif /* FT_MACINTOSH */
/* END */
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2006, 2008 by
# Copyright 1996-2000, 2003, 2006, 2008, 2014 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 win32 win16 os2),)
ifneq ($(findstring $(PLATFORM),dos windows os2),)
OPEN_MODULE := @echo$(space)
CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H))
REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H))
......
/***************************************************************************/
/* */
/* ftsystem.c */
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2002, 2006, 2008-2011, 2013 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 default interface used by FreeType to access */
/* low-level, i.e. memory management, i/o access as well as thread */
/* synchronisation. It can be replaced by user-specific routines if */
/* necessary. */
/* */
/*************************************************************************/
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include <rtthread.h>
#include <dfs.h>
#include <dfs_file.h>
/*************************************************************************/
/* */
/* 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. */
/* */
FT_CALLBACK_DEF( void* )
ft_alloc( FT_Memory memory,
long size )
{
FT_UNUSED( memory );
return rt_malloc( size );
}
/*************************************************************************/
/* */
/* <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,
long new_size,
void* block )
{
FT_UNUSED( memory );
FT_UNUSED( cur_size );
return rt_realloc( block, new_size );
}
/*************************************************************************/
/* */
/* <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 )
{
FT_UNUSED( memory );
rt_free( block );
}
/*************************************************************************/
/* */
/* RESOURCE MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
#ifndef FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT
/*************************************************************************/
/* */
/* 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 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 ) ( (struct dfs_fd *)stream->descriptor.pointer )
/*************************************************************************/
/* */
/* <Function> */
/* ft_rtt_stream_close */
/* */
/* <Description> */
/* The function to close a stream. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_rtt_stream_close( FT_Stream stream )
{
dfs_file_close( STREAM_FILE( stream ) );
rt_free( STREAM_FILE( stream ) );
stream->descriptor.pointer = RT_NULL;
stream->size = 0;
stream->base = 0;
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_ansi_stream_io */
/* */
/* <Description> */
/* The function to open a stream. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
/* offset :: The position in the data stream to start reading. */
/* */
/* buffer :: The address of buffer to store the read data. */
/* */
/* count :: The number of bytes to read from the stream. */
/* */
/* <Return> */
/* The number of bytes actually read. If `count' is zero (this is, */
/* the function is used for seeking), a non-zero return value */
/* indicates an error. */
/* */
FT_CALLBACK_DEF( unsigned long )
ft_rtt_stream_io( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count )
{
struct dfs_fd *file;
int res;
if ( !count && offset > stream->size )
return 1;
file = STREAM_FILE( stream );
if ( stream->pos != offset )
dfs_file_lseek( file, offset );
if ( count == 0)
{
res = dfs_file_lseek( file, offset );
if (res < 0)
return res;
return 0;
}
RT_ASSERT(buffer);
res = dfs_file_read( file, buffer, count );
if (res >= 0)
return res;
return 0;
}
/* documentation is in ftstream.h */
FT_BASE_DEF( FT_Error )
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
struct dfs_fd *dfd;
int res;
if ( !stream )
return FT_THROW( Invalid_Stream_Handle );
stream->descriptor.pointer = NULL;
stream->pathname.pointer = (char*)filepathname;
stream->base = 0;
stream->pos = 0;
stream->read = NULL;
stream->close = NULL;
dfd = rt_malloc(sizeof(*dfd));
if ( !dfd )
return FT_THROW( Out_Of_Memory );
res = dfs_file_open(dfd, filepathname, DFS_O_RDONLY);
if ( res < 0 )
{
FT_ERROR(( "FT_Stream_Open:"
" could not open `%s'\n", filepathname ));
return FT_THROW( Cannot_Open_Resource );
}
stream->size = dfd->size;
if ( !stream->size )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
dfs_file_close( dfd );
rt_free(dfd);
return FT_THROW( Cannot_Open_Stream );
}
stream->descriptor.pointer = dfd;
stream->read = ft_rtt_stream_io;
stream->close = ft_rtt_stream_close;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
}
#endif /* !FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
#ifdef FT_DEBUG_MEMORY
extern FT_Int
ft_mem_debug_init( FT_Memory memory );
extern void
ft_mem_debug_done( FT_Memory memory );
#endif
/* documentation is in ftobjs.h */
FT_BASE_DEF( FT_Memory )
FT_New_Memory( void )
{
FT_Memory memory;
memory = (FT_Memory)rt_malloc( sizeof ( *memory ) );
if ( memory )
{
memory->user = 0;
memory->alloc = ft_alloc;
memory->realloc = ft_realloc;
memory->free = ft_free;
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_init( memory );
#endif
}
return memory;
}
/* documentation is in ftobjs.h */
FT_BASE_DEF( void )
FT_Done_Memory( FT_Memory memory )
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
rt_free( memory );
}
/* END */
w/ freetype and rander font:
total memory: 33554408
used memory : 1068752
maximum allocated memory: 1070644
w/ freetype but not rander font:
total memory: 33554408
used memory : 1005428
maximum allocated memory: 1007688
w/o freetype:
total memory: 33554408
used memory : 807216
maximum allocated memory: 809476
//
// FreeType 2 project for the symbian platform
//
// 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,
// 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.
PRJ_PLATFORMS
DEFAULT
PRJ_MMPFILES
freetype.mmp
PRJ_EXPORTS
../../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/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
//
// FreeType 2 project for the symbian platform
//
// Copyright 2008, 2009, 2013 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.
PRJ_PLATFORMS
DEFAULT
PRJ_MMPFILES
freetype.mmp
PRJ_EXPORTS
../../include/ft2build.h
../../include/config/ftconfig.h config/ftconfig.h
../../include/config/ftheader.h config/ftheader.h
../../include/config/ftmodule.h config/ftmodule.h
../../include/config/ftoption.h config/ftoption.h
../../include/config/ftstdlib.h config/ftstdlib.h
../../include/freetype.h freetype.h
../../include/ftbbox.h ftbbox.h
../../include/ftbdf.h ftbdf.h
../../include/ftbitmap.h ftbitmap.h
../../include/ftcache.h ftcache.h
../../include/ftcid.h ftcid.h
../../include/fterrdef.h fterrdef.h
../../include/fterrors.h fterrors.h
../../include/ftgasp.h ftgasp.h
../../include/ftglyph.h ftglyph.h
../../include/ftgxval.h ftgxval.h
../../include/ftgzip.h ftgzip.h
../../include/ftbzip2.h ftbzip2.h
../../include/ftimage.h ftimage.h
../../include/ftincrem.h ftincrem.h
../../include/ftlcdfil.h ftlcdfil.h
../../include/ftlist.h ftlist.h
../../include/ftlzw.h ftlzw.h
../../include/ftmac.h ftmac.h
../../include/ftmm.h ftmm.h
../../include/ftmodapi.h ftmodapi.h
../../include/ftmoderr.h ftmoderr.h
../../include/ftotval.h ftotval.h
../../include/ftoutln.h ftoutln.h
../../include/ftpfr.h ftpfr.h
../../include/ftrender.h ftrender.h
../../include/ftsizes.h ftsizes.h
../../include/ftsnames.h ftsnames.h
../../include/ftstroke.h ftstroke.h
../../include/ftsynth.h ftsynth.h
../../include/ftsystem.h ftsystem.h
../../include/fttrigon.h fttrigon.h
../../include/fttypes.h fttypes.h
../../include/ftwinfnt.h ftwinfnt.h
../../include/ftxf86.h ftxf86.h
../../include/t1tables.h t1tables.h
../../include/ttnameid.h ttnameid.h
../../include/tttables.h tttables.h
../../include/tttags.h tttags.h
../../include/ttunpat.h ttunpat.h
......@@ -64,6 +64,10 @@ sourcepath ..\..\src\gzip
source ftgzip.c
sourcepath ..\..\src\bzip2
source ftbzip2.c
sourcepath ..\..\src\lzw
source ftlzw.c
......@@ -126,6 +130,7 @@ userinclude ..\..\src\cff
userinclude ..\..\src\cid
userinclude ..\..\src\gxvalid
userinclude ..\..\src\gzip
userinclude ..\..\src\bzip2
userinclude ..\..\src\lzw
userinclude ..\..\src\otvalid
userinclude ..\..\src\pcf
......
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2003, 2006, 2008, 2009 by
# Copyright 1996-2001, 2003, 2006, 2008-2010, 2012-2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -112,16 +112,17 @@ ifdef check_platform
include $(TOP_DIR)/builds/detect.mk
# 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 win32' has
# GNU make. Similarly, `nul' is created if e.g. `make setup windows' 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),)
......@@ -175,7 +176,7 @@ include $(TOP_DIR)/builds/modules.mk
# we check for `dist', not `distclean'
ifneq ($(findstring distx,$(MAKECMDGOALS)x),)
FT_H := include/freetype/freetype.h
FT_H := include/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))
......@@ -199,7 +200,8 @@ dist:
currdir=`pwd` ; \
for f in `find . -wholename '*/.git' -prune \
-o -name .cvsignore \
-o -name .gitignore \
-o -name .mailmap \
-o -type d \
-o -print` ; do \
ln -s $$currdir/$$f tmp/$$f ; \
......@@ -230,7 +232,8 @@ dist:
# The locations of the latest `config.guess' and `config.sub' versions (from
# GNU `config' CVS), relative to the `tmp' directory used during `make dist'.
# GNU `config' git repository), relative to the `tmp' directory used during
# `make dist'.
#
CONFIG_GUESS = ~/git/config/config.guess
CONFIG_SUB = ~/git/config/config.sub
......
......@@ -10,6 +10,7 @@ configure.ac
freetype2.pc
freetype-config
ftconfig.h
install-sh
libtool
ltmain.sh
unix-cc.mk
......
......@@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2002, 2003, 2004, 2006 by
# Copyright 1996-2000, 2002-2004, 2006, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -20,6 +20,7 @@ ifeq ($(PLATFORM),ansi)
#
is_unix := $(strip $(wildcard /sbin/init) \
$(wildcard /usr/sbin/init) \
$(wildcard /dev/null) \
$(wildcard /hurd/auth))
ifneq ($(is_unix),)
......@@ -75,13 +76,14 @@ ifeq ($(PLATFORM),unix)
have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
CONFIG_SHELL ?= /bin/sh
setup: std_setup
ifdef must_configure
ifneq ($(have_Makefile),)
# we are building FT2 not in the src tree
$(TOP_DIR)/builds/unix/configure $(value CFG)
$(CONFIG_SHELL) $(TOP_DIR)/builds/unix/configure $(value CFG)
else
cd builds/unix; ./configure $(value CFG)
cd builds/unix; $(CONFIG_SHELL) ./configure $(value CFG)
endif
endif
......
#! /bin/sh
#
# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 by
# Copyright 2000-2005, 2008, 2009, 2013, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -9,14 +9,15 @@
# indicate that you have read the license and understand and accept it
# fully.
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@'
LC_ALL=C
export LC_ALL
prefix="%prefix%"
exec_prefix="%exec_prefix%"
exec_prefix_set="no"
includedir="%includedir%"
libdir="%libdir%"
enable_shared="%build_libtool_libs%"
usage()
{
......@@ -37,6 +38,8 @@ 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
EOF
exit $1
}
......@@ -72,7 +75,7 @@ while test $# -gt 0 ; do
echo_exec_prefix=yes
;;
--version)
echo @ft_version@
echo %ft_version%
exit 0
;;
--ftversion)
......@@ -87,6 +90,9 @@ while test $# -gt 0 ; do
--libtool)
echo_libtool=yes
;;
--static)
show_static=yes
;;
*)
usage 1 1>&2
;;
......@@ -118,13 +124,13 @@ else
fi
if test "$echo_ft_version" = "yes" ; then
major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
major=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_MAJOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
minor=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_MINOR \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
patch=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \
| grep FREETYPE_PATCH \
| sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
echo $major.$minor.$patch
......@@ -132,20 +138,17 @@ fi
if test "$echo_cflags" = "yes" ; then
cflags="-I${SYSROOT}$includedir/freetype2"
if test "${SYSROOT}$includedir" != "/usr/include" ; then
echo $cflags -I${SYSROOT}$includedir
else
echo $cflags
fi
echo $cflags
fi
if test "$echo_libs" = "yes" ; then
rpath=
if test "$enable_shared" = "yes" ; then
eval "rpath=\"$hardcode_libdir_flag_spec\""
libs="-lfreetype"
staticlibs="%LIBSSTATIC_CONFIG%"
if test "$show_static" = "yes" ; then
libs="$staticlibs"
fi
libs="-lfreetype @LIBZ@ @FT2_EXTRA_LIBS@"
if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
if test "${SYSROOT}$libdir" != "/usr/lib" &&
test "${SYSROOT}$libdir" != "/usr/lib64"; then
echo -L${SYSROOT}$libdir $libs
else
echo $libs
......
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
prefix=%prefix%
exec_prefix=%exec_prefix%
libdir=%libdir%
includedir=%includedir%/freetype2
Name: FreeType 2
URL: http://freetype.org
Description: A free, high-quality, and portable font engine.
Version: @ft_version@
Version: %ft_version%
Requires:
Requires.private: %REQUIRES_PRIVATE%
Libs: -L${libdir} -lfreetype
Libs.private: @LIBZ@ @FT2_EXTRA_LIBS@
Cflags: -I${includedir}/freetype2 -I${includedir}
Libs.private: %LIBS_PRIVATE%
Cflags: -I${includedir}
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
#
# Copyright 2001, 2003, 2007, 2009 by
# Copyright 2001, 2003, 2007, 2009, 2014 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
......@@ -15,7 +15,7 @@
# generated by Autoconf, under the same distribution terms as the rest of
# that program.
#
# serial 3
# serial 4
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
......@@ -61,7 +61,7 @@ AC_DEFUN([AC_CHECK_FT2],
fi
if test "x$FT2_CONFIG" = x ; then
AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no])
fi
min_ft_version=m4_if([$1], [], [7.0.1], [$1])
......
此差异已折叠。
......@@ -14,8 +14,9 @@
CC := @CC@
COMPILER_SEP := $(SEP)
FT_LIBTOOL_DIR ?= $(BUILD_DIR)
LIBTOOL ?= $(BUILD_DIR)/libtool
LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
# The object file extension (for standard and static libraries). This can be
......
......@@ -21,14 +21,14 @@ the following targets:
<li>PPC/SP WM6 (Windows Mobile 6)</li>
</ul>
It compiles the following libraries from the FreeType 2.3.12 sources:</p>
It compiles the following libraries from the FreeType 2.5.4 sources:</p>
<ul>
<pre>
freetype2312.lib - release build; single threaded
freetype2312_D.lib - debug build; single threaded
freetype2312MT.lib - release build; multi-threaded
freetype2312MT_D.lib - debug build; multi-threaded</pre>
freetype254.lib - release build; single threaded
freetype254_D.lib - debug build; single threaded
freetype254MT.lib - release build; multi-threaded
freetype254MT_D.lib - debug build; multi-threaded</pre>
</ul>
<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
......
# user-specific cache/settings files
*.opensdf
*.sdf
*.suo
*.user
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册