mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
Import FreeType 2.1.4
svn path=/trunk/; revision=4550
This commit is contained in:
parent
296d8bc63f
commit
3ac978f542
|
@ -1,63 +1,430 @@
|
|||
2003-03-27 David Turner <david@freetype.org>
|
||||
|
||||
* README: udpated
|
||||
|
||||
* README.UNX: removed (now replaced by docs/INSTALL.UNX)
|
||||
|
||||
* src/pshinter/pshalgo3.c: the hinter now performs as in 2.1.3 and
|
||||
will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is used
|
||||
|
||||
* src/base/ftobjs.c: changed the default computations to include rounding
|
||||
in all cases, this is required to provide accurate kerning data when
|
||||
native TrueType hinting is enabled.
|
||||
|
||||
* src/type1/t1load.c: the Type 1 loader now accepts more general names
|
||||
according to the Postscript spec (the previous one was too restrictive)
|
||||
|
||||
2003-03-20 David Turner <david@freetype.org>
|
||||
|
||||
* docs/*: serious rewriting of the documentation
|
||||
|
||||
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c,
|
||||
src/pcf/pcfdriver.c, src/pfr/pfrsbit.c, src/sfnt/ttsbit.c,
|
||||
src/type42/t42objs.c, src/winfonts/winfnt.c: introduced three new functions
|
||||
to deal with glyph bitmaps within FT_GlyphSlot objects. these are:
|
||||
|
||||
ft_glyphslot_free_bitmap
|
||||
ft_glyphslot_alloc_bitmap
|
||||
ft_glyphslot_set_bitmap
|
||||
|
||||
these are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP
|
||||
flag manually. the font drivers have been modified to use them as well.
|
||||
|
||||
* src/cache/ftlru.c: fixed an invalid assertion check
|
||||
|
||||
* src/autohint/ahglyph.h, src/autohint/ahglyph.c, src/autohint/ahglobal.c,
|
||||
src/autohint/ahhint.c: fixed blue-scale problem
|
||||
|
||||
* src/cache/ftccache.c: fixed small bug that could crash the cache
|
||||
in rare circumstances (mostly with broken fonts)
|
||||
|
||||
|
||||
2003-03-15 David Turner <david@freetype.org>
|
||||
|
||||
* src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug.
|
||||
Actually, it seems that previous versions of FreeType didn't perform
|
||||
TrueType rounding exactly as appropriate.
|
||||
|
||||
2003-03-14 David Turner <david@freetype.org>
|
||||
|
||||
* src/truetype/ttdriver.c: fixing the small TrueType native rendering
|
||||
glitches, they came from a small rounding error.
|
||||
|
||||
2003-03-13 David Turner <david@freetype.org>
|
||||
|
||||
* src/base/ftdbgmem.c, docs/DEBUG.TXT: added new environment variables
|
||||
to control memory debugging with FreeType. See the description of
|
||||
"FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX"
|
||||
in DEBUG.TXT
|
||||
|
||||
* src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c,
|
||||
ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory
|
||||
conditions.
|
||||
|
||||
* src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a
|
||||
small memory leak
|
||||
|
||||
* src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that
|
||||
only happened when trying to resize an array would end in an OOM.
|
||||
|
||||
* src/smooth/ftgrays.c: removed compiler warnings / volatile bug
|
||||
|
||||
* src/truetype/ttobjs.c: removed segmentation fault that happened in
|
||||
tight memory environments.
|
||||
|
||||
2003-02-28 Pixel <pixel@mandrakesoft.com>
|
||||
|
||||
* src/gzip/ftgzip.c (ft_gzip_file_done): fixed memory leak, the ZLib
|
||||
stream was not properly finalized
|
||||
|
||||
2003-02-25 Anthony Fok <anthony@thizlinux.com>
|
||||
|
||||
* src/cache/ftccmap.c: the cmap cache now supports UCS-4 charmaps
|
||||
when available in Asian fonts
|
||||
|
||||
* src/sfnt/ttload.c, src/base/ftobjs.c: changed "asian" to "Asian" in
|
||||
comments
|
||||
|
||||
2003-02-25 David Turner <david@freetype.org>
|
||||
|
||||
* src/gzip/ftgzip.c: fixed a bug that caused FreeType to loop endlessly
|
||||
when trying to read certain compressed gzip files. The following test
|
||||
could be used to reveal the bug:
|
||||
|
||||
touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
|
||||
|
||||
|
||||
* src/pfr/pfrobjs.c, src/pfr/pfrload.c, src/pfr/pfrtypes.h: several
|
||||
fixes to the PFR font driver:
|
||||
|
||||
- the list of available embedded bitmaps was not correctly set
|
||||
in the root FT_FaceRec structure describing the face
|
||||
|
||||
- the glyph loader always tried to load the outlines when
|
||||
FT_LOAD_SBITS_ONLY was specified
|
||||
|
||||
- the table loaded now scans for *undocumented* elements of a
|
||||
physical font's auxiliary data record, this is necessary to
|
||||
retrieve the "real" family and style names.
|
||||
|
||||
NOTE THAT THIS CHANGES THE FAMILY NAME OF MANY PFR FONTS !!
|
||||
|
||||
* src/truetype/ttdriver.c (Set_Char_Sizes): fixed a rounding bug when
|
||||
computing the scale factors for a given character size in points with
|
||||
resolution.
|
||||
|
||||
|
||||
2003-02-18 David Turner <david@freetype.org>
|
||||
|
||||
* src/truetype/ttdriver.c, src/truetype/ttobjs.h, src/truetype/ttobjs.c,
|
||||
src/truetype/ttinterp.c, src/base/ftobjs.c: fixing the slight distortion
|
||||
problem that occured due to the latest auto-hinter changes
|
||||
|
||||
|
||||
* src/autohint/ahhint.c: disabled the advance width "correction" which
|
||||
seemed to provide more trouble than benefits..
|
||||
|
||||
2003-02-13 Graham Asher <graham.asher@btinternet.com>
|
||||
|
||||
* include/freetype/ftincrem.h, src/cff/cffgload.c, src/cid/cidgload.c,
|
||||
src/truetype/ttgload.c, src/type1/t1gload.c
|
||||
[FT_CONFIG_OPTION_INCREMENTAL]: I have changed the incremental loading
|
||||
interface in a way that makes it simpler and allows glyph metrics to
|
||||
be changed (e.g., by adding a constant, as required by CFF fonts)
|
||||
rather than just overridden. This was required to make the GhsotScript-
|
||||
to-FreeType bridge work.
|
||||
|
||||
2003-01-31 David Turner <david@freetype.org>
|
||||
|
||||
* docs/CHANGES, docs/VERSION.DLL, docs/TODO: updating documentation for
|
||||
the 2.1.4 release
|
||||
|
||||
* builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
|
||||
updating the project file for 2.1.4
|
||||
|
||||
* src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c,
|
||||
src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c,
|
||||
src/gzip/infutil.c: removed old-style (K&R)function definitions. This
|
||||
avoids warnings with Visual C++ at its most pedantic mode.
|
||||
|
||||
* src/pfr/pfrsbit.c: removed compiler warnings
|
||||
|
||||
* src/cache/ftccmap.c: changed a FT_ERROR into a FT_TRACE1 since the
|
||||
it caused "ftview" and others to dump too much junk when trying to
|
||||
display a waterfall with a font without a Unicode charmap (e.g.
|
||||
SYMBOL.TTF)
|
||||
|
||||
* src/autohint/ahtypes.h, src/autohint/ahhint.c, src/base/ftobjs.c,
|
||||
src/truetype/ttobjs.c: implemented FT_CONFIG_CHESTER_BLUE_SCALE,
|
||||
corresponding to the last patch from David Chester, but with a
|
||||
much simpler (and saner) implementation.
|
||||
|
||||
* src/pshinter/pshalgo3.c: improved the Postscript hinter. Getting rid
|
||||
of stem snapping seems to work well here (though the stems are still
|
||||
slightly moved to increase contrast).
|
||||
|
||||
THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES
|
||||
STILL SUCK... I need to work this a bit
|
||||
|
||||
2003-01-22 David Chester <davidchester@qmx.net>
|
||||
|
||||
* src/autohint/ahhint.c: small fix to the stem width optimisation
|
||||
|
||||
2003-01-22 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/ftbdf.h, include/freetype/internal/bdftypes.h,
|
||||
src/base/ftbdf.c, src/bdf/bdfdrivr.c, src/pcf/pcfdrivr.c,
|
||||
src/pcf/pcfread.h:
|
||||
|
||||
adding a new API, named FT_Get_BDF_Property to retrieve the BDF
|
||||
properties of a given PCF or BDF font
|
||||
|
||||
* src/sfnt/ttload.c (sfnt_dir_check): relaxed the "head" table size
|
||||
verification to accept a few broken fonts who pad the size incorrectly
|
||||
(the table should be padded, but its "size" field shouldn't per se
|
||||
the spec)
|
||||
|
||||
2003-01-18 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* builds/unix/ltmain.sh: Regenerated with `libtoolize --force
|
||||
--copy' from libtool 1.4.3.
|
||||
* builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
|
||||
automake 1.7.1.
|
||||
* builds/unix/configure: Regenerated with autoconf 2.54.
|
||||
* builds/unix/config.guess, builds/unix/config.sub: Updated from
|
||||
`config' CVS module at subversions.gnu.org.
|
||||
* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
|
||||
`automake' CVS module at subversions.gnu.org.
|
||||
|
||||
2003-01-15 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/freetype.h: Fixed documentation for
|
||||
FT_Size_Metrics.
|
||||
|
||||
2003-01-15 James Su <suzhe@turbolinux.com.cn>
|
||||
|
||||
* src/gzip/ftgzip.c: Bugfix: couldn't read certain gzip-ed font
|
||||
files.
|
||||
|
||||
2003-01-15 Huw D M Davies <h.davies1@physics.ox.ac.uk>
|
||||
|
||||
* include/freetype/config/ftheader.h,
|
||||
include/freetype/internal/fnttypes.h, include/freetype/ftwinfnt.h,
|
||||
src/base/winfnt.c, src/winfonts/winfnt.c, src/base/Jamfile,
|
||||
src/base/rules.mk, src/base/descrip.mms: Added a Windows .FNT
|
||||
specific API (mostly for Wine). Also fixed a nasty bug in the
|
||||
header loader which would cause invalid memory overwrites.
|
||||
|
||||
2003-01-14 Graham Asher <graham.asher@btinternet.com>
|
||||
|
||||
* include/freetype/ftglyph.h, src/base/ftglyph.c: Added `const' to
|
||||
the type of the first argument to FT_Matrix_Multiply, which isn't
|
||||
changed -- this adds documentation and convenience.
|
||||
|
||||
2003-01-13 Graham Asher <graham.asher@btinternet.com>
|
||||
|
||||
* src/sfnt/ttload.c (tt_face_load_metrics)
|
||||
[FT_CONFIG_OPTION_INCREMENTAL]: TrueType typefaces without
|
||||
horizontal metrics (without the `hmtx' table) are now tolerated if
|
||||
an incremental interface has been specified that has a
|
||||
get_glyph_metrics function, implying that metrics will be supplied
|
||||
from outside. This happens for certain Type 42 fonts passed from
|
||||
GhostScript.
|
||||
|
||||
2003-01-11 David Chester <davidchester@qmx.net>
|
||||
|
||||
* include/freetype/config/ftoption.h, src/autohint/ahglobal.h,
|
||||
src/autohint/ahglobal.c, src/autohint/ahglyph.c,
|
||||
src/autohint/ahtypes.h: Patches to the auto-hinter in order to
|
||||
slightly improve the output. Note that everything is controlled
|
||||
through the new FT_CONFIG_OPTION_CHESTER_HINTS defined at the end of
|
||||
"ftoption.h". There are also individual FT_CONFIG_CHESTER_XXX
|
||||
macros to control individual "features".
|
||||
|
||||
Note that all improvements are enabled by default, but can be
|
||||
tweaked for optimization and testing purposes. The configuration
|
||||
macros will most likely disappear in the short future.
|
||||
|
||||
2003-01-11 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/internal/fnttypes.h: Fixed a structure field
|
||||
definition to avoid memory overwrites.
|
||||
|
||||
2003-01-08 Huw Dawies <huw@codeweavers.com>
|
||||
|
||||
* src/winfonts/winfnt.c: Read 16 bytes into "reserved2", not
|
||||
"reserved".
|
||||
|
||||
* src/base/ftobjs.c (find_unicode_charmap): Fixed the error code
|
||||
returned when the font doesn't contain a Unicode charmap. This
|
||||
allows FT2 to load "symbol.ttf" and a few others correctly since the
|
||||
last release.
|
||||
|
||||
2003-01-08 Owen Taylor <owen@redhat.com>
|
||||
|
||||
* src/autohint/ahtypes.h, src/autohint/ahhint.c,
|
||||
src/pshinter/pshalgo3.h, src/pshinter/pshalgo3.c: Implemented the
|
||||
FT_RENDER_MODE_LIGHT hinting mode in the auto and postscript
|
||||
hinters.
|
||||
|
||||
* src/truetype/ttgload.c: Fixing the TrueType loader to handle
|
||||
invalid composites correctly by limiting the recursion depth.
|
||||
|
||||
2003-01-08 David Turner <david@freetype.org>
|
||||
|
||||
* Jamrules, Jamfile, Jamfile.in, src/*/Jamfile: Small changes to
|
||||
support the compilation of FreeType 2 as part of larger projects
|
||||
with their own configuration options (only with Jam).
|
||||
|
||||
2003-01-07 David Turner <david@freetype.org>
|
||||
|
||||
* src/base/ftstroker.c: Probably the last bug-fixes to the stroker;
|
||||
the API is likely to change, however.
|
||||
|
||||
* src/base/fttrigon.c (FT_Angle_Diff): Fixing function: It returned
|
||||
invalid values for large negative angle differences (resulting in
|
||||
incorrect stroker computations, among other things).
|
||||
|
||||
* src/cache/ftccache.c (ftc_node_unlink): Removing incorrect
|
||||
assertion, and changing code to avoid hash table size contraction.
|
||||
|
||||
* src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding
|
||||
"ftstroker.obj" to default build, as optional component.
|
||||
|
||||
2002-12-26 David Turner <david@freetype.org>
|
||||
|
||||
* src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c,
|
||||
src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h,
|
||||
src/gzip/zutil.h: Updates to allow compilation without compiler
|
||||
warnings with LCC-Win32.
|
||||
|
||||
* include/freetype/freetype.h, docs/VERSION.DLL,
|
||||
builds/unix/configure.ac, builds/unix/configure: Updates for the
|
||||
upcoming 2.1.4 release.
|
||||
|
||||
2002-12-23 Anthony Fok <anthony@thizlinux.com>
|
||||
|
||||
* builds/unix/configure.ac, builds/unix/unix-cc.in,
|
||||
builds/unix/unix-def.in: Small fix to configure sub-system on Unix
|
||||
to allow other programs to correctly link with zlib when needed.
|
||||
|
||||
2002-12-17 David Turner <david@freetype.org>
|
||||
|
||||
* src/base/ftobjs.c (find_unicode_charmap): Added some comments to
|
||||
better explain what's happening there.
|
||||
|
||||
* src/base/ftobjs.c (open_face): Included Graham Asher's fix to
|
||||
prevent faces without Unicode charmaps from loading.
|
||||
|
||||
* src/winfonts/winfnt.c: Included George Williams's fix to support
|
||||
version 2 fonts correctly.
|
||||
|
||||
2002-12-16 David Turner <david@freetype.org>
|
||||
|
||||
* docs/VERSION.DLL: Updating document to better explain the
|
||||
differences between the three version numbers being used on Unix, as
|
||||
well as providing an autoconf fragment provided by Lars Clausen.
|
||||
|
||||
* src/smooth/ftgrays.c (gray_render_conic): Fixed small bug that
|
||||
prevented bezier arcs with negative vertical coordinates to be
|
||||
rendered appropriately.
|
||||
|
||||
2002-12-02 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
|
||||
|
||||
* src/base/ftobjs.c: Modified the logic to get Unicode charmaps.
|
||||
Now it loads UCS-4 charmaps when there is one.
|
||||
* src/base/ftobjs.c (find_unicode_charmap): New function.
|
||||
* src/base/ftobjs.c (open_face): Refer to the above one.
|
||||
* src/base/ftobjs.c (FT_Select_Charmap): Idem.
|
||||
|
||||
2002-11-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
|
||||
|
||||
* include/freetype/ftgzip.h: Correct the name of the controlling
|
||||
macro (was __FTXF86_H__ ...).
|
||||
|
||||
2002-11-27 Vincent Caron <v.caron@zerodeux.net>
|
||||
|
||||
* builds/unix/unix-def.in, builds/unix/freetype-config.in,
|
||||
builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c:
|
||||
Adding support for system zlib installations if available on the
|
||||
target platform (Unix only).
|
||||
|
||||
2002-11-23 David Turner <david@freetype.org>
|
||||
|
||||
* src/cff/cffload.c (cff_charser_load): Modified charset loader to
|
||||
accept pre-defined charsets, even when the font contains fewer
|
||||
glyphs. Also enforced more checks to ensure that we never overflow
|
||||
the character codes array in the encoding.
|
||||
|
||||
2002-11-18 David Turner <david@freetype.org>
|
||||
|
||||
|
||||
* Version 2.1.3 is released.
|
||||
============================
|
||||
|
||||
|
||||
2002-11-07 David Turner <david@freetype.org>
|
||||
|
||||
* src/cache/ftcsbit.c (ftc_sbit_node_load): fixed a small bug that caused
|
||||
problems with embedded bitmaps
|
||||
* src/cache/ftcsbit.c (ftc_sbit_node_load): Fixed a small bug that
|
||||
caused problems with embedded bitmaps.
|
||||
|
||||
* src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
|
||||
src/otlayout/otlgsub.c, src/otlayout/otlgsub.h, src/otlayout/otlparse.c,
|
||||
src/otlayout/otlparse.h, src/otlayout/otlutils.h:
|
||||
* src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
|
||||
src/otlayout/otlgsub.c, src/otlayout/otlgsub.h,
|
||||
src/otlayout/otlparse.c, src/otlayout/otlparse.h,
|
||||
src/otlayout/otlutils.h: Updating the OpenType Layout code, adding
|
||||
support fot the first GSUB lookups. Nothing that really compiles
|
||||
for now though.
|
||||
|
||||
updating the OpenType Layout code, adding support fot the first
|
||||
GSUB lookups. Nothing that really compiles for now though
|
||||
|
||||
* src/autohint/ahhint.c: disabled serif stem width quantization. It
|
||||
produces slightly better shapes though this is not distinguishable
|
||||
with many fonts.
|
||||
* src/autohint/ahhint.c: Disabled serif stem width quantization. It
|
||||
produces slightly better shapes though this is not distinguishable
|
||||
with many fonts.
|
||||
|
||||
2002-11-05 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/config/ftoption.h, src/gzip/ftgzip.c: added
|
||||
support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
|
||||
the use of system-wide zlib.
|
||||
* include/freetype/config/ftoption.h, src/gzip/ftgzip.c: Added
|
||||
support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
|
||||
the use of system-wide zlib.
|
||||
|
||||
Note that this macro, as well as FT_CONFIG_OPTION_BYTECODE_INTERPRETER,
|
||||
is not #undef-ed anymore. This allows the build system to define them
|
||||
depending on the configuration (typically by adding -D flags at
|
||||
compile time).
|
||||
Note that this macro, as well as
|
||||
FT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore.
|
||||
This allows the build system to define them depending on the
|
||||
configuration (typically by adding -D flags at compile time).
|
||||
|
||||
* src/sfnt/ttcmap0.c (tt_face_build_cmaps): removed compiler warnings
|
||||
in optimized mode relative to the "volatile" local variables. This was
|
||||
not a compiler bug after all, but the fact that a pointer to a volatile
|
||||
variable is not the same than a volatile pointer to a variable :-)
|
||||
* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Removed compiler
|
||||
warnings in optimized mode relative to the "volatile" local
|
||||
variables. This was not a compiler bug after all, but the fact that
|
||||
a pointer to a volatile variable is not the same than a volatile
|
||||
pointer to a variable :-)
|
||||
|
||||
the fix was to change "volatile FT_Byte* p"
|
||||
into "FT_Byte* volatile p"
|
||||
The fix was to change
|
||||
`volatile FT_Byte* p'
|
||||
into
|
||||
`FT_Byte* volatile p'.
|
||||
|
||||
* src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c: removed
|
||||
compiler warnings in optimized modes
|
||||
|
||||
* src/gzip/*.[hc]: modified our ZLib copy in order to prevent exporting
|
||||
any zlib function names outside of the component. This prevents linking
|
||||
problems on some platforms, when applications want to link FreeType
|
||||
_and_ ZLib together.
|
||||
* src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c:
|
||||
Removed compiler warnings in optimized modes.
|
||||
|
||||
* src/gzip/*.[hc]: Modified our zlib copy in order to prevent
|
||||
exporting any zlib function names outside of the component. This
|
||||
prevents linking problems on some platforms, when applications want
|
||||
to link FreeType _and_ zlib together.
|
||||
|
||||
2002-11-05 Juliusz <jch@pps.jussieu.fr>
|
||||
|
||||
* src/psaux/psobjs.c (ps_table_add): modified increment loop in
|
||||
order to implement exponential behaviour
|
||||
* src/psaux/psobjs.c (ps_table_add): Modified increment loop in
|
||||
order to implement exponential behaviour.
|
||||
|
||||
2002-10-31 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/ftgzip.h, src/gzip/ftgzip.c:
|
||||
adding support for gzip compressed streams !!
|
||||
* include/freetype/ftgzip.h, src/gzip/ftgzip.c: Adding support for
|
||||
gzip compressed streams.
|
||||
|
||||
* src/pcf/pcfdriver.c: adding automatic support for gzip-compressed
|
||||
PCF files
|
||||
* src/pcf/pcfdriver.c: Adding automatic support for gzip-compressed
|
||||
PCF files.
|
||||
|
||||
2002-10-30 David Turner <david@freetype.org>
|
||||
|
||||
* FreeType 2.1.3rc3 released
|
||||
* FreeType 2.1.3rc3 released
|
||||
|
||||
2002-10-25 David Turner <david@freetype.org>
|
||||
|
||||
|
|
|
@ -100,10 +100,12 @@ if $(DEBUG_HINTER)
|
|||
# We need "freetype2/include" in the current include path in order to
|
||||
# compile any part of FreeType 2.
|
||||
#
|
||||
SubDirHdr += $(FT2_INCLUDE) ;
|
||||
HDRS += $(FT2_INCLUDE) ;
|
||||
|
||||
|
||||
# Uncomment the following line if you want to build individual source files
|
||||
# for each FreeType 2 module.
|
||||
# for each FreeType 2 module. this is only useful during development, and
|
||||
# is better defined as an environment variable anyway !
|
||||
#
|
||||
# FT2_MULTI = true ;
|
||||
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
# FreeType 2 top Jamfile (c) 2001, 2002 David Turner
|
||||
# FreeType 2 top Jamfile (c) 2001-2002 David Turner
|
||||
#
|
||||
|
||||
# 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.
|
||||
|
@ -10,17 +25,71 @@ if $(FT2_TOP) != $(DOT)
|
|||
SubDir FT2_TOP ;
|
||||
}
|
||||
|
||||
FT2_INCLUDE = [ FT2_SubDir include ] ;
|
||||
FT2_SRC = [ FT2_SubDir src ] ;
|
||||
|
||||
FT2_LIB = $(LIBPREFIX)freetype ;
|
||||
|
||||
|
||||
# We don't support libtool just yet. It seems that this is not
|
||||
# so simple with Jam, but I'll study this topic later.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# used only when trying to debug the hinter(s)
|
||||
# name of FreeType include directory during compilation.
|
||||
# relative to FT2_TOP
|
||||
#
|
||||
FT2_INCLUDE_DIR ?= include ;
|
||||
|
||||
# name of FreeType source directory during compilation.
|
||||
# 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. This 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 ?= gzip # support for gzip-compressed files.
|
||||
autohint # auto-hinter
|
||||
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
|
||||
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) ] ;
|
||||
|
||||
# only used by FreeType developers
|
||||
#
|
||||
if $(DEBUG_HINTER)
|
||||
{
|
||||
|
@ -31,7 +100,10 @@ if $(DEBUG_HINTER)
|
|||
# We need "freetype2/include" in the current include path in order to
|
||||
# compile any part of FreeType 2.
|
||||
#
|
||||
SubDirHdr += $(FT2_INCLUDE) ;
|
||||
HDRS += $(FT2_INCLUDE) ;
|
||||
|
||||
|
||||
#SubDirHdr += $(FT2_INCLUDE) ;
|
||||
|
||||
# Uncomment the following line if you want to build individual source files
|
||||
# for each FreeType 2 module.
|
||||
|
@ -51,7 +123,7 @@ HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
|
|||
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
|
||||
|
||||
|
||||
# tests files (hinter debugging)
|
||||
# tests files (hinter debugging). only used by FreeType developers
|
||||
#
|
||||
if $(DEBUG_HINTER)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,19 @@
|
|||
#
|
||||
|
||||
|
||||
# call SubDirHdrs on a list of directories
|
||||
#
|
||||
rule AddSubDirHdrs
|
||||
{
|
||||
local x ;
|
||||
|
||||
for x in $(<)
|
||||
{
|
||||
SubDirHdrs $(x) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Determine prefix of library file. We must use "libxxxxx" on Unix systems,
|
||||
# while all other simply use the real name.
|
||||
#
|
||||
|
@ -39,11 +52,6 @@ rule FT2_SubDir
|
|||
}
|
||||
}
|
||||
|
||||
# The directory "include" must be in the current include path when compiling
|
||||
# any part of FreeType. We thus update the HDRS variable there.
|
||||
#
|
||||
HDRS += [ FT2_SubDir include ] ;
|
||||
|
||||
# We also set ALL_LOCATE_TARGET in order to place all object and library
|
||||
# files in "objs".
|
||||
#
|
||||
|
|
|
@ -2,29 +2,28 @@
|
|||
Special notes to Unix users
|
||||
===========================
|
||||
|
||||
Please read the file "README.UNX", it contains important
|
||||
information regarding the installation of FreeType on Unix
|
||||
systems, especially GNU based operating systems like GNU/Linux.
|
||||
Please read the file "docs/UPGRADE.UNX", it contains important
|
||||
information regarding the installation of FreeType on Unix systems,
|
||||
especially GNU based operating systems like GNU/Linux.
|
||||
|
||||
FreeType 2's library is called `libfreetype', FreeType 1's library
|
||||
is called `libttf'. They are *not* compatible!
|
||||
|
||||
|
||||
FreeType 2.1.3
|
||||
FreeType 2.1.4
|
||||
==============
|
||||
|
||||
Please read the docs/CHANGES file, it contains IMPORTANT
|
||||
INFORMATION.
|
||||
|
||||
Read the files "docs/INSTALL" or "docs/BUILD" for installation
|
||||
instructions.
|
||||
Read the files "docs/INSTALL" for installation instructions.
|
||||
|
||||
Note that the FreeType 2 documentation is now available as a
|
||||
separate package from our sites. See:
|
||||
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.3.tar.bz2
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.3.tar.gz
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdoc213.zip
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.4.tar.bz2
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.4.tar.gz
|
||||
ftp://ftp.freetype.org/pub/freetype2/ftdoc214.zip
|
||||
|
||||
|
||||
Reports
|
||||
|
|
328
reactos/lib/freetype/builds/unix/aclocal.m4
vendored
328
reactos/lib/freetype/builds/unix/aclocal.m4
vendored
|
@ -1,4 +1,18 @@
|
|||
## FreeType specific autoconf tests
|
||||
# generated automatically by aclocal 1.7.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
# serial 1 FT_MUNMAP_DECL
|
||||
|
||||
AC_DEFUN(FT_MUNMAP_DECL,
|
||||
[AC_MSG_CHECKING([whether munmap must be declared])
|
||||
|
@ -13,7 +27,8 @@ ft_cv_munmap_decl=no,
|
|||
ft_cv_munmap_decl=yes)])
|
||||
AC_MSG_RESULT($ft_cv_munmap_decl)
|
||||
if test $ft_cv_munmap_decl = yes; then
|
||||
AC_DEFINE(NEED_MUNMAP_DECL)
|
||||
AC_DEFINE(NEED_MUNMAP_DECL,,
|
||||
[Define to 1 if munmap() is not defined in <sys/mman.h>])
|
||||
fi])
|
||||
|
||||
AC_DEFUN(FT_MUNMAP_PARAM,
|
||||
|
@ -22,33 +37,12 @@ AC_TRY_COMPILE([
|
|||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
int munmap(void *, size_t);],,
|
||||
AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP),
|
||||
AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP,,
|
||||
[Define to 1 if the first argument of munmap is of type void *]),
|
||||
AC_MSG_RESULT([char *]))
|
||||
])
|
||||
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
|
||||
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
|
||||
## Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 46 AC_PROG_LIBTOOL
|
||||
|
||||
|
@ -77,6 +71,8 @@ AC_REQUIRE([AC_PROG_CC])dnl
|
|||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([LT_AC_PROG_SED])dnl
|
||||
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
||||
AC_REQUIRE([AC_OBJEXT])dnl
|
||||
|
@ -244,9 +240,12 @@ hpux*) # Its linker distinguishes data from code symbols
|
|||
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
|
||||
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
|
||||
;;
|
||||
irix*)
|
||||
irix* | nonstopux*)
|
||||
symcode='[[BCDEGRST]]'
|
||||
;;
|
||||
osf*)
|
||||
symcode='[[BCDEGQRST]]'
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
symcode='[[BDT]]'
|
||||
;;
|
||||
|
@ -343,7 +342,7 @@ EOF
|
|||
save_CFLAGS="$CFLAGS"
|
||||
LIBS="conftstm.$ac_objext"
|
||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
|
||||
pipe_works=yes
|
||||
fi
|
||||
LIBS="$save_LIBS"
|
||||
|
@ -837,8 +836,6 @@ fi
|
|||
set dummy $CC
|
||||
compiler="[$]2"
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
AC_MSG_CHECKING([for objdir])
|
||||
rm -f .libs 2>/dev/null
|
||||
mkdir .libs 2>/dev/null
|
||||
|
@ -850,12 +847,8 @@ else
|
|||
fi
|
||||
rmdir .libs 2>/dev/null
|
||||
AC_MSG_RESULT($objdir)
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
AC_ARG_WITH(pic,
|
||||
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
||||
pic_mode="$withval", pic_mode=default)
|
||||
|
@ -893,7 +886,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
|
|||
# like `-m68040'.
|
||||
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
|
@ -936,7 +929,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
|
|||
lt_cv_prog_cc_pic='+Z'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
irix5* | irix6* | nonstopux*)
|
||||
lt_cv_prog_cc_wl='-Wl,'
|
||||
lt_cv_prog_cc_static='-non_shared'
|
||||
# PIC (with -KPIC) is the default.
|
||||
|
@ -980,11 +973,7 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
|
|||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
lt_cv_prog_cc_pic='-KPIC'
|
||||
lt_cv_prog_cc_static='-Bstatic'
|
||||
if test "x$host_vendor" = xsni; then
|
||||
lt_cv_prog_cc_wl='-LD'
|
||||
else
|
||||
lt_cv_prog_cc_wl='-Wl,'
|
||||
fi
|
||||
lt_cv_prog_cc_wl='-Wl,'
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
|
@ -1046,8 +1035,6 @@ else
|
|||
|
||||
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
# Check for any special shared library compilation flags.
|
||||
if test -n "$lt_cv_prog_cc_shlib"; then
|
||||
|
@ -1059,8 +1046,6 @@ if test -n "$lt_cv_prog_cc_shlib"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
|
||||
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
|
||||
lt_cv_prog_cc_static_works=no
|
||||
|
@ -1080,12 +1065,8 @@ wl="$lt_cv_prog_cc_wl"
|
|||
link_static_flag="$lt_cv_prog_cc_static"
|
||||
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
|
||||
can_build_shared="$lt_cv_prog_cc_can_build_shared"
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# Check to see if options -o and -c are simultaneously supported by compiler
|
||||
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
|
||||
AC_CACHE_VAL([lt_cv_compiler_c_o], [
|
||||
|
@ -1153,11 +1134,7 @@ if test x"$compiler_c_o" = x"yes"; then
|
|||
else
|
||||
compiler_o_lo=no
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# Check to see if we can do hard links to lock some files if needed
|
||||
hard_links="nottested"
|
||||
if test "$compiler_c_o" = no && test "$need_locks" != no; then
|
||||
|
@ -1177,11 +1154,7 @@ if test "$compiler_c_o" = no && test "$need_locks" != no; then
|
|||
else
|
||||
need_locks=no
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
if test "$GCC" = yes; then
|
||||
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
|
||||
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
|
||||
|
@ -1207,11 +1180,7 @@ if test "$GCC" = yes; then
|
|||
no_builtin_flag=' -fno-builtin'
|
||||
fi
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# See if the linker supports building shared libraries.
|
||||
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
|
||||
|
||||
|
@ -1369,7 +1338,7 @@ EOF
|
|||
# If the export-symbols file already is a .def file (1st line
|
||||
# is EXPORTS), use it as is.
|
||||
# If DATA tags from a recent dlltool are present, honour them!
|
||||
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
|
||||
archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
|
||||
cp $export_symbols $output_objdir/$soname-def;
|
||||
else
|
||||
echo EXPORTS > $output_objdir/$soname-def;
|
||||
|
@ -1378,6 +1347,7 @@ EOF
|
|||
set dummy \$symbol;
|
||||
case \[$]# in
|
||||
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
|
||||
4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
|
||||
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
|
||||
esac;
|
||||
_lt_hint=`expr 1 + \$_lt_hint`;
|
||||
|
@ -1490,10 +1460,12 @@ else
|
|||
# need to do runtime linking.
|
||||
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
case $ld_flag in
|
||||
*-brtl*)
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
esac
|
||||
|
||||
|
@ -1565,7 +1537,7 @@ else
|
|||
allow_undefined_flag='${wl}-berok'
|
||||
# This is a bit strange, but is similar to how AIX traditionally builds
|
||||
# it's shared libraries.
|
||||
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $output_objdir/$libname$release.a $output_objdir/$soname'
|
||||
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
@ -1607,8 +1579,9 @@ else
|
|||
esac
|
||||
# FIXME: Relying on posixy $() will cause problems for
|
||||
# cross-compilation, but unfortunately the echo tests do not
|
||||
# yet detect zsh echo's removal of \ escapes.
|
||||
archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
|
||||
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
|
||||
# `"' quotes if we put them in here... so don't!
|
||||
archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
|
||||
# We need to add '_' to the symbols in $export_symbols first
|
||||
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
|
||||
hardcode_direct=yes
|
||||
|
@ -1660,13 +1633,14 @@ else
|
|||
export_dynamic_flag_spec='${wl}-E'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
irix5* | irix6* | nonstopux*)
|
||||
if test "$GCC" = yes; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
|
@ -1694,7 +1668,7 @@ else
|
|||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
else
|
||||
|
@ -1704,7 +1678,7 @@ else
|
|||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
|
@ -1816,13 +1790,23 @@ EOF
|
|||
;;
|
||||
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
case $host_vendor in
|
||||
sni)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
## LD is ld it makes a PLAMLIB
|
||||
## CC just makes a GrossModule.
|
||||
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
|
||||
reload_cmds='$CC -r -o $output$reload_objs'
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
runpath_var='LD_RUN_PATH'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
@ -1894,11 +1878,7 @@ EOF
|
|||
fi
|
||||
AC_MSG_RESULT([$ld_shlibs])
|
||||
test "$ld_shlibs" = no && can_build_shared=no
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# Check hardcoding attributes.
|
||||
AC_MSG_CHECKING([how to hardcode library paths into programs])
|
||||
hardcode_action=
|
||||
|
@ -1924,11 +1904,7 @@ else
|
|||
hardcode_action=unsupported
|
||||
fi
|
||||
AC_MSG_RESULT([$hardcode_action])
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
striplib=
|
||||
old_striplib=
|
||||
AC_MSG_CHECKING([whether stripping libraries is possible])
|
||||
|
@ -1939,14 +1915,10 @@ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
|
|||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
test -z "$deplibs_check_method" && deplibs_check_method=unknown
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# PORTME Fill in your ld.so characteristics
|
||||
AC_MSG_CHECKING([dynamic linker characteristics])
|
||||
library_names_spec=
|
||||
|
@ -1975,6 +1947,9 @@ aix3*)
|
|||
|
||||
aix4* | aix5*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
if test "$host_cpu" = ia64; then
|
||||
# AIX 5 supports IA64
|
||||
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
|
||||
|
@ -2013,6 +1988,7 @@ aix4* | aix5*)
|
|||
fi
|
||||
shlibpath_var=LIBPATH
|
||||
fi
|
||||
hardcode_into_libs=yes
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
|
@ -2060,7 +2036,7 @@ cygwin* | mingw* | pw32*)
|
|||
;;
|
||||
yes,mingw*)
|
||||
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
|
||||
|
@ -2143,14 +2119,17 @@ hpux9* | hpux10* | hpux11*)
|
|||
postinstall_cmds='chmod 555 $lib'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
version_type=irix
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case $host_os in
|
||||
nonstopux*) version_type=nonstopux ;;
|
||||
*) version_type=irix ;;
|
||||
esac
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
soname_spec='${libname}${release}.so$major'
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
|
||||
case $host_os in
|
||||
irix5*)
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
|
@ -2254,11 +2233,12 @@ os2*)
|
|||
osf3* | osf4* | osf5*)
|
||||
version_type=osf
|
||||
need_version=no
|
||||
soname_spec='${libname}${release}.so'
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
|
||||
soname_spec='${libname}${release}.so$major'
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
hardcode_into_libs=yes
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
|
@ -2301,6 +2281,12 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
|||
case $host_vendor in
|
||||
sni)
|
||||
shlibpath_overrides_runpath=no
|
||||
need_lib_prefix=no
|
||||
export_dynamic_flag_spec='${wl}-Blargedynsym'
|
||||
runpath_var=LD_RUN_PATH
|
||||
;;
|
||||
siemens)
|
||||
need_lib_prefix=no
|
||||
;;
|
||||
motorola)
|
||||
need_lib_prefix=no
|
||||
|
@ -2342,19 +2328,11 @@ sysv4*MP*)
|
|||
esac
|
||||
AC_MSG_RESULT([$dynamic_linker])
|
||||
test "$dynamic_linker" = no && can_build_shared=no
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# Report the final consequences.
|
||||
AC_MSG_CHECKING([if libtool supports shared libraries])
|
||||
AC_MSG_RESULT([$can_build_shared])
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
AC_MSG_CHECKING([whether to build shared libraries])
|
||||
test "$can_build_shared" = "no" && enable_shared=no
|
||||
|
||||
|
@ -2376,17 +2354,11 @@ aix4*)
|
|||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$enable_shared])
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
AC_MSG_CHECKING([whether to build static libraries])
|
||||
# Make sure either enable_shared or enable_static is yes.
|
||||
test "$enable_shared" = yes || enable_static=yes
|
||||
AC_MSG_RESULT([$enable_static])
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
if test "$hardcode_action" = relink; then
|
||||
# Fast installation is not supported
|
||||
|
@ -2404,8 +2376,6 @@ fi
|
|||
|
||||
AC_LIBTOOL_DLOPEN_SELF
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
if test "$enable_shared" = yes && test "$GCC" = yes; then
|
||||
case $archive_cmds in
|
||||
*'~'*)
|
||||
|
@ -2448,11 +2418,7 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
|
|||
esac
|
||||
fi
|
||||
need_lc=${lt_cv_archive_cmds_need_lc-yes}
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
## FIXME: this should be a separate macro
|
||||
##
|
||||
# The second clause should only fire when bootstrapping the
|
||||
# libtool distribution, otherwise you forgot to ship ltmain.sh
|
||||
# with your package, and you will get complaints that there are
|
||||
|
@ -2475,7 +2441,7 @@ if test -f "$ltmain"; then
|
|||
# Now quote all the things that may contain metacharacters while being
|
||||
# careful not to overquote the AC_SUBSTed values. We take copies of the
|
||||
# variables and quote the copies for generation of the libtool script.
|
||||
for var in echo old_CC old_CFLAGS \
|
||||
for var in echo old_CC old_CFLAGS SED \
|
||||
AR AR_FLAGS CC LD LN_S NM SHELL \
|
||||
reload_flag reload_cmds wl \
|
||||
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
|
||||
|
@ -2537,8 +2503,11 @@ if test -f "$ltmain"; then
|
|||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# A sed that does not truncate output.
|
||||
SED=$lt_SED
|
||||
|
||||
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
|
||||
Xsed="sed -e s/^X//"
|
||||
Xsed="${SED} -e s/^X//"
|
||||
|
||||
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
||||
# if CDPATH is set.
|
||||
|
@ -3002,8 +2971,6 @@ EOF
|
|||
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
|
||||
chmod +x "$ofile"
|
||||
fi
|
||||
##
|
||||
## END FIXME
|
||||
|
||||
])# _LT_AC_LTCONFIG_HACK
|
||||
|
||||
|
@ -3301,7 +3268,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
|
|||
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
||||
# -- PORTME fill in with the dynamic library characteristics
|
||||
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
|
||||
[AC_CACHE_CHECK([how to recognise dependant libraries],
|
||||
[AC_CACHE_CHECK([how to recognise dependent libraries],
|
||||
lt_cv_deplibs_check_method,
|
||||
[lt_cv_file_magic_cmd='$MAGIC_CMD'
|
||||
lt_cv_file_magic_test_file=
|
||||
|
@ -3376,9 +3343,9 @@ hpux10.20*|hpux11*)
|
|||
lt_cv_file_magic_test_file=/usr/lib/libc.sl
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case $host_os in
|
||||
irix5*)
|
||||
irix5* | nonstopux*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
||||
;;
|
||||
|
@ -3400,7 +3367,7 @@ irix5* | irix6*)
|
|||
# This must be Linux ELF.
|
||||
linux-gnu*)
|
||||
case $host_cpu in
|
||||
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
|
||||
alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
|
||||
lt_cv_deplibs_check_method=pass_all ;;
|
||||
*)
|
||||
# glibc up to 2.1.1 does not perform some relocations on ARM
|
||||
|
@ -3471,6 +3438,9 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
|||
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
|
||||
lt_cv_file_magic_test_file=/lib/libc.so
|
||||
;;
|
||||
siemens)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -3536,12 +3506,12 @@ esac
|
|||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library and INCLTDL to the include flags for
|
||||
# the libltdl convenience library and LTDLINCL to the include flags for
|
||||
# the libltdl header and adds --enable-ltdl-convenience to the
|
||||
# configure arguments. Note that LIBLTDL and INCLTDL are not
|
||||
# configure arguments. Note that LIBLTDL and LTDLINCL are not
|
||||
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
||||
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
||||
# with '${top_builddir}/' and INCLTDL will be prefixed with
|
||||
# with '${top_builddir}/' and LTDLINCL will be prefixed with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
|
@ -3553,16 +3523,18 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
|||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
||||
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
# For backwards non-gettext consistent compatibility...
|
||||
INCLTDL="$LTDLINCL"
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library and INCLTDL to the include flags for
|
||||
# the libltdl installable library and LTDLINCL to the include flags for
|
||||
# the libltdl header and adds --enable-ltdl-install to the configure
|
||||
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
||||
# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
|
||||
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
||||
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
||||
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
||||
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
|
||||
# with '${top_srcdir}/' (note the single quotes!). If your package is
|
||||
# not flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
|
@ -3580,12 +3552,14 @@ AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
|
|||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
||||
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
LTDLINCL=
|
||||
fi
|
||||
# For backwards non-gettext consistent compatibility...
|
||||
INCLTDL="$LTDLINCL"
|
||||
])
|
||||
|
||||
# old names
|
||||
|
@ -3599,3 +3573,93 @@ AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
|
|||
|
||||
# This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])
|
||||
|
||||
# NOTE: This macro has been submitted for inclusion into #
|
||||
# GNU Autoconf as AC_PROG_SED. When it is available in #
|
||||
# a released version of Autoconf we should remove this #
|
||||
# macro and use it instead. #
|
||||
# LT_AC_PROG_SED
|
||||
# --------------
|
||||
# Check for a fully-functional sed program, that truncates
|
||||
# as few characters as possible. Prefer GNU sed if found.
|
||||
AC_DEFUN([LT_AC_PROG_SED],
|
||||
[AC_MSG_CHECKING([for a sed that does not truncate output])
|
||||
AC_CACHE_VAL(lt_cv_path_SED,
|
||||
[# Loop through the user's path and test for sed and gsed.
|
||||
# Then use that list of sed's as ones to test for truncation.
|
||||
as_executable_p="test -f"
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in sed gsed; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
|
||||
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
# Create a temporary directory, and hook for its removal unless debugging.
|
||||
$debug ||
|
||||
{
|
||||
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
|
||||
trap '{ (exit 1); exit 1; }' 1 2 13 15
|
||||
}
|
||||
|
||||
# Create a (secure) tmp directory for tmp files.
|
||||
: ${TMPDIR=/tmp}
|
||||
{
|
||||
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
|
||||
test -n "$tmp" && test -d "$tmp"
|
||||
} ||
|
||||
{
|
||||
tmp=$TMPDIR/sed$$-$RANDOM
|
||||
(umask 077 && mkdir $tmp)
|
||||
} ||
|
||||
{
|
||||
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
|
||||
{ (exit 1); exit 1; }
|
||||
}
|
||||
_max=0
|
||||
_count=0
|
||||
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
|
||||
# along with /bin/sed that truncates output.
|
||||
for _sed in $_sed_list /usr/xpg4/bin/sed; do
|
||||
test ! -f ${_sed} && break
|
||||
cat /dev/null > "$tmp/sed.in"
|
||||
_count=0
|
||||
echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
|
||||
# Check for GNU sed and select it if it is found.
|
||||
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
|
||||
lt_cv_path_SED=${_sed}
|
||||
break
|
||||
fi
|
||||
while true; do
|
||||
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
|
||||
mv "$tmp/sed.tmp" "$tmp/sed.in"
|
||||
cp "$tmp/sed.in" "$tmp/sed.nl"
|
||||
echo >>"$tmp/sed.nl"
|
||||
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
|
||||
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
|
||||
# 40000 chars as input seems more than enough
|
||||
test $_count -gt 10 && break
|
||||
_count=`expr $_count + 1`
|
||||
if test $_count -gt $_max; then
|
||||
_max=$_count
|
||||
lt_cv_path_SED=$_sed
|
||||
fi
|
||||
done
|
||||
done
|
||||
rm -rf "$tmp"
|
||||
])
|
||||
if test "X$SED" != "X"; then
|
||||
lt_cv_path_SED=$SED
|
||||
else
|
||||
SED=$lt_cv_path_SED
|
||||
fi
|
||||
AC_MSG_RESULT([$SED])
|
||||
])
|
||||
|
||||
|
|
160
reactos/lib/freetype/builds/unix/config.guess
vendored
160
reactos/lib/freetype/builds/unix/config.guess
vendored
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-09-03'
|
||||
timestamp='2003-01-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -98,30 +98,31 @@ trap 'exit 1' 1 2 15
|
|||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# This shell variable is my proudest work .. or something. --bje
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
|
||||
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|
||||
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
|
||||
dummy=$tmpdir/dummy ;
|
||||
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
|
||||
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $files ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac ;
|
||||
unset files'
|
||||
esac ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
|
@ -178,7 +179,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
|
@ -223,6 +235,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:MicroBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
|
@ -257,7 +272,7 @@ main:
|
|||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `$dummy` in
|
||||
0-0)
|
||||
|
@ -286,7 +301,6 @@ EOF
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
|
@ -437,10 +451,9 @@ EOF
|
|||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
&& exit 0
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
|
@ -449,7 +462,7 @@ EOF
|
|||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS)
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
|
@ -524,8 +537,7 @@ EOF
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
|
@ -623,11 +635,21 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
|
@ -661,8 +683,7 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
|
@ -720,15 +741,15 @@ EOF
|
|||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
|
@ -756,7 +777,6 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
|
@ -769,13 +789,16 @@ EOF
|
|||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i386-pc-interix3
|
||||
echo i586-pc-interix3
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
echo i586-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
|
@ -818,8 +841,26 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
|
@ -914,7 +955,6 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c && rmdir $tmpdir
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
|
@ -932,6 +972,23 @@ EOF
|
|||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
|
@ -966,9 +1023,6 @@ EOF
|
|||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
|
@ -995,9 +1049,12 @@ EOF
|
|||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
|
@ -1014,9 +1071,6 @@ EOF
|
|||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
@ -1098,7 +1152,11 @@ EOF
|
|||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
case `uname -p` in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
|
@ -1134,11 +1192,6 @@ EOF
|
|||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
|
@ -1157,12 +1210,6 @@ EOF
|
|||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
|
@ -1283,8 +1330,7 @@ main ()
|
|||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
|
||||
rm -f $dummy.c $dummy && rmdir $tmpdir
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
|
35
reactos/lib/freetype/builds/unix/config.sub
vendored
35
reactos/lib/freetype/builds/unix/config.sub
vendored
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-09-05'
|
||||
timestamp='2003-01-03'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -118,7 +118,7 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
|
@ -245,11 +245,13 @@ case $basic_machine in
|
|||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
|
@ -315,11 +317,13 @@ case $basic_machine in
|
|||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39 | mipstx39el \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
|
@ -716,6 +720,10 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -901,10 +909,6 @@ case $basic_machine in
|
|||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3d)
|
||||
basic_machine=alpha-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
|
@ -977,10 +981,6 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
|
@ -1113,11 +1113,12 @@ case $os in
|
|||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -microbsd*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
@ -1129,8 +1130,10 @@ case $os in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
|
|
1649
reactos/lib/freetype/builds/unix/configure
vendored
1649
reactos/lib/freetype/builds/unix/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@ dnl configuration file -- stay in 8.3 limit
|
|||
AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
|
||||
|
||||
dnl Don't forget to update VERSION.DLL!
|
||||
version_info='9:2:3'
|
||||
version_info='9:3:3'
|
||||
AC_SUBST(version_info)
|
||||
ft_version=`echo $version_info | tr : .`
|
||||
AC_SUBST(ft_version)
|
||||
|
@ -81,6 +81,25 @@ AC_SUBST(FTSYS_SRC)
|
|||
|
||||
AC_CHECK_FUNCS(memcpy memmove)
|
||||
|
||||
|
||||
dnl Check for system zlib
|
||||
AC_ARG_WITH(zlib,
|
||||
[ --without-zlib use internal zlib instead of system-wide])
|
||||
if test x$with_zlib != xno && test -z "$LIBZ"; then
|
||||
AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h, LIBZ='-lz')])
|
||||
fi
|
||||
if test x$with_zlib != xno && test -n "$LIBZ"; then
|
||||
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
||||
LDFLAGS="$LDFLAGS $LIBZ"
|
||||
SYSTEM_ZLIB=yes
|
||||
fi
|
||||
AC_SUBST(LIBZ)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(SYSTEM_ZLIB)
|
||||
|
||||
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
|
||||
|
|
|
@ -88,7 +88,7 @@ if test "$echo_cflags" = "yes" ; then
|
|||
fi
|
||||
|
||||
if test "$echo_libs" = "yes" ; then
|
||||
libs="-lfreetype"
|
||||
libs="-lfreetype @LIBZ@"
|
||||
if test "@libdir@" != "/usr/lib" ; then
|
||||
echo -L@libdir@ $libs
|
||||
else
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# This originally came from X11R5 (mit/util/scripts/install.sh).
|
||||
|
||||
scriptversion=2003-01-17.15
|
||||
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
# (FSF changes in the public domain.)
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
|
@ -23,13 +25,11 @@
|
|||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
|
@ -41,210 +41,229 @@ stripprog="${STRIPPROG-strip}"
|
|||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
transformbasename=
|
||||
transform_arg=
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
|
||||
or: $0 -d DIR1 DIR2...
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
|
||||
In the second, create the directory path DIR.
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
Options:
|
||||
-b=TRANSFORMBASENAME
|
||||
-c copy source (using $cpprog) instead of moving (using $mvprog).
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrp installed files to GROUP.
|
||||
-m MODE $chmod installed files to MODE.
|
||||
-o USER $chown installed files to USER.
|
||||
-s strip installed files (using $stripprog).
|
||||
-t=TRANSFORM
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
--help) echo "$usage"; exit 0;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit 0;;
|
||||
|
||||
*) if test -z "$src"; then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
if test -z "$src"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
instcmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test -z "$dst"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
# (this part is taken from Noah Friedman's mkinstalldirs script.)
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
pathcomp=
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
test -d "$pathcomp" || $mkdirprog "$pathcomp"
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $instcmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
if test -z "$transformarg"; then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename \
|
||||
| sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
# don't allow the sed command to completely eliminate the filename.
|
||||
test -z "$dstfile" && dstfile=`basename "$dst"`
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
# Move or copy the file name to the temp name
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
# Now remove or move aside any old file at destination location. We
|
||||
# try this two ways since rm can't unlink itself on some systems and
|
||||
# the destination file might be busy for other reasons. In this case,
|
||||
# the final cleanup might fail but the new file should still install
|
||||
# successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
|
||||
exit 0
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
|
|
|
@ -49,14 +49,14 @@ EOF
|
|||
fi
|
||||
|
||||
# The name of this program.
|
||||
progname=`$echo "$0" | sed 's%^.*/%%'`
|
||||
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
|
||||
modename="$progname"
|
||||
|
||||
# Constants.
|
||||
PROGRAM=ltmain.sh
|
||||
PACKAGE=libtool
|
||||
VERSION=1.4.2
|
||||
TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
|
||||
VERSION=1.4.3
|
||||
TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
|
||||
|
||||
default_mode=
|
||||
help="Try \`$progname --help' for more information."
|
||||
|
@ -67,10 +67,19 @@ rm="rm -f"
|
|||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
Xsed='sed -e 1s/^X//'
|
||||
Xsed="${SED}"' -e 1s/^X//'
|
||||
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
||||
SP2NL='tr \040 \012'
|
||||
NL2SP='tr \015\012 \040\040'
|
||||
# test EBCDIC or ASCII
|
||||
case `echo A|od -x` in
|
||||
*[Cc]1*) # EBCDIC based system
|
||||
SP2NL="tr '\100' '\n'"
|
||||
NL2SP="tr '\r\n' '\100\100'"
|
||||
;;
|
||||
*) # Assume ASCII based system
|
||||
SP2NL="tr '\040' '\012'"
|
||||
NL2SP="tr '\015\012' '\040\040'"
|
||||
;;
|
||||
esac
|
||||
|
||||
# NLS nuisances.
|
||||
# Only set LANG and LC_ALL to C if already set.
|
||||
|
@ -144,7 +153,7 @@ do
|
|||
;;
|
||||
|
||||
--config)
|
||||
sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
||||
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
|
||||
exit 0
|
||||
;;
|
||||
|
||||
|
@ -177,6 +186,8 @@ do
|
|||
--mode) prevopt="--mode" prev=mode ;;
|
||||
--mode=*) mode="$optarg" ;;
|
||||
|
||||
--preserve-dup-deps) duplicate_deps="yes" ;;
|
||||
|
||||
--quiet | --silent)
|
||||
show=:
|
||||
;;
|
||||
|
@ -215,7 +226,7 @@ if test -z "$show_help"; then
|
|||
# Infer the operation mode.
|
||||
if test -z "$mode"; then
|
||||
case $nonopt in
|
||||
*cc | *++ | gcc* | *-gcc*)
|
||||
*cc | *++ | gcc* | *-gcc* | xlc*)
|
||||
mode=link
|
||||
for arg
|
||||
do
|
||||
|
@ -467,7 +478,7 @@ if test -z "$show_help"; then
|
|||
pic_mode=default
|
||||
;;
|
||||
esac
|
||||
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
|
||||
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
|
||||
# non-PIC code in shared libraries is not supported
|
||||
pic_mode=default
|
||||
fi
|
||||
|
@ -992,7 +1003,7 @@ compiler."
|
|||
# so, if we see these flags be careful not to treat them like -L
|
||||
-L[A-Z][A-Z]*:*)
|
||||
case $with_gcc/$host in
|
||||
no/*-*-irix*)
|
||||
no/*-*-irix* | no/*-*-nonstopux*)
|
||||
compile_command="$compile_command $arg"
|
||||
finalize_command="$finalize_command $arg"
|
||||
;;
|
||||
|
@ -1043,14 +1054,14 @@ compiler."
|
|||
# These systems don't actually have a C library (as such)
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
*-*-openbsd* | *-*-freebsd*)
|
||||
# Do not include libc due to us having libc/libc_r.
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
esac
|
||||
elif test "X$arg" = "X-lc_r"; then
|
||||
case $host in
|
||||
*-*-openbsd*)
|
||||
*-*-openbsd* | *-*-freebsd*)
|
||||
# Do not include libc_r directly, use -pthread flag.
|
||||
continue
|
||||
;;
|
||||
|
@ -1330,9 +1341,11 @@ compiler."
|
|||
# Find all interdependent deplibs by searching for libraries
|
||||
# that are linked more than once (e.g. -la -lb -la)
|
||||
for deplib in $deplibs; do
|
||||
case "$libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
if test "X$duplicate_deps" = "Xyes" ; then
|
||||
case "$libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
fi
|
||||
libs="$libs $deplib"
|
||||
done
|
||||
deplibs=
|
||||
|
@ -1461,10 +1474,12 @@ compiler."
|
|||
lib)
|
||||
if test "$deplibs_check_method" != pass_all; then
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $deplib."
|
||||
echo "*** Warning: Trying to link with static lib archive $deplib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
echo "*** shared version of the library, which you do not appear to have"
|
||||
echo "*** because the file extensions .$libext of this argument makes me believe"
|
||||
echo "*** that it is just a static archive that I should not used here."
|
||||
else
|
||||
echo
|
||||
echo "*** Warning: Linking the shared library $output against the"
|
||||
|
@ -1508,7 +1523,7 @@ compiler."
|
|||
fi
|
||||
|
||||
# Check to see that this really is a libtool archive.
|
||||
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
else
|
||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
|
@ -1555,9 +1570,11 @@ compiler."
|
|||
tmp_libs=
|
||||
for deplib in $dependency_libs; do
|
||||
deplibs="$deplib $deplibs"
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
if test "X$duplicate_deps" = "Xyes" ; then
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
fi
|
||||
tmp_libs="$tmp_libs $deplib"
|
||||
done
|
||||
elif test $linkmode != prog && test $linkmode != lib; then
|
||||
|
@ -1680,9 +1697,11 @@ compiler."
|
|||
# or/and link against static libraries
|
||||
newdependency_libs="$deplib $newdependency_libs"
|
||||
fi
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
if test "X$duplicate_deps" = "Xyes" ; then
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
fi
|
||||
tmp_libs="$tmp_libs $deplib"
|
||||
done # for deplib
|
||||
continue
|
||||
|
@ -1766,8 +1785,8 @@ compiler."
|
|||
|
||||
# Make a new name for the extract_expsyms_cmds to use
|
||||
soroot="$soname"
|
||||
soname=`echo $soroot | sed -e 's/^.*\///'`
|
||||
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
|
||||
soname=`echo $soroot | ${SED} -e 's/^.*\///'`
|
||||
newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
|
||||
|
||||
# If the library has no export list, then create one now
|
||||
if test -f "$output_objdir/$soname-def"; then :
|
||||
|
@ -1926,13 +1945,14 @@ compiler."
|
|||
# Just print a warning and add the library to dependency_libs so
|
||||
# that the program can be linked against the static library.
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $lib."
|
||||
echo "*** Warning: This system can not link to static lib archive $lib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
if test "$module" = yes; then
|
||||
echo "*** Therefore, libtool will create a static module, that should work "
|
||||
echo "*** as long as the dlopening application is linked with the -dlopen flag."
|
||||
echo "*** But as you try to build a module library, libtool will still create "
|
||||
echo "*** a static module, that should work as long as the dlopening application"
|
||||
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
|
||||
if test -z "$global_symbol_pipe"; then
|
||||
echo
|
||||
echo "*** However, this would only work if libtool was able to extract symbol"
|
||||
|
@ -1981,9 +2001,11 @@ compiler."
|
|||
tmp_libs=
|
||||
for deplib in $dependency_libs; do
|
||||
newdependency_libs="$deplib $newdependency_libs"
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
if test "X$duplicate_deps" = "Xyes" ; then
|
||||
case "$tmp_libs " in
|
||||
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
||||
esac
|
||||
fi
|
||||
tmp_libs="$tmp_libs $deplib"
|
||||
done
|
||||
|
||||
|
@ -2009,7 +2031,7 @@ compiler."
|
|||
if grep "^installed=no" $deplib > /dev/null; then
|
||||
path="-L$absdir/$objdir"
|
||||
else
|
||||
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
if test -z "$libdir"; then
|
||||
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
|
@ -2273,16 +2295,21 @@ compiler."
|
|||
versuffix=".$current";
|
||||
;;
|
||||
|
||||
irix)
|
||||
irix | nonstopux)
|
||||
major=`expr $current - $age + 1`
|
||||
verstring="sgi$major.$revision"
|
||||
|
||||
case $version_type in
|
||||
nonstopux) verstring_prefix=nonstopux ;;
|
||||
*) verstring_prefix=sgi ;;
|
||||
esac
|
||||
verstring="$verstring_prefix$major.$revision"
|
||||
|
||||
# Add in all the interfaces that we are compatible with.
|
||||
loop=$revision
|
||||
while test $loop != 0; do
|
||||
iface=`expr $revision - $loop`
|
||||
loop=`expr $loop - 1`
|
||||
verstring="sgi$major.$iface:$verstring"
|
||||
verstring="$verstring_prefix$major.$iface:$verstring"
|
||||
done
|
||||
|
||||
# Before this point, $major must not contain `.'.
|
||||
|
@ -2296,7 +2323,7 @@ compiler."
|
|||
;;
|
||||
|
||||
osf)
|
||||
major=`expr $current - $age`
|
||||
major=.`expr $current - $age`
|
||||
versuffix=".$current.$age.$revision"
|
||||
verstring="$current.$age.$revision"
|
||||
|
||||
|
@ -2388,9 +2415,9 @@ compiler."
|
|||
|
||||
# Eliminate all temporary directories.
|
||||
for path in $notinst_path; do
|
||||
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
|
||||
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
|
||||
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
|
||||
lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
|
||||
deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
|
||||
dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
|
||||
done
|
||||
|
||||
if test -n "$xrpath"; then
|
||||
|
@ -2441,7 +2468,7 @@ compiler."
|
|||
*-*-netbsd*)
|
||||
# Don't link with libc until the a.out ld.so is fixed.
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
*-*-openbsd* | *-*-freebsd*)
|
||||
# Do not include libc due to us having libc/libc_r.
|
||||
;;
|
||||
*)
|
||||
|
@ -2502,18 +2529,20 @@ EOF
|
|||
else
|
||||
droppeddeps=yes
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** Warning: dynamic linker does not accept needed library $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
echo "*** shared version of the library, which I believe you do not have"
|
||||
echo "*** because a test_compile did reveal that the linker did not use it for"
|
||||
echo "*** its dynamic dependency list that programs get resolved with at runtime."
|
||||
fi
|
||||
else
|
||||
newdeplibs="$newdeplibs $i"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Error occured in the first compile. Let's try to salvage the situation:
|
||||
# Compile a seperate program for each library.
|
||||
# Error occured in the first compile. Let's try to salvage
|
||||
# the situation: Compile a separate program for each library.
|
||||
for i in $deplibs; do
|
||||
name="`expr $i : '-l\(.*\)'`"
|
||||
# If $name is empty we are operating on a -L argument.
|
||||
|
@ -2532,10 +2561,12 @@ EOF
|
|||
else
|
||||
droppeddeps=yes
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $i."
|
||||
echo "*** Warning: dynamic linker does not accept needed library $i."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
echo "*** shared version of the library, which you do not appear to have"
|
||||
echo "*** because a test_compile did reveal that the linker did not use this one"
|
||||
echo "*** as a dynamic dependency that programs can get resolved with at runtime."
|
||||
fi
|
||||
else
|
||||
droppeddeps=yes
|
||||
|
@ -2574,14 +2605,14 @@ EOF
|
|||
# but so what?
|
||||
potlib="$potent_lib"
|
||||
while test -h "$potlib" 2>/dev/null; do
|
||||
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
|
||||
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
|
||||
case $potliblink in
|
||||
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
|
||||
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
|
||||
esac
|
||||
done
|
||||
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
|
||||
| sed 10q \
|
||||
| ${SED} 10q \
|
||||
| egrep "$file_magic_regex" > /dev/null; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
|
@ -2592,10 +2623,17 @@ EOF
|
|||
if test -n "$a_deplib" ; then
|
||||
droppeddeps=yes
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
||||
echo "*** Warning: linker path does not have real file for library $a_deplib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
echo "*** shared version of the library, which you do not appear to have"
|
||||
echo "*** because I did check the linker path looking for a file starting"
|
||||
if test -z "$potlib" ; then
|
||||
echo "*** with $libname but no candidates were found. (...for file magic test)"
|
||||
else
|
||||
echo "*** with $libname and none of the candidates passed a file format test"
|
||||
echo "*** using a file magic. Last file checked: $potlib"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Add a -L argument.
|
||||
|
@ -2614,8 +2652,9 @@ EOF
|
|||
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
|
||||
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
|
||||
for potent_lib in $potential_libs; do
|
||||
potlib="$potent_lib" # see symlink-check below in file_magic test
|
||||
if eval echo \"$potent_lib\" 2>/dev/null \
|
||||
| sed 10q \
|
||||
| ${SED} 10q \
|
||||
| egrep "$match_pattern_regex" > /dev/null; then
|
||||
newdeplibs="$newdeplibs $a_deplib"
|
||||
a_deplib=""
|
||||
|
@ -2626,10 +2665,17 @@ EOF
|
|||
if test -n "$a_deplib" ; then
|
||||
droppeddeps=yes
|
||||
echo
|
||||
echo "*** Warning: This library needs some functionality provided by $a_deplib."
|
||||
echo "*** Warning: linker path does not have real file for library $a_deplib."
|
||||
echo "*** I have the capability to make that library automatically link in when"
|
||||
echo "*** you link to this library. But I can only do this if you have a"
|
||||
echo "*** shared version of the library, which you do not appear to have."
|
||||
echo "*** shared version of the library, which you do not appear to have"
|
||||
echo "*** because I did check the linker path looking for a file starting"
|
||||
if test -z "$potlib" ; then
|
||||
echo "*** with $libname but no candidates were found. (...for regex pattern test)"
|
||||
else
|
||||
echo "*** with $libname and none of the candidates passed a file format test"
|
||||
echo "*** using a regex pattern. Last file checked: $potlib"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Add a -L argument.
|
||||
|
@ -2894,7 +2940,18 @@ EOF
|
|||
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
||||
eval cmds=\"$archive_expsym_cmds\"
|
||||
else
|
||||
save_deplibs="$deplibs"
|
||||
for conv in $convenience; do
|
||||
tmp_deplibs=
|
||||
for test_deplib in $deplibs; do
|
||||
if test "$test_deplib" != "$conv"; then
|
||||
tmp_deplibs="$tmp_deplibs $test_deplib"
|
||||
fi
|
||||
done
|
||||
deplibs="$tmp_deplibs"
|
||||
done
|
||||
eval cmds=\"$archive_cmds\"
|
||||
deplibs="$save_deplibs"
|
||||
fi
|
||||
save_ifs="$IFS"; IFS='~'
|
||||
for cmd in $cmds; do
|
||||
|
@ -3093,7 +3150,7 @@ EOF
|
|||
|
||||
prog)
|
||||
case $host in
|
||||
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
|
||||
*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
|
||||
esac
|
||||
if test -n "$vinfo"; then
|
||||
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
|
||||
|
@ -3115,6 +3172,13 @@ EOF
|
|||
# On Rhapsody replace the C library is the System framework
|
||||
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
||||
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
|
||||
case $host in
|
||||
*darwin*)
|
||||
# Don't allow lazy linking, it breaks C++ global constructors
|
||||
compile_command="$compile_command ${wl}-bind_at_load"
|
||||
finalize_command="$finalize_command ${wl}-bind_at_load"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -3281,9 +3345,9 @@ extern \"C\" {
|
|||
if test -z "$export_symbols"; then
|
||||
export_symbols="$output_objdir/$output.exp"
|
||||
$run $rm $export_symbols
|
||||
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
else
|
||||
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
||||
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
||||
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
|
||||
$run eval 'mv "$nlist"T "$nlist"'
|
||||
fi
|
||||
|
@ -3291,7 +3355,7 @@ extern \"C\" {
|
|||
|
||||
for arg in $dlprefiles; do
|
||||
$show "extracting global C symbols from \`$arg'"
|
||||
name=`echo "$arg" | sed -e 's%^.*/%%'`
|
||||
name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
|
||||
$run eval 'echo ": $name " >> "$nlist"'
|
||||
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
|
||||
done
|
||||
|
@ -3306,7 +3370,13 @@ extern \"C\" {
|
|||
fi
|
||||
|
||||
# Try sorting and uniquifying the output.
|
||||
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
|
||||
if grep -v "^: " < "$nlist" |
|
||||
if sort -k 3 </dev/null >/dev/null 2>&1; then
|
||||
sort -k 3
|
||||
else
|
||||
sort +2
|
||||
fi |
|
||||
uniq > "$nlist"S; then
|
||||
:
|
||||
else
|
||||
grep -v "^: " < "$nlist" > "$nlist"S
|
||||
|
@ -3528,7 +3598,7 @@ static const void *lt_preloaded_setup() {
|
|||
relink_command="$var=\"$var_value\"; export $var; $relink_command"
|
||||
fi
|
||||
done
|
||||
relink_command="cd `pwd`; $relink_command"
|
||||
relink_command="(cd `pwd`; $relink_command)"
|
||||
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
||||
fi
|
||||
|
||||
|
@ -3548,7 +3618,7 @@ static const void *lt_preloaded_setup() {
|
|||
# win32 will think the script is a binary if it has
|
||||
# a .exe suffix, so we strip it off here.
|
||||
case $output in
|
||||
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
|
||||
*.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
|
||||
esac
|
||||
# test for cygwin because mv fails w/o .exe extensions
|
||||
case $host in
|
||||
|
@ -3572,7 +3642,7 @@ static const void *lt_preloaded_setup() {
|
|||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
Xsed='sed -e 1s/^X//'
|
||||
Xsed="${SED}"' -e 1s/^X//'
|
||||
sed_quote_subst='$sed_quote_subst'
|
||||
|
||||
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
||||
|
@ -3610,7 +3680,7 @@ else
|
|||
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
|
||||
|
||||
# Follow symbolic links until we get to the real thisdir.
|
||||
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
|
||||
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
|
||||
while test -n \"\$file\"; do
|
||||
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
|
||||
|
||||
|
@ -3623,7 +3693,7 @@ else
|
|||
fi
|
||||
|
||||
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
|
||||
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
|
||||
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
|
||||
done
|
||||
|
||||
# Try to get the absolute directory name.
|
||||
|
@ -3637,7 +3707,7 @@ else
|
|||
progdir=\"\$thisdir/$objdir\"
|
||||
|
||||
if test ! -f \"\$progdir/\$program\" || \\
|
||||
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
|
||||
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
|
||||
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
||||
|
||||
file=\"\$\$-\$program\"
|
||||
|
@ -3683,7 +3753,7 @@ else
|
|||
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
|
||||
|
||||
# Some systems cannot cope with colon-terminated $shlibpath_var
|
||||
# The second colon is a workaround for a bug in BeOS R4 sed
|
||||
# The second colon is a workaround for a bug in BeOS R4 ${SED}
|
||||
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
|
||||
|
||||
export $shlibpath_var
|
||||
|
@ -3858,7 +3928,7 @@ fi\
|
|||
fi
|
||||
done
|
||||
# Quote the link command for shipping.
|
||||
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
|
||||
relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
|
||||
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
|
||||
|
||||
# Only create the output if not a dry run.
|
||||
|
@ -3875,7 +3945,7 @@ fi\
|
|||
case $deplib in
|
||||
*.la)
|
||||
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
|
||||
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
if test -z "$libdir"; then
|
||||
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
|
@ -3889,7 +3959,7 @@ fi\
|
|||
newdlfiles=
|
||||
for lib in $dlfiles; do
|
||||
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
||||
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
if test -z "$libdir"; then
|
||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
|
@ -3900,7 +3970,7 @@ fi\
|
|||
newdlprefiles=
|
||||
for lib in $dlprefiles; do
|
||||
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
|
||||
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
|
||||
if test -z "$libdir"; then
|
||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||
exit 1
|
||||
|
@ -4124,7 +4194,7 @@ relink_command=\"$relink_command\""
|
|||
|
||||
*.la)
|
||||
# Check to see that this really is a libtool archive.
|
||||
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
else
|
||||
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
|
||||
$echo "$help" 1>&2
|
||||
|
@ -4273,19 +4343,27 @@ relink_command=\"$relink_command\""
|
|||
fi
|
||||
|
||||
# Do a test to see if this is really a libtool program.
|
||||
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
case $host in
|
||||
*cygwin*|*mingw*)
|
||||
wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
|
||||
;;
|
||||
*)
|
||||
wrapper=$file
|
||||
;;
|
||||
esac
|
||||
if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
|
||||
notinst_deplibs=
|
||||
relink_command=
|
||||
|
||||
# If there is no directory component, then add one.
|
||||
case $file in
|
||||
*/* | *\\*) . $file ;;
|
||||
*) . ./$file ;;
|
||||
*/* | *\\*) . $wrapper ;;
|
||||
*) . ./$wrapper ;;
|
||||
esac
|
||||
|
||||
# Check the variables that should have been set.
|
||||
if test -z "$notinst_deplibs"; then
|
||||
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
|
||||
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -4310,8 +4388,8 @@ relink_command=\"$relink_command\""
|
|||
relink_command=
|
||||
# If there is no directory component, then add one.
|
||||
case $file in
|
||||
*/* | *\\*) . $file ;;
|
||||
*) . ./$file ;;
|
||||
*/* | *\\*) . $wrapper ;;
|
||||
*) . ./$wrapper ;;
|
||||
esac
|
||||
|
||||
outputname=
|
||||
|
@ -4359,7 +4437,7 @@ relink_command=\"$relink_command\""
|
|||
destfile=$destfile.exe
|
||||
;;
|
||||
*:*.exe)
|
||||
destfile=`echo $destfile | sed -e 's,.exe$,,'`
|
||||
destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -4507,7 +4585,7 @@ relink_command=\"$relink_command\""
|
|||
case $file in
|
||||
*.la)
|
||||
# Check to see that this really is a libtool archive.
|
||||
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
|
||||
else
|
||||
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
|
||||
$echo "$help" 1>&2
|
||||
|
@ -4578,7 +4656,7 @@ relink_command=\"$relink_command\""
|
|||
-*) ;;
|
||||
*)
|
||||
# Do a test to see if this is really a libtool program.
|
||||
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
# If there is no directory component, then add one.
|
||||
case $file in
|
||||
*/* | *\\*) . $file ;;
|
||||
|
@ -4610,7 +4688,7 @@ relink_command=\"$relink_command\""
|
|||
fi
|
||||
|
||||
# Now prepare to actually exec the command.
|
||||
exec_cmd='"$cmd"$args'
|
||||
exec_cmd="\$cmd$args"
|
||||
else
|
||||
# Display what would be done.
|
||||
if test -n "$shlibpath_var"; then
|
||||
|
@ -4687,7 +4765,7 @@ relink_command=\"$relink_command\""
|
|||
case $name in
|
||||
*.la)
|
||||
# Possibly a libtool archive, so verify it.
|
||||
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
. $dir/$name
|
||||
|
||||
# Delete the libtool libraries and symlinks.
|
||||
|
@ -4742,7 +4820,7 @@ relink_command=\"$relink_command\""
|
|||
*)
|
||||
# Do a test to see if this is a libtool program.
|
||||
if test $mode = clean &&
|
||||
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
(${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
||||
relink_command=
|
||||
. $dir/$file
|
||||
|
||||
|
|
|
@ -4,37 +4,108 @@
|
|||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.1 2003/04/01 08:38:30 gvg Exp $
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
|
|
@ -78,6 +78,7 @@ LDFLAGS := @LDFLAGS@
|
|||
# Library linking
|
||||
#
|
||||
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
|
||||
-rpath $(libdir) -version-info $(version_info)
|
||||
-rpath $(libdir) -version-info $(version_info) \
|
||||
$(LDFLAGS)
|
||||
|
||||
# EOF
|
||||
|
|
|
@ -85,6 +85,12 @@ endif
|
|||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
|
||||
# The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
|
||||
# with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
|
||||
# ftgzip module is not compiled in.
|
||||
SYSTEM_ZLIB := @SYSTEM_ZLIB@
|
||||
|
||||
|
||||
# The NO_OUTPUT macro is appended to command lines in order to ignore
|
||||
# the output of some programs.
|
||||
#
|
||||
|
|
|
@ -58,98 +58,4 @@ ifeq ($(PLATFORM),win32)
|
|||
|
||||
ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
|
||||
dump_target_list:
|
||||
@echo ÿ
|
||||
@echo $(PROJECT_TITLE) build system -- supported compilers
|
||||
@echo ÿ
|
||||
@echo Several command-line compilers are supported on Win32:
|
||||
@echo ÿ
|
||||
@echo ÿÿmake setupÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿgcc (with Mingw)
|
||||
@echo ÿÿmake setup visualcÿÿÿÿÿÿÿÿÿÿÿÿÿMicrosoft Visual C++
|
||||
@echo ÿÿmake setup bcc32ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBorland C/C++
|
||||
@echo ÿÿmake setup lccÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWin32-LCC
|
||||
@echo ÿÿmake setup intelcÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntel C/C++
|
||||
@echo ÿ
|
||||
|
||||
setup: dump_target_list
|
||||
.PHONY: dump_target_list list
|
||||
else
|
||||
setup: dos_setup
|
||||
endif
|
||||
|
||||
# additionally, we provide hooks for various other compilers
|
||||
#
|
||||
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
|
||||
CONFIG_FILE := w32-vcc.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := cl
|
||||
visualc: setup
|
||||
.PHONY: visualc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++
|
||||
CONFIG_FILE := w32-intl.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := cl
|
||||
visualc: setup
|
||||
.PHONY: intelc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
|
||||
CONFIG_FILE := w32-wat.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := wcc386
|
||||
watcom: setup
|
||||
.PHONY: watcom
|
||||
endif
|
||||
|
||||
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
|
||||
CONFIG_FILE := w32-icc.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := icc
|
||||
visualage: setup
|
||||
.PHONY: visualage
|
||||
endif
|
||||
|
||||
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
|
||||
CONFIG_FILE := w32-lcc.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := lcc
|
||||
lcc: setup
|
||||
.PHONY: lcc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
|
||||
CONFIG_FILE := w32-mingw32.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := gcc
|
||||
mingw32: setup
|
||||
.PHONY: mingw32
|
||||
endif
|
||||
|
||||
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
|
||||
CONFIG_FILE := w32-bcc.mk
|
||||
SEP := $(BACKSLASH)
|
||||
CC := bcc32
|
||||
bcc32: setup
|
||||
.PHONY: bcc32
|
||||
endif
|
||||
|
||||
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
|
||||
CONFIG_FILE := w32-bccd.mk
|
||||
CC := bcc32
|
||||
SEP := /
|
||||
devel-bcc: setup
|
||||
.PHONY: devel-bcc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
|
||||
CONFIG_FILE := w32-dev.mk
|
||||
CC := gcc
|
||||
SEP := /
|
||||
devel-gcc: setup
|
||||
.PHONY: devel-gcc
|
||||
endif
|
||||
|
||||
endif # test PLATFORM win32
|
||||
|
||||
# EOF
|
||||
@echo
|
|
@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
|
||||
|
||||
|
@ -78,7 +78,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211_D.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214_D.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
|
||||
|
||||
|
@ -103,7 +103,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT_D.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT_D.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
|
||||
|
||||
|
@ -127,7 +127,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
|
||||
|
||||
|
@ -152,7 +152,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
|
||||
# ADD LIB32 /out:"..\..\..\objs\freetype211ST.lib"
|
||||
# ADD LIB32 /out:"..\..\..\objs\freetype214ST.lib"
|
||||
# SUBTRACT LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
|
||||
|
@ -178,7 +178,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211ST_D.lib"
|
||||
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214ST_D.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
@ -231,6 +231,10 @@ SOURCE=..\..\..\src\base\ftglyph.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\gzip\ftgzip.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\base\ftinit.c
|
||||
# SUBTRACT CPP /Fr
|
||||
# End Source File
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html>
|
||||
<header>
|
||||
<title>FreeType 2 Project Files for Visual C++</title>
|
||||
</header>
|
||||
|
@ -8,14 +8,14 @@
|
|||
|
||||
<p>This directory contains a project file for Visual C++, named
|
||||
<tt>freetype.dsp</tt>. It will compile the following libraries
|
||||
from the FreeType 2.0.4 sources:</p>
|
||||
|
||||
from the FreeType 2.1.4 sources:</p>
|
||||
|
||||
<ul>
|
||||
<pre>
|
||||
freetype204.lib - release build; single threaded
|
||||
freetype204_D.lib - debug build; single threaded
|
||||
freetype204MT.lib - release build; multi-threaded
|
||||
freetype204MT_D.lib - debug build; multi-threaded
|
||||
freetype214.lib - release build; single threaded
|
||||
freetype214_D.lib - debug build; single threaded
|
||||
freetype214MT.lib - release build; multi-threaded
|
||||
freetype214MT_D.lib - debug build; multi-threaded
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
|
41
reactos/lib/freetype/devel/ft2build.h
Normal file
41
reactos/lib/freetype/devel/ft2build.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ft2build.h */
|
||||
/* */
|
||||
/* FreeType 2 build and setup macros. */
|
||||
/* (Generic version) */
|
||||
/* */
|
||||
/* Copyright 1996-2001 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* this is a development version of <ft2build.h> that is used
|
||||
* to build the library in debug mode. Its only difference with
|
||||
* the reference is that is forces the use of the local "ftoption.h"
|
||||
* which contains different settings for all configuration macros
|
||||
*
|
||||
* to use it, you must define the environment variable FT2_BUILD_INCLUDE
|
||||
* to point to the directory containing these two files ("ft2build.h" and
|
||||
* "ftoption.h"), then invoke Jam as usual
|
||||
*/
|
||||
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
#define FT_CONFIG_OPTIONS_H <ftoption.h>
|
||||
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2_BUILD_GENERIC_H__ */
|
||||
|
||||
|
||||
/* END */
|
502
reactos/lib/freetype/devel/ftoption.h
Normal file
502
reactos/lib/freetype/devel/ftoption.h
Normal file
|
@ -0,0 +1,502 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftoption.h */
|
||||
/* */
|
||||
/* User-selectable configuration macros (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002 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. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTOPTION_H__
|
||||
#define __FTOPTION_H__
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
|
||||
/*
|
||||
* this is a special developer version of "ftoption.h", it is used
|
||||
* to define all debugging options, as well as the TrueType bytecode
|
||||
* interpreter
|
||||
*/
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* USER-SELECTABLE CONFIGURATION MACROS */
|
||||
/* */
|
||||
/* This file contains the default configuration macro definitions for */
|
||||
/* a standard build of the FreeType library. There are three ways to */
|
||||
/* use this file to build project-specific versions of the library: */
|
||||
/* */
|
||||
/* - You can modify this file by hand, but this is not recommended in */
|
||||
/* cases where you would like to build several versions of the */
|
||||
/* library from a single source directory. */
|
||||
/* */
|
||||
/* - You can put a copy of this file in your build directory, more */
|
||||
/* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */
|
||||
/* is the name of a directory that is included _before_ the FreeType */
|
||||
/* include path during compilation. */
|
||||
/* */
|
||||
/* The default FreeType Makefiles and Jamfiles use the build */
|
||||
/* directory "builds/<system>" by default, but you can easily change */
|
||||
/* that for your own projects. */
|
||||
/* */
|
||||
/* - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it */
|
||||
/* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */
|
||||
/* locate this file during the build. For example, */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
|
||||
/* #include <freetype/config/ftheader.h> */
|
||||
/* */
|
||||
/* will use "$BUILD/myftoptions.h" instead of this file for macro */
|
||||
/* definitions. */
|
||||
/* */
|
||||
/* Note also that you can similarly pre-define the macro */
|
||||
/* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
|
||||
/* that are statically linked to the library at compile time. By */
|
||||
/* default, this file is <freetype/config/ftmodule.h>. */
|
||||
/* */
|
||||
/* We highly recommend using the third method whenever possible. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Many compilers provide a non-ANSI 64-bit data type that can be used */
|
||||
/* by FreeType to speed up some computations. However, this will create */
|
||||
/* some problems when compiling the library in strict ANSI mode. */
|
||||
/* */
|
||||
/* For this reason, the use of 64-bit ints is normally disabled when */
|
||||
/* the __STDC__ macro is defined. You can however disable this by */
|
||||
/* defining here the macro FT_CONFIG_OPTION_FORCE_INT64. */
|
||||
/* */
|
||||
/* For most compilers, this will only create compilation warnings */
|
||||
/* when building the library. */
|
||||
/* */
|
||||
/* ObNote: The compiler-specific 64-bit integers are detected in the */
|
||||
/* file "ftconfig.h" either statically, or through Autoconf */
|
||||
/* on platforms that support it. */
|
||||
/* */
|
||||
#undef FT_CONFIG_OPTION_FORCE_INT64
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Gzip-compressed file support. */
|
||||
/* */
|
||||
/* FreeType now handles font files that have been compressed with the */
|
||||
/* 'gzip' program. This is mostly used to parse many of the PCF files */
|
||||
/* that come with XFree86. The implementation uses 'zlib' to */
|
||||
/* partially uncompress the file on the fly (see src/base/ftgzip.c). */
|
||||
/* */
|
||||
/* Define this macro if you want to enable this "feature". Note that */
|
||||
/* this will however force you to link the zlib to any program that */
|
||||
/* also uses FreeType. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_USE_ZLIB
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* ZLib library selection */
|
||||
/* */
|
||||
/* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
|
||||
/* It allows FreeType's "ftgzip" component to link to the system's */
|
||||
/* installation of the ZLib library. This is useful on systems like */
|
||||
/* Unix or VMS where it generally is already available. */
|
||||
/* */
|
||||
/* If you let it undefined, the component will use its own copy */
|
||||
/* of the zlib sources instead. These have been modified to be */
|
||||
/* included directly within the component and *not* export external */
|
||||
/* function names. This allows you to link any program with FreeType */
|
||||
/* _and_ ZLib without linking conflicts. */
|
||||
/* */
|
||||
/* do not #undef this macro here, since the build system might */
|
||||
/* define for certain configurations */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* DLL export compilation */
|
||||
/* */
|
||||
/* When compiling FreeType as a DLL, some systems/compilers need a */
|
||||
/* special keyword in front OR after the return type of function */
|
||||
/* declarations. */
|
||||
/* */
|
||||
/* Two macros are used within the FreeType source code to define */
|
||||
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
|
||||
/* */
|
||||
/* FT_EXPORT( return_type ) */
|
||||
/* */
|
||||
/* is used in a function declaration, as in */
|
||||
/* */
|
||||
/* FT_EXPORT( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ); */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( return_type ) */
|
||||
/* */
|
||||
/* is used in a function definition, as in */
|
||||
/* */
|
||||
/* FT_EXPORT_DEF( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ) */
|
||||
/* { */
|
||||
/* ... some code ... */
|
||||
/* return FT_Err_Ok; */
|
||||
/* } */
|
||||
/* */
|
||||
/* You can provide your own implementation of FT_EXPORT and */
|
||||
/* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
|
||||
/* will be later automatically defined as `extern return_type' to */
|
||||
/* allow normal compilation. */
|
||||
/* */
|
||||
/* #define FT_EXPORT(x) extern x */
|
||||
/* #define FT_EXPORT_DEF(x) x */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Glyph Postscript Names handling */
|
||||
/* */
|
||||
/* By default, FreeType 2 is compiled with the `PSNames' module. This */
|
||||
/* module is in charge of converting a glyph name string into a */
|
||||
/* Unicode value, or return a Macintosh standard glyph name for the */
|
||||
/* use with the TrueType `post' table. */
|
||||
/* */
|
||||
/* Undefine this macro if you do not want `PSNames' compiled in your */
|
||||
/* build of FreeType. This has the following effects: */
|
||||
/* */
|
||||
/* - The TrueType driver will provide its own set of glyph names, */
|
||||
/* if you build it to support postscript names in the TrueType */
|
||||
/* `post' table. */
|
||||
/* */
|
||||
/* - The Type 1 driver will not be able to synthetize a Unicode */
|
||||
/* charmap out of the glyphs found in the fonts. */
|
||||
/* */
|
||||
/* You would normally undefine this configuration macro when building */
|
||||
/* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Postscript Names to Unicode Values support */
|
||||
/* */
|
||||
/* By default, FreeType 2 is built with the `PSNames' module compiled */
|
||||
/* in. Among other things, the module is used to convert a glyph name */
|
||||
/* into a Unicode value. This is especially useful in order to */
|
||||
/* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */
|
||||
/* through a big table named the `Adobe Glyph List' (AGL). */
|
||||
/* */
|
||||
/* Undefine this macro if you do not want the Adobe Glyph List */
|
||||
/* compiled in your `PSNames' module. The Type 1 driver will not be */
|
||||
/* able to synthetize a Unicode charmap out of the glyphs found in the */
|
||||
/* fonts. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Allow the use of FT_Incremental_Interface to load typefaces that */
|
||||
/* contain no glyph data, but supply it via a callback function. */
|
||||
/* This allows FreeType to be used with the PostScript language, using */
|
||||
/* the GhostScript interpreter. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* The size in bytes of the render pool used by the scan-line converter */
|
||||
/* to do all of its work. */
|
||||
/* */
|
||||
/* This must be greater than 4kByte. */
|
||||
/* */
|
||||
#define FT_RENDER_POOL_SIZE 16384L
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* FT_MAX_MODULES */
|
||||
/* */
|
||||
/* The maximum number of modules that can be registered in a single */
|
||||
/* FreeType library object. 32 is the default. */
|
||||
/* */
|
||||
#define FT_MAX_MODULES 32
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Debug level */
|
||||
/* */
|
||||
/* FreeType can be compiled in debug or trace mode. In debug mode, */
|
||||
/* errors are reported through the `ftdebug' component. In trace */
|
||||
/* mode, additional messages are sent to the standard output during */
|
||||
/* execution. */
|
||||
/* */
|
||||
/* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */
|
||||
/* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */
|
||||
/* */
|
||||
/* Don't define any of these macros to compile in `release' mode! */
|
||||
/* */
|
||||
#define FT_DEBUG_LEVEL_ERROR
|
||||
#define FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Memory Debugging */
|
||||
/* */
|
||||
/* FreeType now comes with an integrated memory debugger that is */
|
||||
/* capable of detecting simple errors like memory leaks or double */
|
||||
/* deletes. To compile it within your build of the library, you */
|
||||
/* should define FT_DEBUG_MEMORY here. */
|
||||
/* */
|
||||
/* Note that the memory debugger is only activated at runtime when */
|
||||
/* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */
|
||||
/* */
|
||||
#define FT_DEBUG_MEMORY
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Module errors */
|
||||
/* */
|
||||
/* If this macro is set (which is _not_ the default), the higher byte */
|
||||
/* of an error code gives the module in which the error has occurred, */
|
||||
/* while the lower byte is the real error code. */
|
||||
/* */
|
||||
/* Setting this macro makes sense for debugging purposes only, since */
|
||||
/* it would break source compatibility of certain programs that use */
|
||||
/* FreeType 2. */
|
||||
/* */
|
||||
/* More details can be found in the files ftmoderr.h and fterrors.h. */
|
||||
/* */
|
||||
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** S F N T D R I V E R C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
|
||||
/* embedded bitmaps in all formats using the SFNT module (namely */
|
||||
/* TrueType & OpenType). */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */
|
||||
/* load and enumerate the glyph Postscript names in a TrueType or */
|
||||
/* OpenType file. */
|
||||
/* */
|
||||
/* Note that when you do not compile the `PSNames' module by undefining */
|
||||
/* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */
|
||||
/* contain additional code used to read the PS Names table from a font. */
|
||||
/* */
|
||||
/* (By default, the module uses `PSNames' to extract glyph names.) */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */
|
||||
/* access the internal name table in a SFNT-based format like TrueType */
|
||||
/* or OpenType. The name table contains various strings used to */
|
||||
/* describe the font, like family name, copyright, version, etc. It */
|
||||
/* does not contain any glyph name though. */
|
||||
/* */
|
||||
/* Accessing SFNT names is done through the functions declared in */
|
||||
/* `freetype/ftnames.h'. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_SFNT_NAMES
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* TrueType CMap support */
|
||||
/* */
|
||||
/* Here you can fine-tune which TrueType CMap table format shall be */
|
||||
/* supported. */
|
||||
#define TT_CONFIG_CMAP_FORMAT_0
|
||||
#define TT_CONFIG_CMAP_FORMAT_2
|
||||
#define TT_CONFIG_CMAP_FORMAT_4
|
||||
#define TT_CONFIG_CMAP_FORMAT_6
|
||||
#define TT_CONFIG_CMAP_FORMAT_8
|
||||
#define TT_CONFIG_CMAP_FORMAT_10
|
||||
#define TT_CONFIG_CMAP_FORMAT_12
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
|
||||
/* a bytecode interpreter in the TrueType driver. Note that there are */
|
||||
/* important patent issues related to the use of the interpreter. */
|
||||
/* */
|
||||
/* By undefining this, you will only compile the code necessary to load */
|
||||
/* TrueType glyphs without hinting. */
|
||||
/* */
|
||||
/* do not #undef this macro here, since the build system might */
|
||||
/* define for certain configurations */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
|
||||
/* bytecode interpreter with a huge switch statement, rather than a call */
|
||||
/* table. This results in smaller and faster code for a number of */
|
||||
/* architectures. */
|
||||
/* */
|
||||
/* Note however that on some compiler/processor combinations, undefining */
|
||||
/* this macro will generate faster, though larger, code. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
|
||||
/* TrueType glyph loader to use Apple's definition of how to handle */
|
||||
/* component offsets in composite glyphs. */
|
||||
/* */
|
||||
/* Apple and MS disagree on the default behavior of component offsets */
|
||||
/* in composites. Apple says that they should be scaled by the scale */
|
||||
/* factors in the transformation matrix (roughly, it's more complex) */
|
||||
/* while MS says they should not. OpenType defines two bits in the */
|
||||
/* composite flags array which can be used to disambiguate, but old */
|
||||
/* fonts will not have them. */
|
||||
/* */
|
||||
/* http://partners.adobe.com/asn/developer/opentype/glyf.html */
|
||||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
|
||||
/* */
|
||||
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
|
||||
/**** ****/
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
|
||||
/* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
|
||||
/* required. */
|
||||
/* */
|
||||
#define T1_MAX_DICT_DEPTH 5
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
|
||||
/* calls during glyph loading. */
|
||||
/* */
|
||||
#define T1_MAX_SUBRS_CALLS 16
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
|
||||
/* minimum of 16 is required. */
|
||||
/* */
|
||||
/* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
|
||||
/* */
|
||||
#define T1_MAX_CHARSTRINGS_OPERANDS 256
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define this configuration macro if you want to prevent the */
|
||||
/* compilation of `t1afm', which is in charge of reading Type 1 AFM */
|
||||
/* files into an existing face. Note that if set, the T1 driver will be */
|
||||
/* unable to produce kerning distances. */
|
||||
/* */
|
||||
#undef T1_CONFIG_OPTION_NO_AFM
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define this configuration macro if you want to prevent the */
|
||||
/* compilation of the Multiple Masters font support in the Type 1 */
|
||||
/* driver. */
|
||||
/* */
|
||||
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
|
||||
|
||||
/* */
|
||||
|
||||
/*
|
||||
* the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
|
||||
* improvements to the auto-hinter contributed by David Chester. They will
|
||||
* most likely disappear completely in the next release. For now, you should
|
||||
* always keep them defined
|
||||
*
|
||||
*/
|
||||
#define FT_CONFIG_OPTION_CHESTER_HINTS
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
|
||||
|
||||
# define FT_CONFIG_CHESTER_SMALL_F
|
||||
# define FT_CONFIG_CHESTER_ASCENDER
|
||||
# define FT_CONFIG_CHESTER_SERIF
|
||||
# define FT_CONFIG_CHESTER_STEM
|
||||
# define FT_CONFIG_CHESTER_BLUE_SCALE
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* __FTOPTION_H__ */
|
||||
|
||||
|
||||
/* END */
|
|
@ -1,275 +0,0 @@
|
|||
List of known FreeType 2 Bugs
|
||||
-----------------------------
|
||||
|
||||
"Identifier" is a string to uniquely identify the bug. A more detailed
|
||||
description of the bug is found below the table of opened bugs.
|
||||
|
||||
"Date" is the date when the bug was first reported or entered in this
|
||||
document. Dates are in _European_ format, i.e day/month/year.
|
||||
|
||||
"Opened By" is the name of the person who first spotted the bug. Note that
|
||||
we can use abbreviations here, like:
|
||||
|
||||
"David" for David Turner
|
||||
"Werner" for Werner Lemberg
|
||||
etc.
|
||||
|
||||
"Reproduceable" indicates whether the bug could be reproduced by the
|
||||
development team or not (it can be specific to a given platform), whether it
|
||||
always happens, or only sporadically, etc.
|
||||
|
||||
|
||||
|
||||
I. Open bugs
|
||||
============
|
||||
|
||||
|
||||
Identifier Date Opened by Reproduceable
|
||||
------------------------------------------------------------------------------
|
||||
NO-CID-CMAPS 13-09-2001 David always
|
||||
BAD-TT-RENDERING 12-09-2001 Paul Pedriana ?
|
||||
BAD-THIN-LINES 13-09-2001 David ?
|
||||
NOT-WINDOWS-METRICS 07-10-2001 David always
|
||||
ADVANCED-COMPOSITES 25-10-2001 George Williams always
|
||||
|
||||
--------------------END-OF-OPENED-BUGS-TABLE----------------------------------
|
||||
|
||||
|
||||
|
||||
II. Closed bugs
|
||||
===============
|
||||
|
||||
|
||||
Identifier Date Closed by Closure date
|
||||
------------------------------------------------------------------------------
|
||||
BAD-TTNAMEID.H 12-09-2001 Antoine N/A
|
||||
BAD-T1-CHARMAP 15-06-2001 David 2.0.5
|
||||
BAD-UNIXXXX-NAMES 30-07-2001 David 2.0.5
|
||||
GLYPH_TO_BITMAP-BUG 05-12-2001 David 05-12-2001
|
||||
AUTOHINT-NO-SBITS 13-09-2001 David 2.0.6
|
||||
TT-GLYPH-CRASH 01-01-2002 David 2.0.6
|
||||
T1-FONT-CRASH 01-01-2002 David 2.0.6
|
||||
BAD-ADVANCES 30-11-2001 David 2.0.6
|
||||
GLYPH-TO-BITMAP-BUG 15-12-2001 David 2.0.6
|
||||
--------------------END-OF-CLOSED-BUGS-TABLE----------------------------------
|
||||
|
||||
|
||||
|
||||
III. Bug descriptions
|
||||
=====================
|
||||
|
||||
|
||||
--- START OF OPEN BUGS ---
|
||||
|
||||
|
||||
NO-CID-CMAPS
|
||||
|
||||
Not exactly a bug, but the CFF font driver doesn't build a Unicode charmap
|
||||
from the contents of font files, which prevents efficiently using fonts in
|
||||
this format.
|
||||
|
||||
|
||||
|
||||
BAD-TT-RENDERING
|
||||
|
||||
According to Paul Pedriana <PPedriana@maxis.com>, there is a rather
|
||||
important difference between the rendering of TrueType-hinted glyphs of
|
||||
current FT2 and old betas.
|
||||
|
||||
Tests and comparisons show a _major_ discrepancy of monochrome truetype
|
||||
bytecode-hinted glyphs! Something seems to be really broken here!
|
||||
|
||||
Some of this has been fixed in 2.0.6; there was a bug in the TrueType
|
||||
loader that prevented it from loading composites correctly. However,
|
||||
there are still _subtle_ differences between FT1 and FT2 when it comes to
|
||||
monochrome TrueType-hinted glyphs (the major differences are gone though).
|
||||
|
||||
|
||||
|
||||
BAD-THIN-LINES
|
||||
|
||||
It seems that the anti-aliased renderer in FreeType has problems rendering
|
||||
extremely thin straight lines correctly, at least when using the
|
||||
FT_Outline_Render() function.
|
||||
|
||||
|
||||
|
||||
NOT-WINDOWS-METRICS
|
||||
|
||||
FreeType doesn't always return the same metrics as Windows for ascender,
|
||||
descender, and text height, depending on character pixel sizes. A lot of
|
||||
testing on Windows is needed to debug this properly. It might be due to a
|
||||
rounding bug when computing the "x_scale" and "y_scale" values.
|
||||
|
||||
|
||||
|
||||
ADVANCED-COMPOSITES
|
||||
|
||||
Provided by George Williams <pfaedit@users.sourceforge.net>:
|
||||
|
||||
I notice that truetype/ttgload.c only supports Apple's definition of
|
||||
offsets for composite glyphs. Apple and Microsoft behave differently if
|
||||
there is a scale factor. OpenType defines some bits to disambiguate.
|
||||
|
||||
(A problem in both 2.0.4 and 2.0.5.)
|
||||
|
||||
Apple says (http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html) that if
|
||||
flags&ARGS_ARE_XY is set then the offsets should be scaled by the scale
|
||||
factors (as you have done), but they also say something very cryptic
|
||||
about what happens when the component is rotated at 45° (which you do
|
||||
not support) -- See the "Important" note at the bottom.
|
||||
|
||||
The old truetype spec from Microsoft did not mention this. The OpenType
|
||||
spec (http://www.microsoft.com/typography/otspec/glyf.htm,
|
||||
http://partners.adobe.com/asn/developer/opentype/glyf.html) defines two
|
||||
new bits to disambiguate:
|
||||
|
||||
SCALED_COMPONENT_OFFSET 11
|
||||
Composite designed to have the component offset scaled (designed for
|
||||
Apple rasterizer)
|
||||
|
||||
UNSCALED_COMPONENT_OFFSET 12
|
||||
Composite designed not to have the component offset scaled (designed
|
||||
for the Microsoft TrueType rasterizer)
|
||||
|
||||
Perhaps you could add a load_flag to allow the user to define the
|
||||
default setting?
|
||||
|
||||
David says:
|
||||
|
||||
Wow, I was not even aware of this, it will probably take a little time
|
||||
to implement since I don't have any font that implement these
|
||||
"features", and also because I believe that we're running out of bits
|
||||
for "load_flag", some other way to set preferences is probably needed.
|
||||
|
||||
|
||||
|
||||
--- END OF OPEN BUGS ---
|
||||
|
||||
|
||||
|
||||
BAD-TTNAMEID.H
|
||||
|
||||
The file "ttnameid.h" contains various constant macro definitions
|
||||
corresponding to important values defined by the TrueType specification.
|
||||
|
||||
Joe Man <trmetal@yahoo.com.hk> reports that:
|
||||
|
||||
According to the information from TrueType v1.66:
|
||||
|
||||
Platform ID = 3 (Microsoft)
|
||||
the Encoding ID of GB2312 = 4
|
||||
the Encoding ID of big5 = 3
|
||||
|
||||
However, I have found that in ttnameid.h:
|
||||
|
||||
TT_MS_ID_GB2312 = 3
|
||||
TT_MS_ID_BIG_5 = 4
|
||||
|
||||
Which one is correct?
|
||||
|
||||
Antoine replied that this was a bug in the TT 1.66 specification, and that
|
||||
FreeType followed the most recent TrueType/OpenType specification here.
|
||||
|
||||
|
||||
|
||||
AUTOHINT-SBITS
|
||||
|
||||
When trying to load a glyph, with the auto-hinter activated (i.e., when
|
||||
using FT_LOAD_FORCE_AUTOHINT, or when the font driver doesn't provide its
|
||||
own hinter), embedded bitmaps are _never_ loaded, unlike the default
|
||||
behaviour described by the API specification.
|
||||
|
||||
This seems to be a bug in FT_Load_Glyph(), but there is no way to solve it
|
||||
efficiently without making a few important internal changes to the
|
||||
library's design (more importantly, to the font driver interface).
|
||||
|
||||
This has been corrected with a hack in FT_Load_Glyph(). More important
|
||||
internal changes should help get rid of it with a clean solution in a
|
||||
further release like FreeType 2.1.
|
||||
|
||||
|
||||
|
||||
BAD-T1-CHARMAP
|
||||
|
||||
Type1 driver doesn't read "cacute" and "lslash" characters from iso8859-2
|
||||
charset. Those characters are mapped as MAC-one in glnames.py, so they
|
||||
cannot be shown in Adobe Type1 fonts.
|
||||
|
||||
(This was due to a bug in the "glnames.py" script used to generate the
|
||||
table of glyph names in 'src/psaux/pstables.h'.)
|
||||
|
||||
|
||||
|
||||
BAD-UNIXXXX-NAMES
|
||||
|
||||
Glyph names like uniXXXX are not recognized as they should be. It seems
|
||||
that code in psmodule.c for uniXXXX glyph names was never tested. The
|
||||
patch is very simple.
|
||||
|
||||
(A simple bug that was left un-noticed due to the fact that I don't have
|
||||
any Postscript font that use this convention, unfortunately.)
|
||||
|
||||
|
||||
|
||||
GLYPH_TO_BITMAP-BUG
|
||||
|
||||
Calling FT_Glyph_To_Bitmap() sometimes modifies the original glyph
|
||||
outline, creating weird alignment artefacts.
|
||||
|
||||
This subtle bug was really in the file `src/smooth/ftsmooth.c'.
|
||||
Basically, the outline was shifted before rendering it into a new bitmap
|
||||
buffer. However, it wasn't properly un-shifted after that operation.
|
||||
|
||||
This was only noticeable with certain glyphs or certain fonts; it crept in
|
||||
a long time ago.
|
||||
|
||||
The same bug has been fixed in src/raster/ftrender1.c also.
|
||||
|
||||
|
||||
|
||||
TT-GLYPH-CRASH
|
||||
|
||||
The library crashed when trying to load certain glyphs from an
|
||||
automatically generated TrueType file (tt1095m_.ttf submitted by Scott
|
||||
Long).
|
||||
|
||||
It turned out that the font contained invalid glyph data (i.e. was
|
||||
broken), but the TrueType glyph loader in FreeType wasn't paranoid enough,
|
||||
which resulted in nasty memory overwrites all over the place.
|
||||
|
||||
|
||||
|
||||
T1-FONT-CRASH
|
||||
|
||||
The library crashed when trying to load the "Stalingrad Regular" face from
|
||||
the "sadn.pfb" font file provided by Anthony Fok (and the Gnome-Print team
|
||||
I believe).
|
||||
|
||||
This was due to the fact that the font missed a full font name entry,
|
||||
though boasted a family name and postscript name. The Type 1 face loader
|
||||
didn't check for these pathetic cases and seg-faulted.
|
||||
|
||||
|
||||
|
||||
BAD-ADVANCES
|
||||
|
||||
All scalable font drivers returned un-fitted glyph advances when
|
||||
FT_LOAD_DEFAULT was used, which was incorrect. This problem was pretty
|
||||
old but hadn't been spotted because all test programs actually explicitly
|
||||
or implicitly (i.e. through the cache) rounded the advance widths of
|
||||
glyphs.
|
||||
|
||||
This resulted in poor rendering of a number of client applications however
|
||||
(it is strange to see they took so long to notify the FreeType team).
|
||||
|
||||
|
||||
|
||||
GLYPH-TO-BITMAP-BUG
|
||||
|
||||
FT_Glyph_To_Bitmap() did incorrectly modify the source glyph in certain
|
||||
cases, which resulted in random behaviour and bad text rendering. This
|
||||
was spotted to bugs in both the monochrome and smooth rasterizer.
|
||||
|
||||
|
||||
=== end of file ===
|
|
@ -1,276 +0,0 @@
|
|||
|
||||
FreeType 2 compilation how-to
|
||||
=============================
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Welcome to the FreeType 2 library. You'll find in this document
|
||||
instructions on how to compile the library on your favorite platform.
|
||||
|
||||
|
||||
I. QUICK COMMAND-LINE GUIDE
|
||||
---------------------------
|
||||
|
||||
THE FOLLOWING WILL ONLY WORK WITH GNU MAKE, IT WILL FAIL MISERABLY
|
||||
WITH OTHER MAKE TOOLS, FOR EXAMPLE "BSD MAKE".
|
||||
|
||||
Install GNU Make (version 3.78.1 or newer), then try the following
|
||||
on Unix or any system with gcc:
|
||||
|
||||
make // this will setup the build
|
||||
make // this will build the library
|
||||
|
||||
On Win32 + Visual C++:
|
||||
|
||||
make setup visualc // setup the build for VisualC++ on Win32
|
||||
make // build the library
|
||||
|
||||
Then, go to the `demos' directory and type
|
||||
|
||||
make
|
||||
|
||||
|
||||
Note that on Unix, the first `make' invocation will run a configure
|
||||
script (which is located in `freetype2/builds/unix/'. You can also
|
||||
pass parameters to this script with the CFG variable, as in:
|
||||
|
||||
make CFG="--prefix=/usr/local"
|
||||
make
|
||||
|
||||
|
||||
If this doesn't work, read the following.
|
||||
|
||||
|
||||
II. COMMAND-LINE COMPILATION
|
||||
----------------------------
|
||||
|
||||
Note that if you do not want to compile FreeType 2 from a command
|
||||
line shell, please skip to section III below (DETAILED COMPILATION).
|
||||
|
||||
FreeType 2 includes a powerful and flexible build system that allows
|
||||
you to easily compile it on a great variety of platforms from the
|
||||
command line. To do so, just follow these simple instructions:
|
||||
|
||||
a. Install GNU Make
|
||||
|
||||
Because GNU Make is the only Make tool supported to compile
|
||||
FreeType 2, you should install it on your machine.
|
||||
|
||||
The FreeType 2 build system relies on many features special to GNU
|
||||
Make -- trying to build the library with any other Make tool will
|
||||
*fail*.
|
||||
|
||||
NEARLY ALL OTHER MAKE TOOLS WILL FAIL, INCLUDING "BSD MAKE", SO
|
||||
REALLY INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
|
||||
|
||||
Make sure that you are invoking GNU Make from the command line, by
|
||||
typing something like:
|
||||
|
||||
make -v
|
||||
|
||||
to display its version number.
|
||||
|
||||
VERSION 3.78.1 OR NEWER IS NEEDED!
|
||||
|
||||
b. Invoke `make'
|
||||
|
||||
Go to the root directory of FreeType 2, then simply invoke GNU
|
||||
Make from the command line. This will launch the FreeType 2 host
|
||||
platform detection routines. A summary will be displayed, for
|
||||
example, on Win32:
|
||||
|
||||
|
||||
==============================================================
|
||||
FreeType build system -- automatic system detection
|
||||
|
||||
The following settings are used:
|
||||
|
||||
platform win32
|
||||
compiler gcc
|
||||
configuration directory ./builds/win32
|
||||
configuration rules ./builds/win32/w32-gcc.mk
|
||||
|
||||
If this does not correspond to your system or settings please
|
||||
remove the file 'config.mk' from this directory then read the
|
||||
INSTALL file for help.
|
||||
|
||||
Otherwise, simply type 'make' again to build the library.
|
||||
=============================================================
|
||||
|
||||
|
||||
If the detected settings correspond to your platform and compiler,
|
||||
skip to step e. Note that if your platform is completely alien to
|
||||
the build system, the detected platform will be `ansi'.
|
||||
|
||||
c. Configure the build system for a different compiler
|
||||
|
||||
If the build system correctly detected your platform, but you want
|
||||
to use a different compiler than the one specified in the summary
|
||||
(for most platforms, gcc is the defaut compiler), invoke GNU Make
|
||||
with
|
||||
|
||||
make setup <compiler>
|
||||
|
||||
For example:
|
||||
|
||||
to use Visual C++ on Win32, type: "make setup visualc"
|
||||
to use LCC-Win32 on Win32, type: "make setup lcc"
|
||||
|
||||
The <compiler> name to use is platform-dependent. The list of
|
||||
available compilers for your system is available in the file
|
||||
`builds/<system>/detect.mk' (note that we hope to make the list
|
||||
displayed at user demand in the final release).
|
||||
|
||||
If you are satisfied by the new configuration summary, skip to
|
||||
step e.
|
||||
|
||||
d. Configure the build system for an unknown platform/compiler
|
||||
|
||||
The auto-detection/setup phase of the build system copies a file
|
||||
to the current directory under the name `config.mk'.
|
||||
|
||||
For example, on OS/2+gcc, it would simply copy
|
||||
`builds/os2/os2-gcc.mk' to `./config.mk'.
|
||||
|
||||
If for some reason your platform isn't correctly detected, copy
|
||||
manually the configuration sub-makefile to `./config.mk' and go to
|
||||
step e.
|
||||
|
||||
Note that this file is a sub-Makefile used to specify Make
|
||||
variables for compiler and linker invocation during the build.
|
||||
You can easily create your own version from one of the existing
|
||||
configuration files, then copy it to the current directory under
|
||||
the name `./config.mk'.
|
||||
|
||||
e. Build the library
|
||||
|
||||
The auto-detection/setup phase should have copied a file in the
|
||||
current directory, called `./config.mk'. This file contains
|
||||
definitions of various Make variables used to invoke the compiler
|
||||
and linker during the build.
|
||||
|
||||
To launch the build, simply invoke GNU Make again: The top
|
||||
Makefile will detect the configuration file and run the build with
|
||||
it.
|
||||
|
||||
f. Build the demonstration programs
|
||||
|
||||
|
||||
III. DETAILED COMPILATION PROCEDURE
|
||||
-----------------------------------
|
||||
|
||||
If you don't want to compile FreeType 2 from the command-line (for
|
||||
example if you use a graphical IDE on a Mac or Windows), you will
|
||||
need to understand how the FreeType files are organized.
|
||||
|
||||
FreeType 2 has a very modular design, and it is made of several
|
||||
components. Each component must be compiled as a stand-alone object
|
||||
file, even if it is really made of several C source files. For
|
||||
example, the `base layer' component is made of the following C
|
||||
files:
|
||||
|
||||
src/
|
||||
base/
|
||||
ftcalc.c - computations
|
||||
ftextend.c - extensions support
|
||||
ftlist.c - simple list management
|
||||
ftobjs.c - object management
|
||||
ftoutln.c - simple outline processing
|
||||
ftstream.c - stream input
|
||||
|
||||
However, you can create a single object file by compiling the file
|
||||
`src/base/ftbase.c', which basically contains
|
||||
|
||||
#include "ftcalc.c"
|
||||
#include "ftobjs.c"
|
||||
#include "ftstream.c"
|
||||
#include "ftlist.c"
|
||||
#include "ftoutln.c"
|
||||
#include "ftextend.c"
|
||||
|
||||
Similarly, each component has a single `englobing' C file to compile
|
||||
it as a stand-alone object:
|
||||
|
||||
src/autohint/autohint.c - the autohinting module
|
||||
src/base/ftbase.c - the base layer, high-level interface
|
||||
src/cache/ftcache.c - a glyph and image caching system
|
||||
(still experimental)
|
||||
src/cff/cff.c - the OpenType font driver
|
||||
src/cid/type1cid.c - the CID-keyed font driver
|
||||
src/psaux/psaux.c - the PS support module
|
||||
src/psnames/psnames.c - a support module to handle PS glyph
|
||||
names
|
||||
src/raster1/raster1.c - the monochrome raster module
|
||||
src/sfnt/sfnt.c - the `sfnt' module
|
||||
src/smooth/smooth.c - the anti-aliasing raster module
|
||||
src/truetype/truetype.c - the TrueType font driver
|
||||
src/type1/type1.c - the Type 1 font driver
|
||||
|
||||
The last module of FreeType 2, `winfonts' (implementing support for
|
||||
Windows FNT format), is a single file.
|
||||
|
||||
To compile one component, do the following:
|
||||
|
||||
- Add the top-level `include' directory to your compilation
|
||||
include path
|
||||
|
||||
- Add the `src/<component>' directory to your compilation include
|
||||
path, or simply `cd' to the component's source directory.
|
||||
|
||||
- Compile the component `source' file (see list below); you don't
|
||||
need to be in the component's directory if you added
|
||||
`src/<component>' to your include path.
|
||||
|
||||
For example, the following line can be used to compile the truetype
|
||||
driver on Unix:
|
||||
|
||||
cd freetype2/
|
||||
cc -c -Iinclude -Isrc/truetype src/truetype/truetype.c
|
||||
|
||||
Alternatively:
|
||||
|
||||
cd freetype2/src/truetype
|
||||
cc -c -I../../include truetype.c
|
||||
|
||||
Finally, FreeType 2 contains some other components:
|
||||
|
||||
src/base/ftsystem.c - system-specific memory and i/o support
|
||||
src/base/ftinit.c - initialization layer
|
||||
src/base/ftdebug.c - debugging component (empty in release
|
||||
build)
|
||||
src/base/ftglyph.c - optional convenience functions
|
||||
|
||||
All font drivers are optional. The `sfnt', `psaux', and `psnames'
|
||||
modules are mandatory for certain drivers. However, you may need to
|
||||
update the list of drivers that are statically linked to the
|
||||
library, which is located in the configuration file
|
||||
`include/freetype/config/ftmodule.h'.
|
||||
|
||||
|
||||
IV. Support for flat-directory compilation
|
||||
------------------------------------------
|
||||
|
||||
It is possible to put all FreeType 2 source files into a single
|
||||
directory, with the exception of the `include' hierarchy.
|
||||
|
||||
1. Copy all files in current directory:
|
||||
|
||||
cp freetype2/src/base/*.[hc] .
|
||||
cp freetype2/src/raster1/*.[hc] .
|
||||
cp freetype2/src/smooth/*.[hc] .
|
||||
etc.
|
||||
|
||||
2. Compile sources:
|
||||
|
||||
cc -c -Ifreetype2/include ftsystem.c
|
||||
cc -c -Ifreetype2/include ftinit.c
|
||||
cc -c -Ifreetype2/include ftdebug.c
|
||||
cc -c -Ifreetype2/include ftbase.c
|
||||
etc.
|
||||
|
||||
You don't need to define the FT_FLAT_COMPILATION macro (as this was
|
||||
required in previous releases of FreeType 2).
|
||||
|
||||
End of file
|
|
@ -1,3 +1,86 @@
|
|||
LATEST CHANGES BETWEEN 2.1.4 and 2.1.3
|
||||
|
||||
I. IMPORTANT BUG FIXES
|
||||
|
||||
- updated to newest libtool version, fixes build problems on various
|
||||
platforms.
|
||||
|
||||
- a fix in the Gzip stream reader, it couldn't read certain .gz files
|
||||
properly due to a small typo. In certain cases, FreeType could also
|
||||
loop endlessly when trying to load tiny gzipped files.
|
||||
|
||||
- the configure script now tries to use the system-wide zlib when
|
||||
it finds one (instead of the copy found in src/gzip). And
|
||||
"freetype-config" has been updated to return relevant flags in this
|
||||
case when invoked with "--libs" (e.g. "-lzlib")
|
||||
|
||||
- certain fonts couldn't be loaded by 2.1.3 because they lacked a
|
||||
Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously rejected
|
||||
them.
|
||||
|
||||
- the CFF loader was modified to accept fonts which only
|
||||
contain a subset of their reference charset. This prevented the
|
||||
correct use of PDF-embedded fonts.
|
||||
|
||||
- the logic to detect Unicode charmaps has been modified. this is required
|
||||
to support fonts which include both 16-bit and 32-bit charmaps (like
|
||||
very recent asian ones) using the new 10 and 12 SFNT formats.
|
||||
|
||||
- the TrueType loader now limits the depth of composite glyphs. This is
|
||||
necessary to prevent broken fonts to break the engine by blowing the
|
||||
stack with recursive glyph definitions.
|
||||
|
||||
- the CMap cache is now capable of managing UCS-4 character codes that
|
||||
are mapped through extended charmaps in recent TrueType/OpenType fonts
|
||||
|
||||
- the cache sub-system now properly manages out-of-memory conditions,
|
||||
instead of blindly reporting them to the caller. This means that it
|
||||
will try to empty the cache before restarting its allocations to see
|
||||
if that can help.
|
||||
|
||||
- the PFR driver didn't return the list of available embedded bitmaps
|
||||
properly.
|
||||
|
||||
II. IMPORTANT CHANGES
|
||||
|
||||
- David Chester contributed some enhancements to the auto-hinter that
|
||||
significantly increase the quality of its output. The Postscript hinter
|
||||
was also improved in several ways..
|
||||
|
||||
- the FT_RENDER_MODE_LIGHT render mode was implemented
|
||||
|
||||
- a new API, called FT_Get_BDF_Property has been added to FT_BDF_H to
|
||||
retrieve BDF properties from BDF _and_ PCF font files. THIS IS STILL
|
||||
EXPERIMENTAL, since it hasn't been properly tested yet.
|
||||
|
||||
- a Windows FNT specific API has been added, mostly to access font
|
||||
headers. This is used by Wine
|
||||
|
||||
- TrueType tables without a "hmtx" table are now tolerated when an
|
||||
incremental interface is used. This happens for certain Type42 fonts
|
||||
passed from Ghostscript to FreeType.
|
||||
|
||||
- the PFR font driver is now capable of returning the font family and
|
||||
style names when they're available (instead of the sole "FontID"). This
|
||||
is performed by parsing an *undocumented* portion of the font file !!
|
||||
|
||||
III. MISCELLANEOUS
|
||||
|
||||
- the path stroker in FT_STROKER_H has entered beta stage. It now works
|
||||
very well, but it's interface might change a bit in the future. More
|
||||
on this in later releases
|
||||
|
||||
- the documentation for FT_Size_Metrics didn't appear properly in the
|
||||
API reference
|
||||
|
||||
- the file docs/VERSION.DLL has been updated to explain versioning
|
||||
with FreeType (i.e. comparing release/libtool/so numbers, and how
|
||||
to use them in Autoconf scripts)
|
||||
|
||||
- the installation documentation has been seriously revamped. Everything
|
||||
is now in the "docs" directory.
|
||||
|
||||
==============================================================================
|
||||
LATEST CHANGES BETWEEN 2.1.3 and 2.1.2
|
||||
|
||||
I. IMPORTANT BUG FIXES
|
||||
|
|
117
reactos/lib/freetype/docs/CUSTOMIZE
Normal file
117
reactos/lib/freetype/docs/CUSTOMIZE
Normal file
|
@ -0,0 +1,117 @@
|
|||
How to customize the compilation of the library:
|
||||
================================================
|
||||
|
||||
FreeType is highly customizable to fit various needs, and this document
|
||||
details how it is possible to select options and components at compilation
|
||||
time.
|
||||
|
||||
|
||||
I. Configuration macros:
|
||||
|
||||
the file found in "include/freetype/config/ftoption.h" contains a list
|
||||
of commented configuration macros that can be toggled by developers to
|
||||
indicate which features to activate in their build of the library.
|
||||
|
||||
these options range from debug level to availability of certain
|
||||
features, like native TrueType hinting through a bytecode interpreter.
|
||||
|
||||
we invite you to read this file for more information. You can change
|
||||
the file's content to suit your needs, or override it with one of the
|
||||
techniques described below..
|
||||
|
||||
|
||||
II. Modules list:
|
||||
|
||||
the file found in "include/freetype/config/ftmodule.h" contains a list
|
||||
of names corresponding to the modules / font drivers to be statically
|
||||
compiled in the FreeType library during the build.
|
||||
|
||||
you can change it to suit your own preferences. Be aware that certain
|
||||
modules depend on others, as described by the file "modules.txt" in
|
||||
this directory.
|
||||
|
||||
you can modify the file's content to suit your needs, or override it
|
||||
at compile time with one of the methods described below
|
||||
|
||||
|
||||
III. System interface:
|
||||
|
||||
FreeType's default interface to the system (i.e. the parts that deal with
|
||||
memory management and i/o streams) is located in "src/base/ftsystem.c".
|
||||
|
||||
the current implementation uses standard C library calls to manage
|
||||
memory and read font files. It is however possible to write custom
|
||||
implementations to suit specific systems.
|
||||
|
||||
to tell the GNU Make-based build system to use a custom system interface,
|
||||
you'll need to define the environment variable FTSYS_SRC to point to
|
||||
the relevant implementation, like in:
|
||||
|
||||
on Unix:
|
||||
./configure <youroptions>
|
||||
export FTSYS_SRC=foo/my_ftsystem.c
|
||||
make
|
||||
make install
|
||||
|
||||
on Windows:
|
||||
make setup <compiler>
|
||||
set FTSYS_SRC=foo/my_ftsystem.c
|
||||
make
|
||||
|
||||
|
||||
IV. Overriding default configuration and module headers:
|
||||
|
||||
it is possible to over-ride the default configuration and module headers
|
||||
without changing the original files. There are two ways to do that:
|
||||
|
||||
1. Using the C include path:
|
||||
|
||||
use the C include path to ensure that your own versions of the
|
||||
files are used at compile time when the lines:
|
||||
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
#include FT_CONFIG_MODULES_H
|
||||
|
||||
are compiled. Their default values being <freetype/config/ftoption.h>
|
||||
and <freetype/config/ftmodule.h>, you can do something like:
|
||||
|
||||
custom/
|
||||
freetype/
|
||||
config/
|
||||
ftoption.h => custom options header
|
||||
ftmodule.h => custom modules list
|
||||
|
||||
include/ => normal FreeType 2 include
|
||||
freetype/
|
||||
...
|
||||
|
||||
then change the C include path to always give the path to "custom"
|
||||
before the FreeType 2 "include"
|
||||
|
||||
|
||||
2. Re-defining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H
|
||||
|
||||
another way to do the same thing is to re-define the macros used
|
||||
to name the configuration headers. To do so, you'll need a custom
|
||||
"ft2build.h", whose content can be as simple as:
|
||||
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
#define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
|
||||
#define FT_CONFIG_MACROS_H <custom/my-ftmodule.h>
|
||||
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2_BUILD_GENERIC_H__ */
|
||||
|
||||
place them in:
|
||||
|
||||
custom/
|
||||
ft2build.h => custom version described above
|
||||
my-ftoption.h => custom options header
|
||||
my-ftmodule.h => custom modules list header
|
||||
|
||||
and change the C include path to ensure that "custom" is always placed
|
||||
before the FT2 "include" during compilation.
|
||||
|
|
@ -14,7 +14,7 @@ located in the file "ftoptions.h". The macros are:
|
|||
#define this macro if you want to compile the FT_ERROR macro calls
|
||||
used to print error messages during program execution. This will
|
||||
not stop the program, but is very useful to spot invalid fonts
|
||||
during development and code wordarounds for them.
|
||||
during development and code workarounds for them.
|
||||
|
||||
FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
|
@ -159,4 +159,25 @@ behaviour of FreeType at runtime:
|
|||
ignored in other builds.
|
||||
|
||||
|
||||
FT2_ALLOC_TOTAL_MAX
|
||||
|
||||
this variable is ignored if FT2_DEBUG_MEMORY is not defined. It allows
|
||||
you to specify a maximum heap size for all memory allocations performed
|
||||
by FreeType. This is very useful to test the robustness of the font
|
||||
engine and programs that use it in tight memory conditions.
|
||||
|
||||
If it is undefined, or if its value is not strictly positive, then no
|
||||
allocation bounds are checked at runtime.
|
||||
|
||||
|
||||
FT2_ALLOC_COUNT_MAX
|
||||
|
||||
this variable is ignored if FT2_DEBUG_MEMORY is not defined. It allows
|
||||
you to sepcify a maximum number of memory allocations performed by
|
||||
FreeType before returning the error FT_Err_Out_Of_Memory. This is
|
||||
useful for debugging and testing the engine's robustness.
|
||||
|
||||
If it is undefined, or if its value is not strictly positive, then no
|
||||
allocation bounsd are checked at runtime.
|
||||
|
||||
End of file
|
|
@ -1,185 +1,65 @@
|
|||
In order to build the library, read the `BUILD' document in the `docs'
|
||||
directory. This is only a quick starter.
|
||||
Welcome
|
||||
|
||||
There are several ways to build the FreeType library, depending on your
|
||||
system and the level of customization you need. Here's a short overview
|
||||
of the documentation available:
|
||||
|
||||
I. Normal installation and upgrades:
|
||||
|
||||
1. Native TrueType Hinting:
|
||||
|
||||
Native TrueType hinting is disabled by default[1]. If you really need it,
|
||||
read the file "TRUETYPE" for information.
|
||||
|
||||
|
||||
2. Unix Systems (as well as Cygwin or MSys on Windows):
|
||||
|
||||
Please read *both* UPGRADE.UNX and INSTALL.UNX to install or upgrade
|
||||
FreeType 2 on a Unix system. Note that you *will* need GNU Make, since
|
||||
other make tools won't work (this includes BSD Make !!)
|
||||
|
||||
3. On VMS with the "mms" build tool:
|
||||
|
||||
see INSTALL.VMS for installation instructions on this platform
|
||||
|
||||
4. Other systems using GNU Make:
|
||||
|
||||
on non-Unix platforms, it's possible to build the library using
|
||||
GNU Make utility. Note that *NO OTHER MAKE TOOL WILL WORK* !!
|
||||
This methods supports several compilers on Windows, OS/2 and BeOS,
|
||||
including Mingw, Visual C++, Borland C++, and more.
|
||||
|
||||
instructions are provided in the file "INSTALL.GNU"
|
||||
|
||||
|
||||
I. Unix systems
|
||||
---------------
|
||||
|
||||
If you have GNU Make installed, simply type
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
on the command line to configure, build and install FreeType on your
|
||||
system. Note that the default installation path is "/usr/local".
|
||||
|
||||
Please read the file README.UNX, it contains _critical_ information
|
||||
regarding the installation of FreeType on many Unix systems.
|
||||
5. With an IDE Project File (e.g. for Visual Studio or CodeWarrior):
|
||||
|
||||
we provide a small number of "project files" for various IDEs to
|
||||
automatically build the library as well. Note that these files are
|
||||
not supported and sporadically maintained by FreeType developers,
|
||||
so don't expect them to work in each release.
|
||||
|
||||
to find them, have a look at the content of the "builds/<system>"
|
||||
directory, where <system> stands for your OS or environment.
|
||||
|
||||
|
||||
II. From the command line
|
||||
-------------------------
|
||||
|
||||
If you are not using Unix, there are two ways to quickly build
|
||||
FreeType 2 from the command line.
|
||||
|
||||
The first, and favorite one, is to use the "Jam" build tool. Jam is
|
||||
a highly portable replacement for Make whose control files do not
|
||||
depend on the current platform or compiler toolset.
|
||||
|
||||
For more information, please see:
|
||||
|
||||
http://www.freetype.org/jam/index.html
|
||||
|
||||
The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
|
||||
6. From you own IDE, or own Makefiles:
|
||||
|
||||
If you want to create your own project file, follow the instructions
|
||||
given in the "INSTALL.ANY" document of this directory.
|
||||
|
||||
|
||||
1. Building FT2 with "Jam"
|
||||
--------------------------
|
||||
II. Custom builds of the library:
|
||||
|
||||
Once you've got *our version* of the Jam tool installed on your
|
||||
system, simply go to the top-level FT2 directory, then type
|
||||
|
||||
"jam"
|
||||
|
||||
on the command line. This will build the library and place it in
|
||||
the "objs" directory.
|
||||
|
||||
By default, a static library is built. On Unix systems, it is
|
||||
possible to build a shared library through the "libtool" script.
|
||||
You need to have libtool installed on your system, then re-define
|
||||
a few environment variables before invoking Jam, as in
|
||||
|
||||
export CC="libtool --mode=compile cc"
|
||||
export LINK="libtool --mode=link cc"
|
||||
jam
|
||||
|
||||
In later releases of FT2, building shared libraries with Jam
|
||||
should become automatic on Unix systems.
|
||||
Customizing the compilation of FreeType is easy, and allows you to select
|
||||
only the components of the font engine that you really need. For more details
|
||||
read the file "CUSTOMIZE"
|
||||
|
||||
|
||||
2. Building FT2 with "GNU Make"
|
||||
-------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
You need to have GNU Make (version 3.78.1 or newer) installed on
|
||||
your system to compile the library from the command line. This will
|
||||
_NOT_ work with other make tools (including BSD make)!
|
||||
[1] More details on: http://www.freetype.org/patents.html
|
||||
|
||||
[Well, this is not really correct. Recently, a perl implementation
|
||||
of make called `makepp' has appeared which can also build FreeType 2
|
||||
successfully on Unix platforms. See http://makepp.sourceforge.net
|
||||
for more details.]
|
||||
End of file
|
||||
|
||||
- Go to the `freetype2' directory.
|
||||
|
||||
- Unix (any C compiler should work):
|
||||
|
||||
- make setup (don't worry, this will invoke a configure script)
|
||||
- make
|
||||
- make install
|
||||
|
||||
Alternatively, you can pass parameters to the configure script
|
||||
within the CFG variable, as in:
|
||||
|
||||
- make setup CFG="--prefix=/usr"
|
||||
- make
|
||||
- make install
|
||||
|
||||
If the configure script isn't run, try to add `unix' as a target
|
||||
on the command line, e.g.:
|
||||
|
||||
- make setup unix CFG="--prefix=/opt/experimental"
|
||||
|
||||
|
||||
- Windows:
|
||||
|
||||
We provide a version of GNU Make for Win32 on the FreeType site.
|
||||
See http://www.freetype.org/download.html for details.
|
||||
|
||||
- gcc (Mingw, _not_ CygWin):
|
||||
|
||||
- make setup
|
||||
- make
|
||||
|
||||
|
||||
- Visual C++:
|
||||
|
||||
- make setup visualc
|
||||
- make
|
||||
|
||||
|
||||
- other compilers:
|
||||
|
||||
- make setup bcc32 -> Borland C++ 32 bits
|
||||
- make setup intelc -> Intel C++
|
||||
- make setup watcom -> Watcom C++
|
||||
- make setup lcc -> Win32-LCC
|
||||
|
||||
|
||||
If you want to build FreeType 2 in another directory, you must set
|
||||
two environment variables, `OJB_DIR' and `TOP_DIR'. The former
|
||||
gives the directory where the object files and the library should be
|
||||
created (this directory must exist), the latter the top directory of
|
||||
the FreeType 2 source tree. Example:
|
||||
|
||||
OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
|
||||
make -f$TOP_DIR/Makefile setup ansi
|
||||
OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
|
||||
make -f$TOP_DIR/Makefile
|
||||
|
||||
On Unix boxes, calling `configure' from the build directory is
|
||||
sufficient; it will build a small Makefile which calls the
|
||||
FreeType 2 Makefile with the necessary parameters.
|
||||
|
||||
|
||||
III. In your own environment (IDE)
|
||||
----------------------------------
|
||||
|
||||
You need to add the directories "freetype2/include" to your include
|
||||
path when compiling the library.
|
||||
|
||||
FreeType 2 is made of several components; each one of them is
|
||||
located in a subdirectory of "freetype2/src". For example,
|
||||
`freetype2/src/truetype/' contains the TrueType font driver.
|
||||
|
||||
DO NOT COMPILE ALL C FILES! Rather, compile the following ones:
|
||||
|
||||
-- base components (required)
|
||||
|
||||
src/base/ftsystem.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftdebug.c
|
||||
src/base/ftbase.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftbbox.c
|
||||
src/base/ftmm.c
|
||||
|
||||
src/base/ftmac.c -- only on the Macintosh
|
||||
|
||||
-- other components are optional
|
||||
|
||||
src/autohint/autohint.c -- auto hinting module
|
||||
src/cache/ftcache.c -- cache sub-system (in beta)
|
||||
src/sfnt/sfnt.c -- SFNT files support
|
||||
(TrueType & OpenType)
|
||||
src/cff/cff.c -- CFF/OpenType font driver
|
||||
src/psnames/psnames.c -- Postscript glyph names support
|
||||
src/psaux/psaux.c -- Postscript Type 1 parsing
|
||||
src/truetype/truetype.c -- TrueType font driver
|
||||
src/type1/type1.c -- Type 1 font driver
|
||||
src/cid/type1cid.c -- Type 1 CID-keyed font driver
|
||||
src/winfonts/winfonts.c -- Windows FONT / FNT font driver
|
||||
|
||||
Note:
|
||||
|
||||
`truetype.c' needs `sfnt.c' and `psnames.c'
|
||||
`type1.c' needs `psaux.c' and `psnames.c'
|
||||
`type1cid.c' needs `psaux.c' and `psnames.c'
|
||||
`cff.c' needs `sfnt.c', `psaux.c', and `psnames.c'
|
||||
|
||||
etc.
|
||||
|
||||
For more information, please consult "docs/BUILD".
|
||||
|
||||
--- end of INSTALL --
|
||||
|
96
reactos/lib/freetype/docs/INSTALL.ANY
Normal file
96
reactos/lib/freetype/docs/INSTALL.ANY
Normal file
|
@ -0,0 +1,96 @@
|
|||
Instructions on how to build FreeType with your own build tool:
|
||||
|
||||
see the file "CUSTOMIZE" to learn how to customize FreeType to
|
||||
specific environments.
|
||||
|
||||
follow these simple steps:
|
||||
|
||||
I. Normal way:
|
||||
--------------
|
||||
|
||||
* DISABLE PRE-COMPILED HEADERS ! This is very important for Visual
|
||||
C++, because FreeType uses lines like:
|
||||
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
which are not correctly supported by this compiler, while being
|
||||
ISO C compliant !!
|
||||
|
||||
* You need to add the directories "freetype2/include" to your include
|
||||
path when compiling the library.
|
||||
|
||||
* FreeType 2 is made of several components; each one of them is
|
||||
located in a subdirectory of "freetype2/src". For example,
|
||||
'freetype2/src/truetype/' contains the TrueType font driver.
|
||||
|
||||
* DO NOT COMPILE ALL C FILES! Rather, compile the following ones:
|
||||
|
||||
-- base components (required)
|
||||
|
||||
src/base/ftsystem.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftdebug.c
|
||||
src/base/ftbase.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftbbox.c
|
||||
src/base/ftmm.c
|
||||
src/base/ftpfr.c -- optional, see <freetype/ftpfr.h>
|
||||
src/base/ftbdf.c -- optional, see <freetype/ftbdf.h>
|
||||
src/base/ftwinfnt.c -- optional, see <freetype/ftwinfnt.h>
|
||||
|
||||
src/base/ftmac.c -- only on the Macintosh
|
||||
|
||||
-- other components are optional
|
||||
|
||||
src/autohint/autohint.c -- auto hinting module
|
||||
src/cache/ftcache.c -- cache sub-system (in beta)
|
||||
src/sfnt/sfnt.c -- SFNT files support
|
||||
(TrueType & OpenType)
|
||||
src/cff/cff.c -- CFF/OpenType font driver
|
||||
src/pfr/pfr.c -- PFR/TrueDoc font driver
|
||||
src/bdf/bdf.c -- BDF font driver
|
||||
src/pcf/pcf.c -- PCF font driver
|
||||
src/psnames/psnames.c -- Postscript glyph names support
|
||||
src/psaux/psaux.c -- Postscript Type 1 parsing
|
||||
src/truetype/truetype.c -- TrueType font driver
|
||||
src/type1/type1.c -- Type 1 font driver
|
||||
src/cid/type1cid.c -- Type 1 CID-keyed font driver
|
||||
src/winfonts/winfonts.c -- Windows FONT / FNT font driver
|
||||
src/raster1/raster1.c -- monochrome rasterizer
|
||||
src/smooth/smooth.c -- anti-aliasing rasterizer
|
||||
|
||||
Note:
|
||||
|
||||
`truetype.c' needs `sfnt.c' and `psnames.c'
|
||||
`type1.c' needs `psaux.c' and `psnames.c'
|
||||
`type1cid.c' needs `psaux.c' and `psnames.c'
|
||||
`cff.c' needs `sfnt.c', `psaux.c', and `psnames.c'
|
||||
|
||||
that should be it ! in case of problems, see the archives of
|
||||
the FreeType development mailing list.
|
||||
|
||||
|
||||
II. Support for flat-directory compilation
|
||||
------------------------------------------
|
||||
|
||||
It is possible to put all FreeType 2 source files into a single
|
||||
directory, with the *exception* of the `include' hierarchy.
|
||||
|
||||
1. Copy all files in current directory:
|
||||
|
||||
cp freetype2/src/base/*.[hc] .
|
||||
cp freetype2/src/raster1/*.[hc] .
|
||||
cp freetype2/src/smooth/*.[hc] .
|
||||
etc.
|
||||
|
||||
2. Compile sources:
|
||||
|
||||
cc -c -Ifreetype2/include ftsystem.c
|
||||
cc -c -Ifreetype2/include ftinit.c
|
||||
cc -c -Ifreetype2/include ftdebug.c
|
||||
cc -c -Ifreetype2/include ftbase.c
|
||||
etc.
|
||||
|
||||
You don't need to define the FT_FLAT_COMPILATION macro (as this was
|
||||
required in previous releases of FreeType 2).
|
||||
|
128
reactos/lib/freetype/docs/INSTALL.GNU
Normal file
128
reactos/lib/freetype/docs/INSTALL.GNU
Normal file
|
@ -0,0 +1,128 @@
|
|||
This document contains instructions on how to build the FreeType library
|
||||
on non-Unix systems with the help of GNU Make. Note that if you're running
|
||||
Cygwin or MSys in Windows, you should follow the instructions of INSTALL.UNX
|
||||
instead.
|
||||
|
||||
|
||||
FreeType 2 includes a powerful and flexible build system that allows
|
||||
you to easily compile it on a great variety of platforms from the
|
||||
command line. To do so, just follow these simple instructions:
|
||||
|
||||
a. Install GNU Make
|
||||
|
||||
Because GNU Make is the only Make tool supported to compile
|
||||
FreeType 2, you should install it on your machine.
|
||||
|
||||
The FreeType 2 build system relies on many features special to GNU
|
||||
Make -- trying to build the library with any other Make tool will
|
||||
*fail*.
|
||||
|
||||
NEARLY ALL OTHER MAKE TOOLS WILL FAIL, INCLUDING "BSD MAKE", SO
|
||||
REALLY INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
|
||||
|
||||
Make sure that you are invoking GNU Make from the command line, by
|
||||
typing something like:
|
||||
|
||||
make -v
|
||||
|
||||
to display its version number.
|
||||
|
||||
VERSION 3.78.1 OR NEWER IS NEEDED!
|
||||
|
||||
|
||||
|
||||
b. Invoke 'make'
|
||||
|
||||
Go to the root directory of FreeType 2, then simply invoke GNU
|
||||
Make from the command line. This will launch the FreeType 2 host
|
||||
platform detection routines. A summary will be displayed, for
|
||||
example, on Win32:
|
||||
|
||||
|
||||
==============================================================
|
||||
FreeType build system -- automatic system detection
|
||||
|
||||
The following settings are used:
|
||||
|
||||
platform win32
|
||||
compiler gcc
|
||||
configuration directory ./builds/win32
|
||||
configuration rules ./builds/win32/w32-gcc.mk
|
||||
|
||||
If this does not correspond to your system or settings please
|
||||
remove the file 'config.mk' from this directory then read the
|
||||
INSTALL file for help.
|
||||
|
||||
Otherwise, simply type 'make' again to build the library.
|
||||
=============================================================
|
||||
|
||||
|
||||
If the detected settings correspond to your platform and compiler,
|
||||
skip to step e. Note that if your platform is completely alien to
|
||||
the build system, the detected platform will be 'ansi'.
|
||||
|
||||
|
||||
c. Configure the build system for a different compiler
|
||||
|
||||
If the build system correctly detected your platform, but you want
|
||||
to use a different compiler than the one specified in the summary
|
||||
(for most platforms, gcc is the defaut compiler), invoke GNU Make
|
||||
with
|
||||
|
||||
make setup <compiler>
|
||||
|
||||
For example:
|
||||
|
||||
to use Visual C++ on Win32, type: "make setup visualc"
|
||||
to use Borland C++ on Win32, type "make setup bcc32"
|
||||
to use Watcom C++ on Win32, type "make setup watcom"
|
||||
to use Intel C++ on Win32, type "make setup intelc"
|
||||
to use LCC-Win32 on Win32, type: "make setup lcc"
|
||||
to use Watcom C++ on OS/2, type "make setup watcom"
|
||||
to use VisualAge C++ on OS/2, type "make setup visualage"
|
||||
|
||||
The <compiler> name to use is platform-dependent. The list of
|
||||
available compilers for your system is available in the file
|
||||
`builds/<system>/detect.mk'
|
||||
|
||||
If you are satisfied by the new configuration summary, skip to
|
||||
step e.
|
||||
|
||||
d. Configure the build system for an unknown platform/compiler
|
||||
|
||||
The auto-detection/setup phase of the build system copies a file
|
||||
to the current directory under the name `config.mk'.
|
||||
|
||||
For example, on OS/2+gcc, it would simply copy
|
||||
`builds/os2/os2-gcc.mk' to `./config.mk'.
|
||||
|
||||
If for some reason your platform isn't correctly detected, copy
|
||||
manually the configuration sub-makefile to `./config.mk' and go to
|
||||
step e.
|
||||
|
||||
Note that this file is a sub-Makefile used to specify Make
|
||||
variables for compiler and linker invocation during the build.
|
||||
You can easily create your own version from one of the existing
|
||||
configuration files, then copy it to the current directory under
|
||||
the name `./config.mk'.
|
||||
|
||||
e. Build the library
|
||||
|
||||
The auto-detection/setup phase should have copied a file in the
|
||||
current directory, called `./config.mk'. This file contains
|
||||
definitions of various Make variables used to invoke the compiler
|
||||
and linker during the build.
|
||||
|
||||
To launch the build, simply invoke GNU Make again: The top
|
||||
Makefile will detect the configuration file and run the build with
|
||||
it.
|
||||
|
||||
|
||||
|
||||
Final note:
|
||||
|
||||
the build system builds a statically linked library of the font engine
|
||||
in the "objs" directory. It does _not_ support the build of DLLs on
|
||||
Windows and OS/2, if you need these, you'll have to either use
|
||||
a IDE-specific project file, or follow the instructions in
|
||||
"INSTALL.ANY" to create your own Makefiles.
|
181
reactos/lib/freetype/docs/INSTALL.UNX
Normal file
181
reactos/lib/freetype/docs/INSTALL.UNX
Normal file
|
@ -0,0 +1,181 @@
|
|||
This document contains instructions on how to build the FreeType library
|
||||
on Unix systems. This also works for emulations like Cygwin or MSys on
|
||||
Win32:
|
||||
|
||||
|
||||
I. Ensure that you are using GNU Make
|
||||
-------------------------------------
|
||||
|
||||
The FreeType build system _exclusively_ works with GNU Make. You
|
||||
will not be able to compile the library with the instructions
|
||||
below using any other alternative (including BSD Make).
|
||||
|
||||
Trying to compile the library with a different Make tool will
|
||||
print a message like:
|
||||
|
||||
Sorry, GNU make is required to build FreeType2.
|
||||
|
||||
and the build process will be aborted. If this happens, install
|
||||
GNU Make on your system, and use the GNUMAKE environment variable
|
||||
to name it.
|
||||
|
||||
|
||||
|
||||
IV. Build and install the library
|
||||
---------------------------------
|
||||
|
||||
The following should work on all Unix systems where the 'make'
|
||||
command invokes GNU Make:
|
||||
|
||||
./configure --prefix=<yourprefix>
|
||||
make
|
||||
make install (as root)
|
||||
|
||||
where "<yourprefix>" must be replaced by the prefix returned by
|
||||
the "freetype-config" command.
|
||||
|
||||
When using a different command to invoke GNU Make, use the GNUMAKE
|
||||
variable. For example, if `gmake' is the command to use on your
|
||||
system, do something like:
|
||||
|
||||
GNUMAKE=gmake ./configure --prefix=<yourprefix>
|
||||
gmake
|
||||
gmake install (as root)
|
||||
|
||||
If this still doesn't work, something's rotten on your system(
|
||||
(e.g. you're using a very old version of GNU Make)
|
||||
|
||||
|
||||
|
||||
I. Unix systems
|
||||
---------------
|
||||
|
||||
If you have GNU Make installed, simply type
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
on the command line to configure, build and install FreeType on your
|
||||
system. Note that the default installation path is "/usr/local".
|
||||
|
||||
Please read the file README.UNX, it contains _critical_ information
|
||||
regarding the installation of FreeType on many Unix systems.
|
||||
|
||||
|
||||
II. From the command line
|
||||
-------------------------
|
||||
|
||||
If you are not using Unix, there are two ways to quickly build
|
||||
FreeType 2 from the command line.
|
||||
|
||||
The first, and favorite one, is to use the "Jam" build tool. Jam is
|
||||
a highly portable replacement for Make whose control files do not
|
||||
depend on the current platform or compiler toolset.
|
||||
|
||||
For more information, please see:
|
||||
|
||||
http://www.freetype.org/jam/index.html
|
||||
|
||||
The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
|
||||
|
||||
|
||||
1. Building FT2 with "Jam"
|
||||
--------------------------
|
||||
|
||||
Once you've got *our version* of the Jam tool installed on your
|
||||
system, simply go to the top-level FT2 directory, then type
|
||||
|
||||
"jam"
|
||||
|
||||
on the command line. This will build the library and place it in
|
||||
the "objs" directory.
|
||||
|
||||
By default, a static library is built. On Unix systems, it is
|
||||
possible to build a shared library through the "libtool" script.
|
||||
You need to have libtool installed on your system, then re-define
|
||||
a few environment variables before invoking Jam, as in
|
||||
|
||||
export CC="libtool --mode=compile cc"
|
||||
export LINK="libtool --mode=link cc"
|
||||
jam
|
||||
|
||||
In later releases of FT2, building shared libraries with Jam
|
||||
should become automatic on Unix systems.
|
||||
|
||||
|
||||
2. Building FT2 with "GNU Make"
|
||||
-------------------------------
|
||||
|
||||
You need to have GNU Make (version 3.78.1 or newer) installed on
|
||||
your system to compile the library from the command line. This will
|
||||
_NOT_ work with other make tools (including BSD make)!
|
||||
|
||||
[Well, this is not really correct. Recently, a perl implementation
|
||||
of make called `makepp' has appeared which can also build FreeType 2
|
||||
successfully on Unix platforms. See http://makepp.sourceforge.net
|
||||
for more details.]
|
||||
|
||||
- Go to the `freetype2' directory.
|
||||
|
||||
- Unix (any C compiler should work):
|
||||
|
||||
- make setup (don't worry, this will invoke a configure script)
|
||||
- make
|
||||
- make install
|
||||
|
||||
Alternatively, you can pass parameters to the configure script
|
||||
within the CFG variable, as in:
|
||||
|
||||
- make setup CFG="--prefix=/usr"
|
||||
- make
|
||||
- make install
|
||||
|
||||
If the configure script isn't run, try to add `unix' as a target
|
||||
on the command line, e.g.:
|
||||
|
||||
- make setup unix CFG="--prefix=/opt/experimental"
|
||||
|
||||
|
||||
- Windows:
|
||||
|
||||
We provide a version of GNU Make for Win32 on the FreeType site.
|
||||
See http://www.freetype.org/download.html for details.
|
||||
|
||||
- gcc (Mingw, _not_ CygWin):
|
||||
|
||||
- make setup
|
||||
- make
|
||||
|
||||
|
||||
- Visual C++:
|
||||
|
||||
- make setup visualc
|
||||
- make
|
||||
|
||||
|
||||
- other compilers:
|
||||
|
||||
- make setup bcc32 -> Borland C++ 32 bits
|
||||
- make setup intelc -> Intel C++
|
||||
- make setup watcom -> Watcom C++
|
||||
- make setup lcc -> Win32-LCC
|
||||
|
||||
|
||||
If you want to build FreeType 2 in another directory, you must set
|
||||
two environment variables, `OJB_DIR' and `TOP_DIR'. The former
|
||||
gives the directory where the object files and the library should be
|
||||
created (this directory must exist), the latter the top directory of
|
||||
the FreeType 2 source tree. Example:
|
||||
|
||||
OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
|
||||
make -f$TOP_DIR/Makefile setup ansi
|
||||
OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
|
||||
make -f$TOP_DIR/Makefile
|
||||
|
||||
On Unix boxes, calling `configure' from the build directory is
|
||||
sufficient; it will build a small Makefile which calls the
|
||||
FreeType 2 Makefile with the necessary parameters.
|
||||
|
||||
|
||||
--- end of INSTALL --
|
|
@ -4,6 +4,10 @@ document "docs/BUGS".
|
|||
Here is a list of items that need to be addressed in FreeType 2; they are
|
||||
not exactly bugs, but should be considered though:
|
||||
|
||||
* Add synthesized Unicode charmap processing to the CFF driver.
|
||||
|
||||
* Implement stem3/counter hints properly in the Postscript hinter.
|
||||
|
||||
* FInalize the cache sub-system. If has been in beta for too long :-)
|
||||
|
||||
* The automatic and Postscript hinters have been improved to increase
|
||||
the quality of AA text, but Monochrome and LCD hinting still suck. we
|
||||
need to do something about that..
|
||||
|
|
23
reactos/lib/freetype/docs/TRUETYPE
Normal file
23
reactos/lib/freetype/docs/TRUETYPE
Normal file
|
@ -0,0 +1,23 @@
|
|||
How to enable the TrueType native hinter if you need it
|
||||
--------------------------------------------------------
|
||||
|
||||
The TrueType bytecode interpreter is disabled in all public
|
||||
releases of the FreeType packages for patents reasons (see
|
||||
http://www.freetype.org/patents.html for more details).
|
||||
|
||||
However, many Linux distributions do enable the interpreter in the
|
||||
FreeType packages (DEB/RPM/etc.) they produce for their platforms.
|
||||
If you are using TrueType fonts on your system, you most probably
|
||||
want to enable it manually by doing the following:
|
||||
|
||||
- open the file "include/freetype/config/ftoption.h"
|
||||
|
||||
- locate a line that says:
|
||||
|
||||
#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
- change it to:
|
||||
|
||||
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
of course, this must be done _before_ compiling the library
|
|
@ -7,31 +7,14 @@ SPECIAL NOTE FOR UNIX USERS
|
|||
perform a few special steps to ensure that everything goes well.
|
||||
|
||||
|
||||
|
||||
I. Enable the TrueType bytecode hinter if you need it
|
||||
-----------------------------------------------------
|
||||
|
||||
The TrueType bytecode interpreter is disabled in all public
|
||||
releases of the FreeType packages for patents reasons (see
|
||||
http://www.freetype.org/patents.html for more details).
|
||||
|
||||
However, many Linux distributions do enable the interpreter in the
|
||||
FreeType packages (DEB/RPM/etc.) they produce for their platforms.
|
||||
If you are using TrueType fonts on your system, you most probably
|
||||
want to enable it manually by doing the following:
|
||||
|
||||
- open the file "include/freetype/config/ftoption.h"
|
||||
|
||||
- locate a line that says:
|
||||
|
||||
#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
- change it to:
|
||||
|
||||
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
of course, this must be done _before_ compiling the library
|
||||
|
||||
See the instructions in the file "TRUETYPE" of this directory.
|
||||
|
||||
Note that FreeType supports TrueType fonts without the bytecode
|
||||
interpreter through its auto-hinter, which now generate relatively good
|
||||
results with most fonts.
|
||||
|
||||
|
||||
II. Determine the correct installation path
|
|
@ -1,7 +1,90 @@
|
|||
Libtool's version for FreeType 2.1.3 is `9.2.3'.
|
||||
Due to our use of "libtool" to generate and install the FreeType 2 libraries
|
||||
on Unix systems, as well as other historical events, it is generally very
|
||||
difficult to know precisely which release of the font engine is installed
|
||||
on a given system.
|
||||
|
||||
On most platforms, the soname will be `6.3.2' (e.g. `libfreetype.so.6.3.2').
|
||||
This file tries to explain why and to document ways to properly detect
|
||||
FreeType on Unix.
|
||||
|
||||
Libtool's version for FreeType 2.1.2 is `9.1.3'.
|
||||
|
||||
On most platforms, the soname will be `6.3.1' (e.g. `libfreetype.so.6.3.1').
|
||||
I. Version & Release numbers:
|
||||
|
||||
For each new public release of FreeType 2, there are generally *three*
|
||||
distinct "version" numbers to consider:
|
||||
|
||||
* the official FT2 release number, like 2.0.9, or 2.1.3
|
||||
|
||||
* the libtool (and Unix) specific version number, like "9.2.3". This
|
||||
is what "freetype-config --version" will return
|
||||
|
||||
* the platform-specific shared object number, used for example when
|
||||
the library is installed as "/usr/lib/libfreetype.so.6.3.2"
|
||||
|
||||
|
||||
the platform-specific number is, unsurprisingly, platform-specific and varies
|
||||
with the operating system you're using (several variants of Linux, FreeBSD,
|
||||
Solaris, etc...). You should thus _never_ use it, even for simple tests.
|
||||
|
||||
the libtool-specific number does not equal the release number but is tied
|
||||
to it.
|
||||
|
||||
the release number is available at *compile* time through the following
|
||||
macros defined in FT_FREETYPE_H:
|
||||
|
||||
- FREETYPE_MAJOR : major release number
|
||||
- FREETYPE_MINOR : minor release number
|
||||
- FREETYPE_PATCH : patch release number
|
||||
|
||||
see below for some Autoconf fragment to
|
||||
|
||||
|
||||
the release number is also available at *runtime* through the
|
||||
"FT_Library_Version" API. Unfortunately, this one wasn't available or
|
||||
working correctly before the 2.1.3 official release !!
|
||||
|
||||
|
||||
II. Table:
|
||||
|
||||
the following is a simple table that gives, for each official release,
|
||||
the corresponding libtool number, as well as the shared object number
|
||||
found on _most_ systems, but not all of them:
|
||||
|
||||
release libtool so
|
||||
-------------------------------------
|
||||
2.1.4 9.3.3 6.3.3
|
||||
2.1.3 9.2.3 6.3.2
|
||||
2.1.2 9.1.3 6.3.1
|
||||
2.1.1 9.0.3 ?
|
||||
2.1.0 8.0.2 ?
|
||||
2.0.9 9.0.3 ?
|
||||
2.0.8 8.0.2 ?
|
||||
|
||||
the libtool numbers are a bit inconsistent due to the library's history:
|
||||
|
||||
- 2.1.0 was created as a development branch from 2.0.8
|
||||
(hence the same libtool numbers)
|
||||
|
||||
- 2.0.9 was a bug-fix release of the "stable" branch, we
|
||||
apparently incorrectly increased its libtool number
|
||||
|
||||
- 2.1.4 is still in the "development" branch, however it's stable enough
|
||||
to be the basis of an upcoming 2.2.0 release
|
||||
|
||||
|
||||
|
||||
III. AutoConf Code Fragment:
|
||||
|
||||
Lars Clausen contributed the following Autoconf fragment to detect at
|
||||
which version of FreeType is installed on your system. This one tests
|
||||
for a version that is at least 2.0.9, you should change the last line to
|
||||
check against other release numbers.
|
||||
|
||||
AC_MSG_CHECKING([for version of FreeType])
|
||||
FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
|
||||
FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
|
||||
FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
|
||||
FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
|
||||
FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR * 1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
|
||||
AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
|
||||
if test "$FREETYPE_VERSION" -ge 2000009; then
|
||||
|
||||
|
|
|
@ -1,11 +1,28 @@
|
|||
|
||||
FreeType comes with two licenses from which you can choose the one which
|
||||
fits your needs best:
|
||||
The FreeType 2 font engine is copyrighted work, and cannot be
|
||||
used legally without a software license. In order to make this
|
||||
project usable to a vast majority of developers, we distribute it
|
||||
under two dual licenses.
|
||||
|
||||
. The FreeType License, in file `docs/FTL.txt'.
|
||||
What this means is that *you* must choose *one* license among those
|
||||
described below, then obey all its terms and conditions when using
|
||||
FreeType 2 in any of your projects or products:
|
||||
|
||||
. The GNU General Public License, in file `docs/GPL.txt'.
|
||||
|
||||
The contributed PCF driver comes with a license similar to that of X Window
|
||||
System which is compatible to the above two licenses (see file
|
||||
src/pcf/readme).
|
||||
- The FreeType License, found in the file "FTL.TXT", which is
|
||||
an BSD-style open-source license *with* an advertising
|
||||
clause that forces you to explicitely cite the
|
||||
FreeType project in your product's documentation. All
|
||||
details are in the license file
|
||||
|
||||
|
||||
- The GNU General Public License, found in "GPL.TXT", which is
|
||||
the traditionnal and "viral" GPL license, that
|
||||
forces you to redistribute the _complete_ sources of all
|
||||
your products that simply use FreeType 2.
|
||||
|
||||
|
||||
Note that the contributed PCF driver comes with a license similar to
|
||||
that of X Window System which is compatible to the above two
|
||||
licenses (see file src/pcf/readme).
|
||||
|
||||
|
|
|
@ -51,6 +51,9 @@ FT_GlyphLoader_New
|
|||
FT_GlyphLoader_Prepare
|
||||
FT_GlyphLoader_Reset
|
||||
FT_GlyphLoader_Rewind
|
||||
ft_glyphslot_alloc_bitmap
|
||||
ft_glyphslot_free_bitmap
|
||||
ft_glyphslot_set_bitmap
|
||||
FT_Library_Version
|
||||
FT_List_Add
|
||||
FT_List_Finalize
|
||||
|
@ -61,6 +64,7 @@ FT_List_Remove
|
|||
FT_List_Up
|
||||
FT_Load_Char
|
||||
FT_Load_Glyph
|
||||
FT_Load_Sfnt_Table
|
||||
FT_Lookup_Renderer
|
||||
FT_MulDiv
|
||||
FT_MulFix
|
||||
|
@ -148,12 +152,25 @@ FT_Get_Multi_Master
|
|||
FT_Set_MM_Blend_Coordinates
|
||||
FT_Set_MM_Design_Coordinates
|
||||
FT_Get_BDF_Charset_ID
|
||||
FT_Get_BDF_Property
|
||||
FT_Get_PS_Font_Info
|
||||
FT_Has_PS_Glyph_Names
|
||||
FT_Get_X11_Font_Format
|
||||
FT_Get_PFR_Advance
|
||||
FT_Get_PFR_Kerning
|
||||
FT_Get_PFR_Metrics
|
||||
FT_Stroker_BeginSubPath
|
||||
FT_Stroker_ConicTo
|
||||
FT_Stroker_CubicTo
|
||||
FT_Stroker_Done
|
||||
FT_Stroker_EndSubPath
|
||||
FT_Stroker_Export
|
||||
FT_Stroker_GetCounts
|
||||
FT_Stroker_LineTo
|
||||
FT_Stroker_New
|
||||
FT_Stroker_ParseOutline
|
||||
FT_Stroker_Set
|
||||
FT_Get_WinFNT_Header
|
||||
FT_Outline_Get_BBox
|
||||
ah_arctan
|
||||
autohint_module_class
|
||||
|
|
|
@ -373,6 +373,17 @@
|
|||
#define FT_GZIP_H <freetype/ftgzip.h>
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @macro: */
|
||||
/* FT_WINFONTS_H */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A macro used in #include statements to name the file containing */
|
||||
/* the definitions of an API to support Windows .FNT files */
|
||||
/* */
|
||||
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @macro: */
|
||||
|
|
|
@ -469,6 +469,25 @@ FT_BEGIN_HEADER
|
|||
|
||||
/* */
|
||||
|
||||
/*
|
||||
* the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
|
||||
* improvements to the auto-hinter contributed by David Chester. They will
|
||||
* most likely disappear completely in the next release. For now, you should
|
||||
* always keep them defined
|
||||
*
|
||||
*/
|
||||
#define FT_CONFIG_OPTION_CHESTER_HINTS
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
|
||||
|
||||
# define FT_CONFIG_CHESTER_SMALL_F
|
||||
# define FT_CONFIG_CHESTER_ASCENDER
|
||||
# define FT_CONFIG_CHESTER_SERIF
|
||||
# define FT_CONFIG_CHESTER_STEM
|
||||
# define FT_CONFIG_CHESTER_BLUE_SCALE
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/* */
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 1
|
||||
#define FREETYPE_PATCH 3
|
||||
#define FREETYPE_PATCH 4
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
|
@ -1105,8 +1105,6 @@ FT_BEGIN_HEADER
|
|||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* FreeType base size metrics */
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Size_Metrics */
|
||||
/* */
|
||||
|
@ -1135,7 +1133,7 @@ FT_BEGIN_HEADER
|
|||
/* pixels. Always positive. */
|
||||
/* */
|
||||
/* descender :: The descender, expressed in 26.6 fixed point */
|
||||
/* pixels. Always positive. */
|
||||
/* pixels. Always negative. */
|
||||
/* */
|
||||
/* height :: The text height, expressed in 26.6 fixed point */
|
||||
/* pixels. Always positive. */
|
||||
|
@ -1494,6 +1492,16 @@ FT_BEGIN_HEADER
|
|||
/* */
|
||||
/* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */
|
||||
/* */
|
||||
/* ft_open_memory :: deprecated. use @FT_OPEN_MEMORY instead */
|
||||
/* */
|
||||
/* ft_open_stream :: deprecated. use @FT_OPEN_STREAM instead */
|
||||
/* */
|
||||
/* ft_open_pathname :: deprecated. use @FT_OPEN_PATHNAME instead */
|
||||
/* */
|
||||
/* ft_open_driver :: deprecated, use @FT_OPEN_DRIVER instead */
|
||||
/* */
|
||||
/* ft_open_params :: deprecated, use @FT_OPEN_PARAMS instead */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
|
||||
/* flags are mutually exclusive. */
|
||||
|
@ -1508,11 +1516,11 @@ FT_BEGIN_HEADER
|
|||
|
||||
} FT_Open_Flags;
|
||||
|
||||
#define FT_OPEN_MEMORY FT_OPEN_MEMORY
|
||||
#define FT_OPEN_STREAM FT_OPEN_STREAM
|
||||
#define FT_OPEN_PATHNAME FT_OPEN_PATHNAME
|
||||
#define FT_OPEN_DRIVER FT_OPEN_DRIVER
|
||||
#define FT_OPEN_PARAMS FT_OPEN_PARAMS
|
||||
#define ft_open_memory FT_OPEN_MEMORY /* deprecated */
|
||||
#define ft_open_stream FT_OPEN_STREAM /* deprecated */
|
||||
#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
|
||||
#define ft_open_driver FT_OPEN_DRIVER /* deprecated */
|
||||
#define ft_open_params FT_OPEN_PARAMS /* deprecated */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -43,6 +43,73 @@ FT_BEGIN_HEADER
|
|||
/*************************************************************************/
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_PropertyType
|
||||
*
|
||||
* @description:
|
||||
* list of BDF property types
|
||||
*
|
||||
* @values:
|
||||
* BDF_PROPERTY_TYPE_NONE ::
|
||||
* value 0 is used to indicate a missing property
|
||||
*
|
||||
* BDF_PROPERTY_TYPE_ATOM ::
|
||||
* property is a string atom
|
||||
*
|
||||
* BDF_PROPERTY_TYPE_INTEGER ::
|
||||
* property is a 32-bit signed integer
|
||||
*
|
||||
* BDF_PROPERTY_TYPE_CARDINAL ::
|
||||
* property is a 32-bit unsigned integer
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
BDF_PROPERTY_TYPE_NONE = 0,
|
||||
BDF_PROPERTY_TYPE_ATOM = 1,
|
||||
BDF_PROPERTY_TYPE_INTEGER = 2,
|
||||
BDF_PROPERTY_TYPE_CARDINAL = 3
|
||||
|
||||
} BDF_PropertyType;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @type: BDF_Property
|
||||
*
|
||||
* @description:
|
||||
* handle to a @BDF_PropertyRec structure used to model a given
|
||||
* BDF/PCF property
|
||||
*/
|
||||
typedef struct BDF_PropertyRec_* BDF_Property;
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @struct: BDF_PropertyRec
|
||||
*
|
||||
* @description:
|
||||
* models a given BDF/PCF property
|
||||
*
|
||||
* @note:
|
||||
* type :: property type
|
||||
* u.atom :: atom string, when type is @BDF_PROPERTY_TYPE_ATOM
|
||||
* u.integer :: signed integer, when type is @BDF_PROPERTY_TYPE_INTEGER
|
||||
* u.cardinal :: unsigned integer, when type is @BDF_PROPERTY_TYPE_CARDINAL
|
||||
*/
|
||||
typedef struct BDF_PropertyRec_
|
||||
{
|
||||
BDF_PropertyType type;
|
||||
union {
|
||||
const char* atom;
|
||||
FT_Int32 integer;
|
||||
FT_UInt32 cardinal;
|
||||
|
||||
} u;
|
||||
|
||||
} BDF_PropertyRec;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
|
@ -74,6 +141,37 @@ FT_BEGIN_HEADER
|
|||
const char* *acharset_encoding,
|
||||
const char* *acharset_registry );
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_BDF_Property
|
||||
*
|
||||
* @description:
|
||||
* Retrieves a BDF property from a BDF or PCF font file
|
||||
*
|
||||
* @input:
|
||||
* face :: handle to input face
|
||||
* name :: property name
|
||||
*
|
||||
* @output:
|
||||
* aproperty :: the property
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0 means success.
|
||||
*
|
||||
* @note:
|
||||
* This function works with BDF _and_ PCF fonts. It returns an error
|
||||
* otherwise. it also returns an error when the property is not in the
|
||||
* font.
|
||||
*
|
||||
* in case of error, "aproperty->type" is always set to
|
||||
* @BDF_PROPERTY_TYPE_NONE
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_BDF_Property( FT_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty );
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
|
|
@ -483,7 +483,7 @@ FT_BEGIN_HEADER
|
|||
/* The result is undefined if either `a' or `b' is zero. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Matrix_Multiply( FT_Matrix* a,
|
||||
FT_Matrix_Multiply( const FT_Matrix* a,
|
||||
FT_Matrix* b );
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTXF86_H__
|
||||
#define __FTXF86_H__
|
||||
#ifndef __FTGZIP_H__
|
||||
#define __FTGZIP_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
@ -83,4 +83,4 @@ FT_BEGIN_HEADER
|
|||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTXF86_H__ */
|
||||
#endif /* __FTGZIP_H__ */
|
||||
|
|
|
@ -174,21 +174,22 @@ FT_BEGIN_HEADER
|
|||
* vertical ::
|
||||
* If true, return vertical metrics.
|
||||
*
|
||||
* ametrics ::
|
||||
* This parameter is used for both input and output.
|
||||
* The original glyph metrics, if any, in font units. If metrics are
|
||||
* not available all the values must be set to zero.
|
||||
*
|
||||
* @output:
|
||||
* ametrics ::
|
||||
* The glyph metrics in font units.
|
||||
*
|
||||
* afound ::
|
||||
* True if there are metrics at all.
|
||||
* The replacement glyph metrics in font units.
|
||||
*
|
||||
*/
|
||||
typedef FT_Error
|
||||
(*FT_Incremental_GetGlyphMetricsFunc)
|
||||
( FT_Incremental incremental,
|
||||
FT_UInt glyph_index,
|
||||
FT_Bool vertical,
|
||||
FT_Incremental_MetricsRec *ametrics,
|
||||
FT_Bool *afound );
|
||||
( FT_Incremental incremental,
|
||||
FT_UInt glyph_index,
|
||||
FT_Bool vertical,
|
||||
FT_Incremental_MetricsRec *ametrics );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
|
129
reactos/lib/freetype/include/freetype/ftwinfnt.h
Normal file
129
reactos/lib/freetype/include/freetype/ftwinfnt.h
Normal file
|
@ -0,0 +1,129 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftwinfnt.h */
|
||||
/* */
|
||||
/* FreeType API for accessing Windows fnt-specific data. */
|
||||
/* */
|
||||
/* Copyright 2002 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. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTWINFNT_H__
|
||||
#define __FTWINFNT_H__
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* winfnt_fonts */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Window FNT Fonts */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* Windows FNT specific APIs */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains the declaration of Windows FNT specific */
|
||||
/* functions. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_WinFNT_HeaderRec_ */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Windows FNT Header info. */
|
||||
/* */
|
||||
typedef struct FT_WinFNT_HeaderRec_
|
||||
{
|
||||
FT_UShort version;
|
||||
FT_ULong file_size;
|
||||
FT_Byte copyright[60];
|
||||
FT_UShort file_type;
|
||||
FT_UShort nominal_point_size;
|
||||
FT_UShort vertical_resolution;
|
||||
FT_UShort horizontal_resolution;
|
||||
FT_UShort ascent;
|
||||
FT_UShort internal_leading;
|
||||
FT_UShort external_leading;
|
||||
FT_Byte italic;
|
||||
FT_Byte underline;
|
||||
FT_Byte strike_out;
|
||||
FT_UShort weight;
|
||||
FT_Byte charset;
|
||||
FT_UShort pixel_width;
|
||||
FT_UShort pixel_height;
|
||||
FT_Byte pitch_and_family;
|
||||
FT_UShort avg_width;
|
||||
FT_UShort max_width;
|
||||
FT_Byte first_char;
|
||||
FT_Byte last_char;
|
||||
FT_Byte default_char;
|
||||
FT_Byte break_char;
|
||||
FT_UShort bytes_per_row;
|
||||
FT_ULong device_offset;
|
||||
FT_ULong face_name_offset;
|
||||
FT_ULong bits_pointer;
|
||||
FT_ULong bits_offset;
|
||||
FT_Byte reserved;
|
||||
FT_ULong flags;
|
||||
FT_UShort A_space;
|
||||
FT_UShort B_space;
|
||||
FT_UShort C_space;
|
||||
FT_UShort color_table_offset;
|
||||
FT_ULong reserved1[4];
|
||||
|
||||
} FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_WinFNT_Header
|
||||
*
|
||||
* @description:
|
||||
* Retrieves a Windows FNT font info header.
|
||||
*
|
||||
* @input:
|
||||
* face :: handle to input face
|
||||
*
|
||||
* @output:
|
||||
* header :: WinFNT header.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0 means success.
|
||||
*
|
||||
* @note:
|
||||
* This function only works with Windows FNT faces, returning an erro
|
||||
* otherwise.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_WinFNT_Header( FT_Face face,
|
||||
FT_WinFNT_HeaderRec *header );
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTWINFNT_H__ */
|
||||
|
||||
|
||||
/* END */
|
|
@ -29,6 +29,7 @@ THE SOFTWARE.
|
|||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_BDF_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
@ -44,6 +45,10 @@ FT_BEGIN_HEADER
|
|||
} BDF_Public_FaceRec, *BDF_Public_Face;
|
||||
|
||||
|
||||
typedef FT_Error (*BDF_GetPropertyFunc)( FT_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty );
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_WINFONTS_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
@ -71,57 +72,15 @@ FT_BEGIN_HEADER
|
|||
#define WINFNT_NE_MAGIC 0x454E
|
||||
|
||||
|
||||
typedef struct WinFNT_HeaderRec_
|
||||
{
|
||||
FT_UShort version;
|
||||
FT_ULong file_size;
|
||||
FT_Byte copyright[60];
|
||||
FT_UShort file_type;
|
||||
FT_UShort nominal_point_size;
|
||||
FT_UShort vertical_resolution;
|
||||
FT_UShort horizontal_resolution;
|
||||
FT_UShort ascent;
|
||||
FT_UShort internal_leading;
|
||||
FT_UShort external_leading;
|
||||
FT_Byte italic;
|
||||
FT_Byte underline;
|
||||
FT_Byte strike_out;
|
||||
FT_UShort weight;
|
||||
FT_Byte charset;
|
||||
FT_UShort pixel_width;
|
||||
FT_UShort pixel_height;
|
||||
FT_Byte pitch_and_family;
|
||||
FT_UShort avg_width;
|
||||
FT_UShort max_width;
|
||||
FT_Byte first_char;
|
||||
FT_Byte last_char;
|
||||
FT_Byte default_char;
|
||||
FT_Byte break_char;
|
||||
FT_UShort bytes_per_row;
|
||||
FT_ULong device_offset;
|
||||
FT_ULong face_name_offset;
|
||||
FT_ULong bits_pointer;
|
||||
FT_ULong bits_offset;
|
||||
FT_Byte reserved;
|
||||
FT_ULong flags;
|
||||
FT_UShort A_space;
|
||||
FT_UShort B_space;
|
||||
FT_UShort C_space;
|
||||
FT_UShort color_table_offset;
|
||||
FT_Byte reserved2[4];
|
||||
|
||||
} WinFNT_HeaderRec, *WinFNT_Header;
|
||||
|
||||
|
||||
typedef struct FNT_FontRec_
|
||||
{
|
||||
FT_ULong offset;
|
||||
FT_Int size_shift;
|
||||
FT_ULong offset;
|
||||
FT_Int size_shift;
|
||||
|
||||
WinFNT_HeaderRec header;
|
||||
FT_WinFNT_HeaderRec header;
|
||||
|
||||
FT_Byte* fnt_frame;
|
||||
FT_ULong fnt_size;
|
||||
FT_Byte* fnt_frame;
|
||||
FT_ULong fnt_size;
|
||||
|
||||
} FNT_FontRec, *FNT_Font;
|
||||
|
||||
|
|
|
@ -462,6 +462,8 @@ FT_BEGIN_HEADER
|
|||
FT_Get_Module_Interface( FT_Library library,
|
||||
const char* mod_name );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
@ -534,6 +536,30 @@ FT_BEGIN_HEADER
|
|||
FT_BASE( void )
|
||||
FT_Done_GlyphSlot( FT_GlyphSlot slot );
|
||||
|
||||
/* */
|
||||
|
||||
/*
|
||||
* free the bitmap of a given glyphslot when needed
|
||||
* (i.e. only when it was allocated with ft_glyphslot_alloc_bitmap)
|
||||
*/
|
||||
FT_BASE( void )
|
||||
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
|
||||
|
||||
/*
|
||||
* allocate a new bitmap buffer in a glyph slot
|
||||
*/
|
||||
FT_BASE( FT_Error )
|
||||
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
|
||||
FT_ULong size );
|
||||
|
||||
/*
|
||||
* set the bitmap buffer in a glyph slot to a given pointer.
|
||||
* the buffer will not be freed by a later call to ft_glyphslot_free_bitmap
|
||||
*/
|
||||
FT_BASE( void )
|
||||
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
|
||||
FT_Pointer buffer );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -457,6 +457,21 @@ FT_BEGIN_HEADER
|
|||
(*TT_Free_Table_Func)( TT_Face face );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <FuncType> */
|
||||
/* SFNT_Load_Table_Func */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Loads a given SFNT table in memory */
|
||||
/* */
|
||||
typedef FT_Error
|
||||
(*SFNT_Load_Table_Func)( FT_Face face,
|
||||
FT_ULong tag,
|
||||
FT_Long offset,
|
||||
FT_Byte* buffer,
|
||||
FT_ULong* length );
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
|
|
|
@ -99,18 +99,18 @@ FT_BEGIN_HEADER
|
|||
* TT_APPLE_ID_UNICODE_1_1 ::
|
||||
* Unicode 1.1; specifies Hangul characters starting at U+34xx.
|
||||
* TT_APPLE_ID_ISO_10646 ::
|
||||
* Deprecated.
|
||||
* Deprecated (identical to preceding.)
|
||||
* TT_APPLE_ID_UNICODE_2_0 ::
|
||||
* Unicode 2.0 and beyond (UTF-16 BMP only).
|
||||
* Unicode 2.0 and beyond (UTF-16 BMP only.)
|
||||
* TT_APPLE_ID_UNICODE_32 ::
|
||||
* UTF-32 (Adobe proposal for OpenType).
|
||||
* Unicode 3.1 and beyond, using UTF-32
|
||||
*/
|
||||
|
||||
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
|
||||
#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
|
||||
#define TT_APPLE_ID_ISO_10646 2 /* deprecated */
|
||||
#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
|
||||
#define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */
|
||||
#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -257,8 +257,8 @@ FT_BEGIN_HEADER
|
|||
* Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB.
|
||||
*
|
||||
* TT_MS_ID_UCS_4 ::
|
||||
* Corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe
|
||||
* proposal for OpenType.
|
||||
* Corresponds to UCS-4 or UTF-32 charmaps. This has been added into
|
||||
* OpenType specification as of version 1.4 (mid-2001.)
|
||||
*/
|
||||
|
||||
#define TT_MS_ID_SYMBOL_CS 0
|
||||
|
@ -443,10 +443,15 @@ FT_BEGIN_HEADER
|
|||
/* of the TTF `name' table if the `platform' identifier code is */
|
||||
/* TT_PLATFORM_MICROSOFT. */
|
||||
/* */
|
||||
/* The canonical source for the MS assigned LCID's is at */
|
||||
/* The canonical source for the MS assigned LCID's used to be at */
|
||||
/* */
|
||||
/* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */
|
||||
/* */
|
||||
/* Now (2002-11-15), the Microsoft site directs to */
|
||||
/* */
|
||||
/* http://www.microsoft.com/globaldev/reference/loclanghome.asp */
|
||||
/* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */
|
||||
/* */
|
||||
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
|
||||
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
|
||||
#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01
|
||||
|
@ -787,8 +792,10 @@ FT_BEGIN_HEADER
|
|||
/* Bit 7 Greek and Coptic */
|
||||
#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */
|
||||
/* Bit 8 is reserved (was: Greek Symbols and Coptic) */
|
||||
/* Bit 9 Cyrillic */
|
||||
/* Bit 9 Cyrillic + */
|
||||
/* Cyrillic Supplementary */
|
||||
#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */
|
||||
/* U+0500-U+052F */
|
||||
/* Bit 10 Armenian */
|
||||
#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */
|
||||
/* Bit 11 Hebrew */
|
||||
|
@ -843,10 +850,20 @@ FT_BEGIN_HEADER
|
|||
#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */
|
||||
/* Bit 36 Number Forms */
|
||||
#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */
|
||||
/* Bit 37 Arrows */
|
||||
/* Bit 37 Arrows + */
|
||||
/* Supplemental Arrows-A + */
|
||||
/* Supplemental Arrows-B */
|
||||
#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */
|
||||
/* Bit 38 Mathematical Operators */
|
||||
/* U+27F0-U+27FF */
|
||||
/* U+2900-U+297F */
|
||||
/* Bit 38 Mathematical Operators + */
|
||||
/* Supplemental Mathematical Operators + */
|
||||
/* Miscellaneous Mathematical Symbols-A + */
|
||||
/* Miscellaneous Mathematical Symbols-B */
|
||||
#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */
|
||||
/* U+2A00-U+2AFF */
|
||||
/* U+27C0-U+27EF */
|
||||
/* U+2980-U+29FF */
|
||||
/* Bit 39 Miscellaneous Technical */
|
||||
#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */
|
||||
/* Bit 40 Control Pictures */
|
||||
|
@ -872,8 +889,10 @@ FT_BEGIN_HEADER
|
|||
#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */
|
||||
/* Bit 49 Hiragana */
|
||||
#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */
|
||||
/* Bit 50 Katakana */
|
||||
/* Bit 50 Katakana + */
|
||||
/* Katakana Phonetic Extensions */
|
||||
#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */
|
||||
/* U+31F0-U+31FF */
|
||||
/* Bit 51 Bopomofo + */
|
||||
/* Bopomofo Extended */
|
||||
#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */
|
||||
|
@ -914,11 +933,16 @@ FT_BEGIN_HEADER
|
|||
/* Kangxi Radicals + */
|
||||
/* Ideographic Description Characters + */
|
||||
/* CJK Unified Ideographs Extension A */
|
||||
/* CJK Unified Ideographs Extension A + */
|
||||
/* CJK Unified Ideographs Extension B + */
|
||||
/* Kanbun */
|
||||
#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */
|
||||
/* U+2E80-U+2EFF */
|
||||
/* U+2F00-U+2FDF */
|
||||
/* U+2FF0-U+2FFF */
|
||||
/* U+3400-U+4DB5 */
|
||||
/*U+20000-U+2A6DF*/
|
||||
/* U+3190-U+319F */
|
||||
|
||||
/* Private Use Area */
|
||||
|
||||
|
@ -927,8 +951,10 @@ FT_BEGIN_HEADER
|
|||
|
||||
/* Compatibility Area and Specials */
|
||||
|
||||
/* Bit 61 CJK Compatibility Ideographs */
|
||||
/* Bit 61 CJK Compatibility Ideographs + */
|
||||
/* CJK Compatibility Ideographs Supplement */
|
||||
#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */
|
||||
/*U+2F800-U+2FA1F*/
|
||||
/* Bit 62 Alphabetic Presentation Forms */
|
||||
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */
|
||||
/* Bit 63 Arabic Presentation Forms-A */
|
||||
|
@ -975,6 +1001,34 @@ FT_BEGIN_HEADER
|
|||
/* Yi Radicals */
|
||||
#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */
|
||||
/* U+A490-U+A4CF */
|
||||
/* Bit 84 Tagalog + */
|
||||
/* Hanunoo + */
|
||||
/* Buhid + */
|
||||
/* Tagbanwa */
|
||||
#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */
|
||||
/* U+1720-U+173F */
|
||||
/* U+1740-U+175F */
|
||||
/* U+1760-U+177F */
|
||||
/* Bit 85 Old Italic */
|
||||
#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/
|
||||
/* Bit 86 Gothic */
|
||||
#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/
|
||||
/* Bit 87 Deseret */
|
||||
#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/
|
||||
/* Bit 88 Byzantine Musical Symbols + */
|
||||
/* Musical Symbols */
|
||||
#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/
|
||||
/*U+1D100-U+1D1FF*/
|
||||
/* Bit 89 Mathematical Alphanumeric Symbols */
|
||||
#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/
|
||||
/* Bit 90 Private Use (plane 15) + */
|
||||
/* Private Use (plane 16) */
|
||||
#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/
|
||||
/*U+100000-U+10FFFD*/
|
||||
/* Bit 91 Variation Selectors */
|
||||
#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */
|
||||
/* Bit 92 Tags */
|
||||
#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -593,6 +593,63 @@ FT_BEGIN_HEADER
|
|||
FT_Get_Sfnt_Table( FT_Face face,
|
||||
FT_Sfnt_Tag tag );
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* <Function>
|
||||
* FT_Load_Sfnt_Table
|
||||
*
|
||||
* <Description>
|
||||
* Loads any font table into client memory.
|
||||
*
|
||||
* <Input>
|
||||
* face :: handle to source face.
|
||||
* tag :: the 4-byte tag of the table to load. Use the value 0 if
|
||||
* you want to access the whole font file. Else, you can use
|
||||
* one of the definitions found in the @FT_TRUETYPE_TAGS_H
|
||||
* file, or forge a new one with @FT_MAKE_TAG
|
||||
*
|
||||
* offset :: the starting offset in the table (or file if tag == 0)
|
||||
*
|
||||
* <Output>
|
||||
* buffer :: target buffer address. client must ensure that there are
|
||||
* enough bytes in it.
|
||||
*
|
||||
* <InOut>
|
||||
* length :: if the 'length' parameter is NULL, then try to load the whole
|
||||
* table, and return an error code if it fails.
|
||||
*
|
||||
* else, if '*length' is 0, then exit immediately while returning
|
||||
* the table's (or file) full size in it.
|
||||
*
|
||||
* else, the number of bytes to read from the table or file,
|
||||
* from the starting offset.
|
||||
*
|
||||
* <Return>
|
||||
* error code. 0 means success
|
||||
*
|
||||
* <Note>
|
||||
* if you need to determine the table's length you should first call this
|
||||
* function with "*length" set to 0, as in the following example:
|
||||
*
|
||||
* {
|
||||
* FT_ULong length = 0;
|
||||
*
|
||||
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
|
||||
* if ( error ) { ... table does not exist ... }
|
||||
*
|
||||
* buffer = malloc( length );
|
||||
* if ( buffer == NULL ) { ... not enough memory ... }
|
||||
*
|
||||
* error = FT_Load_Sfnt_Table( face,tag, 0, buffer, &length );
|
||||
* if ( error ) { ... could not load table ... }
|
||||
* }
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Load_Sfnt_Table( FT_Face face,
|
||||
FT_ULong tag,
|
||||
FT_Long offset,
|
||||
FT_Byte* buffer,
|
||||
FT_ULong* length );
|
||||
|
||||
/* */
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
{
|
||||
"THEZOCQS",
|
||||
"HEZLOCUS",
|
||||
#ifdef FT_CONFIG_CHESTER_SMALL_F
|
||||
"fijkdbh",
|
||||
#endif
|
||||
"xzroesc",
|
||||
"xzroesc",
|
||||
"pqgjy"
|
||||
|
@ -320,7 +323,7 @@
|
|||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
error = ah_outline_load( hinter->glyph, hinter->face );
|
||||
error = ah_outline_load( hinter->glyph, 0x10000L, 0x10000L, hinter->face );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
|
|
|
@ -32,8 +32,18 @@
|
|||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
#define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
|
||||
(b) == AH_BLUE_SMALL_TOP )
|
||||
#ifdef FT_CONFIG_CHESTER_SMALL_F
|
||||
|
||||
# define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
|
||||
(b) == AH_BLUE_SMALL_F_TOP || \
|
||||
(b) == AH_BLUE_SMALL_TOP )
|
||||
|
||||
#else /* !CHESTER_SMALL_F */
|
||||
|
||||
# define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
|
||||
(b) == AH_BLUE_SMALL_TOP )
|
||||
|
||||
#endif /* !CHESTER_SMALL_F */
|
||||
|
||||
|
||||
/* compute global metrics automatically */
|
||||
|
|
|
@ -389,6 +389,8 @@
|
|||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
ah_outline_load( AH_Outline outline,
|
||||
FT_Fixed x_scale,
|
||||
FT_Fixed y_scale,
|
||||
FT_Face face )
|
||||
{
|
||||
FT_Memory memory = outline->memory;
|
||||
|
@ -461,8 +463,8 @@
|
|||
outline->horz_major_dir = AH_DIR_RIGHT;
|
||||
}
|
||||
|
||||
outline->x_scale = face->size->metrics.x_scale;
|
||||
outline->y_scale = face->size->metrics.y_scale;
|
||||
outline->x_scale = x_scale;
|
||||
outline->y_scale = y_scale;
|
||||
|
||||
points = outline->points;
|
||||
if ( outline->num_points == 0 )
|
||||
|
@ -478,8 +480,6 @@
|
|||
/* compute coordinates */
|
||||
{
|
||||
FT_Vector* vec = source->points;
|
||||
FT_Fixed x_scale = outline->x_scale;
|
||||
FT_Fixed y_scale = outline->y_scale;
|
||||
|
||||
|
||||
for ( point = points; point < point_limit; vec++, point++ )
|
||||
|
@ -1350,10 +1350,20 @@
|
|||
else
|
||||
edge2 = seg2->edge;
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_SERIF
|
||||
if ( is_serif )
|
||||
{
|
||||
edge->serif = edge2;
|
||||
edge2->flags |= AH_EDGE_SERIF;
|
||||
}
|
||||
else
|
||||
edge->link = edge2;
|
||||
#else /* !CHESTER_SERIF */
|
||||
if ( is_serif )
|
||||
edge->serif = edge2;
|
||||
else
|
||||
edge->link = edge2;
|
||||
#endif
|
||||
}
|
||||
|
||||
seg = seg->edge_next;
|
||||
|
@ -1477,8 +1487,14 @@
|
|||
|
||||
/* compute the initial threshold as a fraction of the EM size */
|
||||
best_dist = FT_MulFix( face_globals->face->units_per_EM / 40, y_scale );
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_SMALL_F
|
||||
if ( best_dist > 64 / 2 )
|
||||
best_dist = 64 / 2;
|
||||
#else
|
||||
if ( best_dist > 64 / 4 )
|
||||
best_dist = 64 / 4;
|
||||
best_dist = 64 / 4;
|
||||
#endif
|
||||
|
||||
for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
|
||||
{
|
||||
|
|
|
@ -58,6 +58,8 @@ FT_BEGIN_HEADER
|
|||
|
||||
FT_LOCAL( FT_Error )
|
||||
ah_outline_load( AH_Outline outline,
|
||||
FT_Fixed x_scale,
|
||||
FT_Fixed y_scale,
|
||||
FT_Face face );
|
||||
|
||||
FT_LOCAL( void )
|
||||
|
|
|
@ -88,6 +88,137 @@
|
|||
|
||||
|
||||
/* compute the snapped width of a given stem */
|
||||
#ifdef FT_CONFIG_CHESTER_SERIF
|
||||
static FT_Pos
|
||||
ah_compute_stem_width( AH_Hinter hinter,
|
||||
int vertical,
|
||||
FT_Pos width,
|
||||
AH_Edge_Flags base_flags,
|
||||
AH_Edge_Flags stem_flags )
|
||||
{
|
||||
AH_Globals globals = &hinter->globals->scaled;
|
||||
FT_Pos dist = width;
|
||||
FT_Int sign = 0;
|
||||
|
||||
|
||||
if ( dist < 0 )
|
||||
{
|
||||
dist = -width;
|
||||
sign = 1;
|
||||
}
|
||||
|
||||
if ( !hinter->do_stem_adjust )
|
||||
{
|
||||
/* leave stem widths unchanged */
|
||||
}
|
||||
else if ( ( vertical && !hinter->do_vert_snapping ) ||
|
||||
( !vertical && !hinter->do_horz_snapping ) )
|
||||
{
|
||||
/* smooth hinting process, very lightly quantize the stem width */
|
||||
/* */
|
||||
|
||||
/* leave the widths of serifs alone */
|
||||
|
||||
if ( ( stem_flags & AH_EDGE_SERIF ) && vertical && ( dist < 3 * 64 ) )
|
||||
goto Done_Width;
|
||||
|
||||
else if ( ( base_flags & AH_EDGE_ROUND ) )
|
||||
{
|
||||
if ( dist < 80 )
|
||||
dist = 64;
|
||||
}
|
||||
else if ( dist < 56 )
|
||||
dist = 56;
|
||||
|
||||
{
|
||||
FT_Pos delta = dist - globals->stds[vertical];
|
||||
|
||||
|
||||
if ( delta < 0 )
|
||||
delta = -delta;
|
||||
|
||||
if ( delta < 40 )
|
||||
{
|
||||
dist = globals->stds[vertical];
|
||||
if ( dist < 48 )
|
||||
dist = 48;
|
||||
|
||||
goto Done_Width;
|
||||
}
|
||||
|
||||
if ( dist < 3 * 64 )
|
||||
{
|
||||
delta = ( dist & 63 );
|
||||
dist &= -64;
|
||||
|
||||
if ( delta < 10 )
|
||||
dist += delta;
|
||||
|
||||
else if ( delta < 32 )
|
||||
dist += 10;
|
||||
|
||||
else if ( delta < 54 )
|
||||
dist += 54;
|
||||
|
||||
else
|
||||
dist += delta;
|
||||
}
|
||||
else
|
||||
dist = ( dist + 32 ) & -64;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* strong hinting process, snap the stem width to integer pixels */
|
||||
/* */
|
||||
if ( vertical )
|
||||
{
|
||||
dist = ah_snap_width( globals->heights, globals->num_heights, dist );
|
||||
|
||||
/* in the case of vertical hinting, always round */
|
||||
/* the stem heights to integer pixels */
|
||||
if ( dist >= 64 )
|
||||
dist = ( dist + 16 ) & -64;
|
||||
else
|
||||
dist = 64;
|
||||
}
|
||||
else
|
||||
{
|
||||
dist = ah_snap_width( globals->widths, globals->num_widths, dist );
|
||||
|
||||
if ( hinter->flags & AH_HINTER_MONOCHROME )
|
||||
{
|
||||
/* monochrome horizontal hinting: snap widths to integer pixels */
|
||||
/* with a different threshold */
|
||||
if ( dist < 64 )
|
||||
dist = 64;
|
||||
else
|
||||
dist = ( dist + 32 ) & -64;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* for horizontal anti-aliased hinting, we adopt a more subtle */
|
||||
/* approach: we strengthen small stems, round stems whose size */
|
||||
/* is between 1 and 2 pixels to an integer, otherwise nothing */
|
||||
if ( dist < 48 )
|
||||
dist = ( dist + 64 ) >> 1;
|
||||
|
||||
else if ( dist < 128 )
|
||||
dist = ( dist + 22 ) & -64;
|
||||
else
|
||||
/* XXX: round otherwise, prevent color fringes in LCD mode */
|
||||
dist = ( dist + 32 ) & -64;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Done_Width:
|
||||
if ( sign )
|
||||
dist = -dist;
|
||||
|
||||
return dist;
|
||||
}
|
||||
#else /* !CHESTER_SERIF */
|
||||
static FT_Pos
|
||||
ah_compute_stem_width( AH_Hinter hinter,
|
||||
int vertical,
|
||||
|
@ -104,8 +235,12 @@
|
|||
sign = 1;
|
||||
}
|
||||
|
||||
if ( ( vertical && !hinter->do_vert_snapping ) ||
|
||||
( !vertical && !hinter->do_horz_snapping ) )
|
||||
if ( !hinter->do_stem_adjust )
|
||||
{
|
||||
/* leave stem widths unchanged */
|
||||
}
|
||||
else if ( ( vertical && !hinter->do_vert_snapping ) ||
|
||||
( !vertical && !hinter->do_horz_snapping ) )
|
||||
{
|
||||
/* smooth hinting process, very lightly quantize the stem width */
|
||||
/* */
|
||||
|
@ -197,6 +332,7 @@
|
|||
|
||||
return dist;
|
||||
}
|
||||
#endif /* !CHESTER_SERIF */
|
||||
|
||||
|
||||
/* align one stem edge relative to the previous stem edge */
|
||||
|
@ -208,9 +344,18 @@
|
|||
{
|
||||
FT_Pos dist = stem_edge->opos - base_edge->opos;
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_SERIF
|
||||
FT_Pos fitted_width = ah_compute_stem_width( hinter,
|
||||
vertical,
|
||||
dist,
|
||||
base_edge->flags,
|
||||
stem_edge->flags );
|
||||
|
||||
stem_edge->pos = base_edge->pos + fitted_width;
|
||||
#else
|
||||
stem_edge->pos = base_edge->pos +
|
||||
ah_compute_stem_width( hinter, vertical, dist );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,7 +369,7 @@
|
|||
FT_Pos sign = 1;
|
||||
|
||||
FT_UNUSED( hinter );
|
||||
|
||||
FT_UNUSED( vertical );
|
||||
|
||||
dist = serif->opos - base->opos;
|
||||
if ( dist < 0 )
|
||||
|
@ -364,12 +509,61 @@
|
|||
|
||||
if ( !anchor )
|
||||
{
|
||||
#ifdef FT_CONFIG_CHESTER_STEM
|
||||
FT_Pos org_len, org_center, cur_len;
|
||||
FT_Pos cur_pos1, error1, error2, u_off, d_off;
|
||||
|
||||
org_len = edge2->opos - edge->opos;
|
||||
cur_len = ah_compute_stem_width( hinter, dimension, org_len,
|
||||
edge->flags, edge2->flags );
|
||||
|
||||
if (cur_len <= 64 )
|
||||
u_off = d_off = 32;
|
||||
else
|
||||
{
|
||||
u_off = 38;
|
||||
d_off = 26;
|
||||
}
|
||||
|
||||
if ( cur_len < 96 )
|
||||
{
|
||||
org_center = edge->opos + ( org_len >> 1 );
|
||||
|
||||
cur_pos1 = ( org_center + 32 ) & -64;
|
||||
|
||||
error1 = org_center - ( cur_pos1 - u_off );
|
||||
if ( error1 < 0 )
|
||||
error1 = -error1;
|
||||
|
||||
error2 = org_center - ( cur_pos1 + d_off );
|
||||
if ( error2 < 0 )
|
||||
error2 = -error2;
|
||||
|
||||
if ( error1 < error2 )
|
||||
cur_pos1 -= u_off;
|
||||
else
|
||||
cur_pos1 += d_off;
|
||||
|
||||
edge->pos = cur_pos1 - cur_len / 2;
|
||||
edge2->pos = cur_pos1 + cur_len / 2;
|
||||
|
||||
}
|
||||
else
|
||||
edge->pos = ( edge->opos + 32 ) & -64;
|
||||
|
||||
anchor = edge;
|
||||
|
||||
edge->flags |= AH_EDGE_DONE;
|
||||
|
||||
ah_align_linked_edge( hinter, edge, edge2, dimension );
|
||||
#else /* !CHESTER_STEM */
|
||||
edge->pos = ( edge->opos + 32 ) & -64;
|
||||
anchor = edge;
|
||||
|
||||
edge->flags |= AH_EDGE_DONE;
|
||||
|
||||
ah_align_linked_edge( hinter, edge, edge2, dimension );
|
||||
#endif /* !CHESTER_STEM */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -381,7 +575,70 @@
|
|||
org_len = edge2->opos - edge->opos;
|
||||
org_center = org_pos + ( org_len >> 1 );
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_SERIF
|
||||
cur_len = ah_compute_stem_width( hinter, dimension, org_len,
|
||||
edge->flags, edge2->flags );
|
||||
#else /* !CHESTER_SERIF */
|
||||
cur_len = ah_compute_stem_width( hinter, dimension, org_len );
|
||||
#endif /* !CHESTER_SERIF */
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_STEM
|
||||
if ( cur_len < 96 )
|
||||
{
|
||||
FT_Pos u_off, d_off;
|
||||
|
||||
|
||||
cur_pos1 = ( org_center + 32 ) & -64;
|
||||
|
||||
if (cur_len <= 64 )
|
||||
u_off = d_off = 32;
|
||||
else
|
||||
{
|
||||
u_off = 38;
|
||||
d_off = 26;
|
||||
}
|
||||
|
||||
delta1 = org_center - (cur_pos1 - u_off);
|
||||
if ( delta1 < 0 )
|
||||
delta1 = -delta1;
|
||||
|
||||
delta2 = org_center - (cur_pos1 + d_off);
|
||||
if ( delta2 < 0 )
|
||||
delta2 = -delta2;
|
||||
|
||||
if ( delta1 < delta2 )
|
||||
cur_pos1 -= u_off;
|
||||
else
|
||||
cur_pos1 += d_off;
|
||||
|
||||
edge->pos = cur_pos1 - cur_len / 2;
|
||||
edge2->pos = cur_pos1 + cur_len / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
org_pos = anchor->pos + (edge->opos - anchor->opos);
|
||||
org_len = edge2->opos - edge->opos;
|
||||
org_center = org_pos + ( org_len >> 1 );
|
||||
|
||||
cur_len = ah_compute_stem_width( hinter, dimension, org_len,
|
||||
edge->flags, edge2->flags );
|
||||
|
||||
cur_pos1 = ( org_pos + 32 ) & -64;
|
||||
delta1 = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
|
||||
if ( delta1 < 0 )
|
||||
delta1 = -delta1;
|
||||
|
||||
cur_pos2 = ( ( org_pos + org_len + 32 ) & -64 ) - cur_len;
|
||||
delta2 = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
|
||||
if ( delta2 < 0 )
|
||||
delta2 = -delta2;
|
||||
|
||||
edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
|
||||
edge2->pos = edge->pos + cur_len;
|
||||
}
|
||||
|
||||
#else /* !CHESTER_STEM */
|
||||
|
||||
cur_pos1 = ( org_pos + 32 ) & -64;
|
||||
delta1 = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
|
||||
|
@ -396,6 +653,8 @@
|
|||
edge->pos = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
|
||||
edge2->pos = edge->pos + cur_len;
|
||||
|
||||
#endif /* !CHESTER_STEM */
|
||||
|
||||
edge->flags |= AH_EDGE_DONE;
|
||||
edge2->flags |= AH_EDGE_DONE;
|
||||
|
||||
|
@ -1051,8 +1310,8 @@
|
|||
FT_Face face = hinter->face;
|
||||
FT_GlyphSlot slot = face->glyph;
|
||||
FT_Slot_Internal internal = slot->internal;
|
||||
FT_Fixed x_scale = face->size->metrics.x_scale;
|
||||
FT_Fixed y_scale = face->size->metrics.y_scale;
|
||||
FT_Fixed x_scale = hinter->globals->x_scale;
|
||||
FT_Fixed y_scale = hinter->globals->y_scale;
|
||||
FT_Error error;
|
||||
AH_Outline outline = hinter->glyph;
|
||||
AH_Loader gloader = hinter->loader;
|
||||
|
@ -1132,7 +1391,7 @@
|
|||
|
||||
/* now, load the slot image into the auto-outline, and run the */
|
||||
/* automatic hinting process */
|
||||
error = ah_outline_load( outline, face ); /* XXX: change to slot */
|
||||
error = ah_outline_load( outline, x_scale, y_scale, face );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
|
@ -1169,9 +1428,11 @@
|
|||
hinter->pp1.x = ( ( new_lsb - old_lsb ) + 32 ) & -64;
|
||||
hinter->pp2.x = ( ( edge2->pos + old_rsb ) + 32 ) & -64;
|
||||
|
||||
#if 0
|
||||
/* try to fix certain bad advance computations */
|
||||
if ( hinter->pp2.x + hinter->pp1.x == edge2->pos && old_rsb > 4 )
|
||||
hinter->pp2.x += 64;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* good, we simply add the glyph to our loader's base */
|
||||
|
@ -1400,6 +1661,36 @@
|
|||
|
||||
}
|
||||
|
||||
#ifdef FT_CONFIG_CHESTER_BLUE_SCALE
|
||||
/* try to optimize the y_scale so that the top of non-capital letters
|
||||
* is aligned on a pixel boundary whenever possible
|
||||
*/
|
||||
{
|
||||
AH_Globals design = &face_globals->design;
|
||||
FT_Pos shoot = design->blue_shoots[ AH_BLUE_SMALL_TOP ];
|
||||
|
||||
/* the value of 'shoot' will be -1000 if the font doesn't have */
|
||||
/* small latin letters; we simply check the sign here... */
|
||||
if ( shoot > 0 )
|
||||
{
|
||||
FT_Pos scaled = FT_MulFix( shoot, y_scale );
|
||||
FT_Pos fitted = ( scaled + 32 ) & -64;
|
||||
|
||||
if ( scaled != fitted )
|
||||
{
|
||||
/* adjust y_scale
|
||||
*/
|
||||
y_scale = FT_MulDiv( y_scale, fitted, scaled );
|
||||
|
||||
/* adust x_scale
|
||||
*/
|
||||
if ( fitted < scaled )
|
||||
x_scale -= x_scale/50; /* x_scale*0.98 with integers */
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* FT_CONFIG_CHESTER_BLUE_SCALE */
|
||||
|
||||
/* now, we must check the current character pixel size to see if we */
|
||||
/* need to rescale the global metrics */
|
||||
if ( face_globals->x_scale != x_scale ||
|
||||
|
@ -1409,8 +1700,8 @@
|
|||
ah_loader_rewind( hinter->loader );
|
||||
|
||||
/* reset hinting flags according to load flags and current render target */
|
||||
hinter->do_horz_hints = !FT_BOOL( load_flags & FT_LOAD_NO_AUTOHINT );
|
||||
hinter->do_vert_hints = !FT_BOOL( load_flags & FT_LOAD_NO_AUTOHINT );
|
||||
hinter->do_horz_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
|
||||
hinter->do_vert_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
|
||||
|
||||
#ifdef DEBUG_HINTER
|
||||
hinter->do_horz_hints = !ah_debug_disable_vert; /* not a bug, the meaning */
|
||||
|
@ -1427,6 +1718,8 @@
|
|||
hinter->do_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||
|
||||
hint_mode == FT_RENDER_MODE_LCD_V );
|
||||
|
||||
hinter->do_stem_adjust = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );
|
||||
|
||||
#if 1
|
||||
load_flags = FT_LOAD_NO_SCALE
|
||||
| FT_LOAD_IGNORE_TRANSFORM ;
|
||||
|
|
|
@ -385,12 +385,26 @@ FT_BEGIN_HEADER
|
|||
} AH_OutlineRec, *AH_Outline;
|
||||
|
||||
|
||||
#define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
|
||||
#define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
|
||||
#define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc */
|
||||
#define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
|
||||
#define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
|
||||
#define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
|
||||
#ifdef FT_CONFIG_CHESTER_SMALL_F
|
||||
|
||||
# define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
|
||||
# define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
|
||||
# define AH_BLUE_SMALL_F_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* fijkdbh */
|
||||
# define AH_BLUE_SMALL_TOP ( AH_BLUE_SMALL_F_TOP + 1 ) /* xzroesc */
|
||||
# define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
|
||||
# define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
|
||||
# define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
|
||||
|
||||
#else /* !CHESTER_SMALL_F */
|
||||
|
||||
# define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
|
||||
# define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
|
||||
# define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1) /* xzroesc */
|
||||
# define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
|
||||
# define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
|
||||
# define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
|
||||
|
||||
#endif /* !CHESTER_SMALL_F */
|
||||
|
||||
typedef FT_Int AH_Blue;
|
||||
|
||||
|
@ -462,12 +476,12 @@ FT_BEGIN_HEADER
|
|||
/* */
|
||||
typedef struct AH_Face_GlobalsRec_
|
||||
{
|
||||
FT_Face face;
|
||||
FT_Face face;
|
||||
AH_GlobalsRec design;
|
||||
AH_GlobalsRec scaled;
|
||||
FT_Fixed x_scale;
|
||||
FT_Fixed y_scale;
|
||||
FT_Bool control_overshoot;
|
||||
FT_Fixed x_scale;
|
||||
FT_Fixed y_scale;
|
||||
FT_Bool control_overshoot;
|
||||
|
||||
} AH_Face_GlobalsRec, *AH_Face_Globals;
|
||||
|
||||
|
@ -496,6 +510,7 @@ FT_BEGIN_HEADER
|
|||
FT_Bool do_vert_hints; /* disable Y hinting */
|
||||
FT_Bool do_horz_snapping; /* disable X stem size snapping */
|
||||
FT_Bool do_vert_snapping; /* disable Y stem size snapping */
|
||||
FT_Bool do_stem_adjust; /* disable light stem snapping */
|
||||
|
||||
} AH_HinterRec, *AH_Hinter;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
SubDir FT2_TOP $(FT2_SRC_DIR) base ;
|
||||
|
||||
|
||||
{
|
||||
local _sources ;
|
||||
|
||||
|
@ -21,8 +22,10 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ;
|
|||
|
||||
# Add the optional/replaceable files.
|
||||
#
|
||||
Library $(FT2_LIB) : ftsystem.c ftinit.c ftglyph.c ftmm.c ftbdf.c
|
||||
ftbbox.c ftdebug.c ftxf86.c fttype1.c ftpfr.c ;
|
||||
Library $(FT2_LIB) : ftsystem.c ftinit.c ftglyph.c ftmm.c ftbdf.c
|
||||
ftbbox.c ftdebug.c ftxf86.c fttype1.c ftpfr.c
|
||||
ftstroker.c ftwinfnt.c
|
||||
;
|
||||
|
||||
# Add Macintosh-specific file to the library when necessary.
|
||||
#
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
|
||||
|
||||
OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,fttype1.obj,ftxf86.obj,ftpfr.obj
|
||||
OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroker.obj,ftwinfnt.obj
|
||||
|
||||
all : $(OBJS)
|
||||
library [--.lib]freetype.olb $(OBJS)
|
||||
|
|
|
@ -20,6 +20,22 @@
|
|||
#include FT_INTERNAL_BDF_TYPES_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
|
||||
static FT_Bool
|
||||
test_font_type( FT_Face face, const char* name )
|
||||
{
|
||||
if ( face && face->driver )
|
||||
{
|
||||
FT_Module driver = (FT_Module)face->driver;
|
||||
|
||||
if ( driver->clazz && driver->clazz->module_name )
|
||||
{
|
||||
if ( ft_strcmp( driver->clazz->module_name, name ) == 0 )
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Get_BDF_Charset_ID( FT_Face face,
|
||||
|
@ -29,35 +45,52 @@
|
|||
FT_Error error;
|
||||
const char* encoding = NULL;
|
||||
const char* registry = NULL;
|
||||
|
||||
|
||||
|
||||
error = FT_Err_Invalid_Argument;
|
||||
|
||||
if ( face != NULL && face->driver != NULL )
|
||||
|
||||
if ( test_font_type( face, "bdf" ) )
|
||||
{
|
||||
FT_Module driver = (FT_Module) face->driver;
|
||||
|
||||
BDF_Public_Face bdf_face = (BDF_Public_Face)face;
|
||||
|
||||
if ( driver->clazz && driver->clazz->module_name &&
|
||||
ft_strcmp( driver->clazz->module_name, "bdf" ) == 0 )
|
||||
{
|
||||
BDF_Public_Face bdf_face = (BDF_Public_Face)face;
|
||||
|
||||
|
||||
encoding = (const char*) bdf_face->charset_encoding;
|
||||
registry = (const char*) bdf_face->charset_registry;
|
||||
error = 0;
|
||||
}
|
||||
encoding = (const char*) bdf_face->charset_encoding;
|
||||
registry = (const char*) bdf_face->charset_registry;
|
||||
error = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( acharset_encoding )
|
||||
*acharset_encoding = encoding;
|
||||
|
||||
|
||||
if ( acharset_registry )
|
||||
*acharset_registry = registry;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_BDF_Property( FT_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty )
|
||||
{
|
||||
FT_Error error;
|
||||
|
||||
error = FT_Err_Invalid_Argument;
|
||||
|
||||
aproperty->type = BDF_PROPERTY_TYPE_NONE;
|
||||
|
||||
if ( face != NULL && face->driver != NULL )
|
||||
{
|
||||
FT_Driver driver = face->driver;
|
||||
BDF_GetPropertyFunc func;
|
||||
|
||||
func = (BDF_GetPropertyFunc) driver->root.clazz->get_interface(
|
||||
FT_MODULE( driver ), "get_bdf_property" );
|
||||
if ( func )
|
||||
error = func( face, prop_name, aproperty );
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/* END */
|
||||
|
|
|
@ -62,6 +62,13 @@
|
|||
FT_ULong alloc_total;
|
||||
FT_ULong alloc_current;
|
||||
FT_ULong alloc_max;
|
||||
FT_ULong alloc_count;
|
||||
|
||||
FT_Bool bound_total;
|
||||
FT_ULong alloc_total_max;
|
||||
|
||||
FT_Bool bound_count;
|
||||
FT_ULong alloc_count_max;
|
||||
|
||||
const char* file_name;
|
||||
FT_Long line_no;
|
||||
|
@ -476,10 +483,22 @@
|
|||
if ( size <= 0 )
|
||||
ft_mem_debug_panic( "negative block size allocation (%ld)", size );
|
||||
|
||||
/* return NULL if the maximum number of allocations was reached */
|
||||
if ( table->bound_count &&
|
||||
table->alloc_count >= table->alloc_count_max )
|
||||
return NULL;
|
||||
|
||||
/* return NULL if this allocation would overflow the maximum heap size */
|
||||
if ( table->bound_total &&
|
||||
table->alloc_current + (FT_ULong)size > table->alloc_total_max )
|
||||
return NULL;
|
||||
|
||||
block = (FT_Byte *)ft_mem_table_alloc( table, size );
|
||||
if ( block )
|
||||
ft_mem_table_set( table, block, (FT_ULong)size );
|
||||
|
||||
table->alloc_count++;
|
||||
|
||||
table->file_name = NULL;
|
||||
table->line_no = 0;
|
||||
|
||||
|
@ -570,15 +589,42 @@
|
|||
FT_Int result = 0;
|
||||
|
||||
|
||||
if ( getenv( "FT_DEBUG_MEMORY" ) )
|
||||
if ( getenv( "FT2_DEBUG_MEMORY" ) )
|
||||
{
|
||||
table = ft_mem_table_new( memory );
|
||||
if ( table )
|
||||
{
|
||||
const char* p;
|
||||
|
||||
memory->user = table;
|
||||
memory->alloc = ft_mem_debug_alloc;
|
||||
memory->realloc = ft_mem_debug_realloc;
|
||||
memory->free = ft_mem_debug_free;
|
||||
|
||||
p = getenv( "FT2_ALLOC_TOTAL_MAX" );
|
||||
if ( p != NULL )
|
||||
{
|
||||
FT_Long total_max = atol(p);
|
||||
|
||||
if ( total_max > 0 )
|
||||
{
|
||||
table->bound_total = 1;
|
||||
table->alloc_total_max = (FT_ULong) total_max;
|
||||
}
|
||||
}
|
||||
|
||||
p = getenv( "FT2_ALLOC_COUNT_MAX" );
|
||||
if ( p != NULL )
|
||||
{
|
||||
FT_Long total_count = atol(p);
|
||||
|
||||
if ( total_count > 0 )
|
||||
{
|
||||
table->bound_count = 1;
|
||||
table->alloc_count_max = (FT_ULong) total_count;
|
||||
}
|
||||
}
|
||||
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
/* documentation is in ftglyph.h */
|
||||
|
||||
FT_EXPORT_DEF( void )
|
||||
FT_Matrix_Multiply( FT_Matrix* a,
|
||||
FT_Matrix_Multiply( const FT_Matrix* a,
|
||||
FT_Matrix* b )
|
||||
{
|
||||
FT_Fixed xx, xy, yx, yy;
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_SFNT_H /* for SFNT_Load_Table_Func */
|
||||
#include FT_TRUETYPE_TABLES_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_OUTLINE_H
|
||||
|
||||
|
||||
|
@ -196,19 +198,59 @@
|
|||
return error;
|
||||
}
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
ft_glyphslot_free_bitmap( FT_GlyphSlot slot )
|
||||
{
|
||||
if ( slot->flags & FT_GLYPH_OWN_BITMAP )
|
||||
{
|
||||
FT_Memory memory = FT_FACE_MEMORY( slot->face );
|
||||
|
||||
|
||||
FT_FREE( slot->bitmap.buffer );
|
||||
slot->flags &= ~FT_GLYPH_OWN_BITMAP;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* assume that the bitmap buffer was stolen or not */
|
||||
/* allocated from the heap */
|
||||
slot->bitmap.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
|
||||
FT_Pointer buffer )
|
||||
{
|
||||
ft_glyphslot_free_bitmap( slot );
|
||||
|
||||
slot->bitmap.buffer = buffer;
|
||||
|
||||
FT_ASSERT( (slot->flags & FT_GLYPH_OWN_BITMAP) == 0 );
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( FT_Error )
|
||||
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
|
||||
FT_ULong size )
|
||||
{
|
||||
FT_Memory memory = FT_FACE_MEMORY( slot->face );
|
||||
|
||||
|
||||
if ( slot->flags & FT_GLYPH_OWN_BITMAP )
|
||||
FT_FREE( slot->bitmap.buffer );
|
||||
else
|
||||
slot->flags |= FT_GLYPH_OWN_BITMAP;
|
||||
|
||||
return FT_MEM_ALLOC( slot->bitmap.buffer, size );
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ft_glyphslot_clear( FT_GlyphSlot slot )
|
||||
{
|
||||
/* free bitmap if needed */
|
||||
if ( slot->flags & FT_GLYPH_OWN_BITMAP )
|
||||
{
|
||||
FT_Memory memory = FT_FACE_MEMORY( slot->face );
|
||||
|
||||
|
||||
FT_FREE( slot->bitmap.buffer );
|
||||
slot->flags &= ~FT_GLYPH_OWN_BITMAP;
|
||||
}
|
||||
ft_glyphslot_free_bitmap( slot );
|
||||
|
||||
/* clear all public fields in the glyph slot */
|
||||
FT_ZERO( &slot->metrics );
|
||||
|
@ -246,8 +288,7 @@
|
|||
clazz->done_slot( slot );
|
||||
|
||||
/* free bitmap buffer if needed */
|
||||
if ( slot->flags & FT_GLYPH_OWN_BITMAP )
|
||||
FT_FREE( slot->bitmap.buffer );
|
||||
ft_glyphslot_free_bitmap( slot );
|
||||
|
||||
/* free glyph loader */
|
||||
if ( FT_DRIVER_USES_OUTLINES( driver ) )
|
||||
|
@ -699,6 +740,100 @@
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* find_unicode_charmap */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This function finds a Unicode charmap, if there is one. */
|
||||
/* And if there is more than one, it tries to favour the more */
|
||||
/* extensive one, i.e. one that supports UCS-4 against those which */
|
||||
/* are limited to the BMP (said UCS-2 encoding.) */
|
||||
/* */
|
||||
/* This function is called from open_face() (just below), and also */
|
||||
/* from FT_Select_Charmap( , FT_ENCODING_UNICODE). */
|
||||
/* */
|
||||
static FT_Error
|
||||
find_unicode_charmap( FT_Face face )
|
||||
{
|
||||
FT_CharMap* first;
|
||||
FT_CharMap* cur;
|
||||
FT_CharMap* unicmap = NULL; /* some UCS-2 map, if we found it */
|
||||
|
||||
|
||||
/* caller should have already checked that `face' is valid */
|
||||
FT_ASSERT ( face );
|
||||
|
||||
first = face->charmaps;
|
||||
|
||||
if ( !first )
|
||||
return FT_Err_Invalid_CharMap_Handle;
|
||||
|
||||
/*
|
||||
* the original TrueType specification(s) only specified charmap
|
||||
* formats that are capable of mapping 8 or 16 bit character codes to
|
||||
* glyph indices.
|
||||
*
|
||||
* however, recent updates to the Apple and OpenType specifications
|
||||
* introduced new formats that are capable of mapping 32-bit character
|
||||
* codes as well. And these are already used on some fonts, mainly to
|
||||
* map non-BMP Asian ideographs as defined in Unicode.
|
||||
*
|
||||
* for compatibility purposes, these fonts generally come with
|
||||
* *several* Unicode charmaps:
|
||||
*
|
||||
* - one of them in the "old" 16-bit format, that cannot access
|
||||
* all glyphs in the font
|
||||
*
|
||||
* - another one in the "new" 32-bit format, that can access all
|
||||
* the glyphs.
|
||||
*
|
||||
* this function has been written to always favor a 32-bit charmap
|
||||
* when found. Otherwise, a 16-bit one is returned when found
|
||||
*/
|
||||
|
||||
/* since the `interesting' table, with id's 3,10, is normally the */
|
||||
/* last one, we loop backwards. This looses with type1 fonts with */
|
||||
/* non-BMP characters (<.0001%), this wins with .ttf with non-BMP */
|
||||
/* chars (.01% ?), and this is the same about 99.99% of the time! */
|
||||
|
||||
cur = first + face->num_charmaps; /* points after the last one */
|
||||
|
||||
for ( ; --cur >= first; )
|
||||
{
|
||||
if ( cur[0]->encoding == FT_ENCODING_UNICODE )
|
||||
{
|
||||
unicmap = cur; /* record we found a Unicode charmap */
|
||||
|
||||
/* XXX If some new encodings to represent UCS-4 are added, */
|
||||
/* they should be added here. */
|
||||
if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT &&
|
||||
cur[0]->encoding_id == TT_MS_ID_UCS_4 ) ||
|
||||
( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
|
||||
cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) )
|
||||
|
||||
/* Hurray! We found a UCS-4 charmap. We can stop the scan! */
|
||||
{
|
||||
face->charmap = cur[0];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We do not have any UCS-4 charmap. Sigh. */
|
||||
/* Let's see if we have some other kind of Unicode charmap, though. */
|
||||
if ( unicmap != NULL )
|
||||
{
|
||||
face->charmap = unicmap[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Chou blanc! */
|
||||
return FT_Err_Invalid_CharMap_Handle;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
|
@ -718,7 +853,7 @@
|
|||
FT_Memory memory;
|
||||
FT_Driver_Class clazz;
|
||||
FT_Face face = 0;
|
||||
FT_Error error;
|
||||
FT_Error error, error2;
|
||||
FT_Face_Internal internal;
|
||||
|
||||
|
||||
|
@ -748,7 +883,7 @@
|
|||
i++ )
|
||||
if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )
|
||||
face->internal->incremental_interface = params[i].data;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
error = clazz->init_face( stream,
|
||||
|
@ -760,24 +895,17 @@
|
|||
goto Fail;
|
||||
|
||||
/* select Unicode charmap by default */
|
||||
error2 = find_unicode_charmap( face );
|
||||
|
||||
/* if no Unicode charmap can be found, FT_Err_Invalid_CharMap_Handle is
|
||||
* returned.
|
||||
*/
|
||||
|
||||
/* no error should happen, but we want to play safe. */
|
||||
if ( error2 && error2 != FT_Err_Invalid_CharMap_Handle )
|
||||
{
|
||||
FT_Int nn;
|
||||
FT_CharMap unicmap = NULL, cmap;
|
||||
|
||||
|
||||
for ( nn = 0; nn < face->num_charmaps; nn++ )
|
||||
{
|
||||
cmap = face->charmaps[nn];
|
||||
|
||||
if ( cmap->encoding == FT_ENCODING_UNICODE )
|
||||
{
|
||||
unicmap = cmap;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( unicmap != NULL )
|
||||
face->charmap = unicmap;
|
||||
error = error2;
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
*aface = face;
|
||||
|
@ -1241,10 +1369,10 @@
|
|||
/* Compute root ascender, descender, test height, and max_advance */
|
||||
|
||||
metrics->ascender = ( FT_MulFix( face->ascender,
|
||||
metrics->y_scale ) + 32 ) & -64;
|
||||
metrics->y_scale ) + 63 ) & -64;
|
||||
|
||||
metrics->descender = ( FT_MulFix( face->descender,
|
||||
metrics->y_scale ) + 32 ) & -64;
|
||||
metrics->y_scale ) + 0 ) & -64;
|
||||
|
||||
metrics->height = ( FT_MulFix( face->height,
|
||||
metrics->y_scale ) + 32 ) & -64;
|
||||
|
@ -1297,9 +1425,10 @@
|
|||
if ( char_height < 1 * 64 )
|
||||
char_height = 1 * 64;
|
||||
|
||||
/* Compute pixel sizes in 26.6 units */
|
||||
dim_x = ( ( ( char_width * horz_resolution ) / 72 ) + 32 ) & -64;
|
||||
dim_y = ( ( ( char_height * vert_resolution ) / 72 ) + 32 ) & -64;
|
||||
/* Compute pixel sizes in 26.6 units. we use rounding
|
||||
*/
|
||||
dim_x = ( ( char_width * horz_resolution + (36+32*72) ) / 72 ) & -64;
|
||||
dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & -64;
|
||||
|
||||
metrics->x_ppem = (FT_UShort)( dim_x >> 6 );
|
||||
metrics->y_ppem = (FT_UShort)( dim_y >> 6 );
|
||||
|
@ -1441,6 +1570,13 @@
|
|||
if ( !face )
|
||||
return FT_Err_Invalid_Face_Handle;
|
||||
|
||||
/* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
|
||||
/* charmap available, i.e. one with UCS-4 characters, if possible. */
|
||||
/* */
|
||||
/* This is done by find_unicode_charmap() above, to share code. */
|
||||
if ( encoding == FT_ENCODING_UNICODE )
|
||||
return find_unicode_charmap( face );
|
||||
|
||||
cur = face->charmaps;
|
||||
if ( !cur )
|
||||
return FT_Err_Invalid_CharMap_Handle;
|
||||
|
@ -1767,6 +1903,32 @@
|
|||
}
|
||||
|
||||
|
||||
/* documentation is in tttables.h */
|
||||
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Load_Sfnt_Table( FT_Face face,
|
||||
FT_ULong tag,
|
||||
FT_Long offset,
|
||||
FT_Byte* buffer,
|
||||
FT_ULong* length )
|
||||
{
|
||||
SFNT_Load_Table_Func func;
|
||||
FT_Driver driver;
|
||||
|
||||
|
||||
if ( !face || !FT_IS_SFNT( face ) )
|
||||
return FT_Err_Invalid_Face_Handle;
|
||||
|
||||
driver = face->driver;
|
||||
func = (SFNT_Load_Table_Func) driver->root.clazz->get_interface(
|
||||
FT_MODULE( driver ), "load_sfnt" );
|
||||
if ( !func )
|
||||
return FT_Err_Unimplemented_Feature;
|
||||
|
||||
return func( face, tag, offset, buffer, length );
|
||||
}
|
||||
|
||||
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Activate_Size( FT_Size size )
|
||||
{
|
||||
|
|
|
@ -233,8 +233,12 @@
|
|||
{
|
||||
FT_ASSERT( border->start >= 0 );
|
||||
|
||||
border->tags[ border->start ] |= FT_STROKE_TAG_BEGIN;
|
||||
border->tags[ border->num_points-1 ] |= FT_STROKE_TAG_END;
|
||||
/* don't record empty paths !! */
|
||||
if ( border->num_points > (FT_UInt)border->start )
|
||||
{
|
||||
border->tags[ border->start ] |= FT_STROKE_TAG_BEGIN;
|
||||
border->tags[ border->num_points-1 ] |= FT_STROKE_TAG_END;
|
||||
}
|
||||
|
||||
border->start = -1;
|
||||
border->movable = 0;
|
||||
|
@ -469,7 +473,7 @@
|
|||
FT_Byte* tags = border->tags;
|
||||
FT_Int in_contour = 0;
|
||||
|
||||
for ( ; count > 0; count--, point++, tags++ )
|
||||
for ( ; count > 0; count--, num_points++, point++, tags++ )
|
||||
{
|
||||
if ( tags[0] & FT_STROKE_TAG_BEGIN )
|
||||
{
|
||||
|
@ -538,7 +542,7 @@
|
|||
FT_Short* write = outline->contours + outline->n_contours;
|
||||
FT_Short index = (FT_Short) outline->n_points;
|
||||
|
||||
for ( ; count > 0; count--, tags++, write++, index++ )
|
||||
for ( ; count > 0; count--, tags++, index++ )
|
||||
{
|
||||
if ( *tags & FT_STROKE_TAG_END )
|
||||
{
|
||||
|
@ -787,9 +791,15 @@
|
|||
|
||||
theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
|
||||
if (theta == FT_ANGLE_PI)
|
||||
{
|
||||
theta = rotate;
|
||||
phi = stroker->angle_in;
|
||||
}
|
||||
else
|
||||
{
|
||||
theta = theta/2;
|
||||
phi = stroker->angle_in + theta + rotate;
|
||||
}
|
||||
|
||||
thcos = FT_Cos( theta );
|
||||
sigma = FT_MulFix( stroker->miter_limit, thcos );
|
||||
|
@ -797,7 +807,6 @@
|
|||
if ( sigma >= 0x10000L )
|
||||
miter = 0;
|
||||
|
||||
phi = stroker->angle_in + theta + rotate;
|
||||
|
||||
if (miter) /* this is a miter (broken angle) */
|
||||
{
|
||||
|
@ -1362,3 +1371,207 @@
|
|||
ft_stroke_border_export( stroker->borders+1, outline );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* the following is very similar to FT_Outline_Decompose, except
|
||||
* that we do support opened paths, and do not scale the outline
|
||||
*/
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Stroker_ParseOutline( FT_Stroker stroker,
|
||||
FT_Outline* outline,
|
||||
FT_Bool opened )
|
||||
{
|
||||
FT_Vector v_last;
|
||||
FT_Vector v_control;
|
||||
FT_Vector v_start;
|
||||
|
||||
FT_Vector* point;
|
||||
FT_Vector* limit;
|
||||
char* tags;
|
||||
|
||||
FT_Error error;
|
||||
|
||||
FT_Int n; /* index of contour in outline */
|
||||
FT_UInt first; /* index of first point in contour */
|
||||
FT_Int tag; /* current point's state */
|
||||
FT_Int in_path;
|
||||
|
||||
if ( !outline || !stroker )
|
||||
return FT_Err_Invalid_Argument;
|
||||
|
||||
first = 0;
|
||||
|
||||
in_path = 0;
|
||||
|
||||
for ( n = 0; n < outline->n_contours; n++ )
|
||||
{
|
||||
FT_Int last; /* index of last point in contour */
|
||||
|
||||
|
||||
last = outline->contours[n];
|
||||
limit = outline->points + last;
|
||||
|
||||
v_start = outline->points[first];
|
||||
v_last = outline->points[last];
|
||||
|
||||
v_control = v_start;
|
||||
|
||||
point = outline->points + first;
|
||||
tags = outline->tags + first;
|
||||
tag = FT_CURVE_TAG( tags[0] );
|
||||
|
||||
/* A contour cannot start with a cubic control point! */
|
||||
if ( tag == FT_CURVE_TAG_CUBIC )
|
||||
goto Invalid_Outline;
|
||||
|
||||
/* check first point to determine origin */
|
||||
if ( tag == FT_CURVE_TAG_CONIC )
|
||||
{
|
||||
/* first point is conic control. Yes, this happens. */
|
||||
if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
|
||||
{
|
||||
/* start at last point if it is on the curve */
|
||||
v_start = v_last;
|
||||
limit--;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* if both first and last points are conic, */
|
||||
/* start at their middle and record its position */
|
||||
/* for closure */
|
||||
v_start.x = ( v_start.x + v_last.x ) / 2;
|
||||
v_start.y = ( v_start.y + v_last.y ) / 2;
|
||||
|
||||
v_last = v_start;
|
||||
}
|
||||
point--;
|
||||
tags--;
|
||||
}
|
||||
|
||||
error = FT_Stroker_BeginSubPath( stroker, &v_start, opened );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
in_path = 1;
|
||||
|
||||
while ( point < limit )
|
||||
{
|
||||
point++;
|
||||
tags++;
|
||||
|
||||
tag = FT_CURVE_TAG( tags[0] );
|
||||
switch ( tag )
|
||||
{
|
||||
case FT_CURVE_TAG_ON: /* emit a single line_to */
|
||||
{
|
||||
FT_Vector vec;
|
||||
|
||||
|
||||
vec.x = point->x;
|
||||
vec.y = point->y;
|
||||
|
||||
error = FT_Stroker_LineTo( stroker, &vec );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
continue;
|
||||
}
|
||||
|
||||
case FT_CURVE_TAG_CONIC: /* consume conic arcs */
|
||||
v_control.x = point->x;
|
||||
v_control.y = point->y;
|
||||
|
||||
Do_Conic:
|
||||
if ( point < limit )
|
||||
{
|
||||
FT_Vector vec;
|
||||
FT_Vector v_middle;
|
||||
|
||||
|
||||
point++;
|
||||
tags++;
|
||||
tag = FT_CURVE_TAG( tags[0] );
|
||||
|
||||
vec = point[0];
|
||||
|
||||
if ( tag == FT_CURVE_TAG_ON )
|
||||
{
|
||||
error = FT_Stroker_ConicTo( stroker, &v_control, &vec );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( tag != FT_CURVE_TAG_CONIC )
|
||||
goto Invalid_Outline;
|
||||
|
||||
v_middle.x = ( v_control.x + vec.x ) / 2;
|
||||
v_middle.y = ( v_control.y + vec.y ) / 2;
|
||||
|
||||
error = FT_Stroker_ConicTo( stroker, &v_control, &v_middle );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
v_control = vec;
|
||||
goto Do_Conic;
|
||||
}
|
||||
|
||||
error = FT_Stroker_ConicTo( stroker, &v_control, &v_start );
|
||||
goto Close;
|
||||
|
||||
default: /* FT_CURVE_TAG_CUBIC */
|
||||
{
|
||||
FT_Vector vec1, vec2;
|
||||
|
||||
|
||||
if ( point + 1 > limit ||
|
||||
FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
|
||||
goto Invalid_Outline;
|
||||
|
||||
point += 2;
|
||||
tags += 2;
|
||||
|
||||
vec1 = point[-2];
|
||||
vec2 = point[-1];
|
||||
|
||||
if ( point <= limit )
|
||||
{
|
||||
FT_Vector vec;
|
||||
|
||||
|
||||
vec = point[0];
|
||||
|
||||
error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &vec );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
continue;
|
||||
}
|
||||
|
||||
error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &v_start );
|
||||
goto Close;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Close:
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
error = FT_Stroker_EndSubPath( stroker );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
first = last + 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Exit:
|
||||
return error;
|
||||
|
||||
Invalid_Outline:
|
||||
return FT_Err_Invalid_Outline;
|
||||
}
|
||||
|
|
|
@ -474,6 +474,8 @@
|
|||
FT_Angle delta = angle2 - angle1;
|
||||
|
||||
delta %= FT_ANGLE_2PI;
|
||||
if ( delta < 0 )
|
||||
delta += FT_ANGLE_2PI;
|
||||
|
||||
if ( delta > FT_ANGLE_PI )
|
||||
delta -= FT_ANGLE_2PI;
|
||||
|
|
55
reactos/lib/freetype/src/base/ftwinfnt.c
Normal file
55
reactos/lib/freetype/src/base/ftwinfnt.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftwinfnt.c */
|
||||
/* */
|
||||
/* FreeType API for accessing Windows FNT specific info (body). */
|
||||
/* */
|
||||
/* Copyright 2002 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_WINFONTS_H
|
||||
#include FT_INTERNAL_FNT_TYPES_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
|
||||
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Get_WinFNT_Header( FT_Face face,
|
||||
FT_WinFNT_HeaderRec *header )
|
||||
{
|
||||
FT_Error error;
|
||||
|
||||
error = FT_Err_Invalid_Argument;
|
||||
|
||||
if ( face != NULL && face->driver != NULL )
|
||||
{
|
||||
FT_Module driver = (FT_Module) face->driver;
|
||||
|
||||
|
||||
if ( driver->clazz && driver->clazz->module_name &&
|
||||
ft_strcmp( driver->clazz->module_name, "winfonts" ) == 0 )
|
||||
{
|
||||
FNT_Size size = (FNT_Size)face->size;
|
||||
FNT_Font font = size->font;
|
||||
|
||||
if (font)
|
||||
{
|
||||
FT_MEM_COPY( header, &font->header, sizeof(*header) );
|
||||
error = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/* END */
|
|
@ -49,12 +49,14 @@ BASE_SRC := $(BASE_)ftcalc.c \
|
|||
# object. It will then be linked to the final executable only if one of its
|
||||
# symbols is used by the application.
|
||||
#
|
||||
BASE_EXT_SRC := $(BASE_)ftglyph.c \
|
||||
$(BASE_)ftmm.c \
|
||||
$(BASE_)ftbdf.c \
|
||||
$(BASE_)fttype1.c \
|
||||
$(BASE_)ftxf86.c \
|
||||
$(BASE_)ftpfr.c \
|
||||
BASE_EXT_SRC := $(BASE_)ftglyph.c \
|
||||
$(BASE_)ftmm.c \
|
||||
$(BASE_)ftbdf.c \
|
||||
$(BASE_)fttype1.c \
|
||||
$(BASE_)ftxf86.c \
|
||||
$(BASE_)ftpfr.c \
|
||||
$(BASE_)ftstroker.c \
|
||||
$(BASE_)ftwinfnt.c \
|
||||
$(BASE_)ftbbox.c
|
||||
|
||||
# Default extensions objects
|
||||
|
|
|
@ -29,6 +29,7 @@ THE SOFTWARE.
|
|||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_BDF_H
|
||||
|
||||
#include "bdf.h"
|
||||
#include "bdfdrivr.h"
|
||||
|
@ -488,8 +489,6 @@ THE SOFTWARE.
|
|||
int i, j, count;
|
||||
unsigned char *p, *pp;
|
||||
|
||||
FT_Memory memory = face->bdffont->memory;
|
||||
|
||||
FT_UNUSED( load_flags );
|
||||
|
||||
|
||||
|
@ -513,9 +512,9 @@ THE SOFTWARE.
|
|||
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
|
||||
bitmap->pitch = glyph.bpr;
|
||||
|
||||
if ( FT_NEW_ARRAY( bitmap->buffer, glyph.bytes ) )
|
||||
goto Exit;
|
||||
FT_MEM_COPY( bitmap->buffer, glyph.bitmap, glyph.bytes );
|
||||
/* note: we don't allocate a new array to hold the bitmap, we */
|
||||
/* can simply point to it */
|
||||
ft_glyphslot_set_bitmap( slot, glyph.bitmap );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -523,7 +522,8 @@ THE SOFTWARE.
|
|||
bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
|
||||
bitmap->pitch = bitmap->width;
|
||||
|
||||
if ( FT_NEW_ARRAY( bitmap->buffer, bitmap->rows * bitmap->pitch ) )
|
||||
error = ft_glyphslot_alloc_bitmap( slot, bitmap->rows * bitmap->pitch );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
switch ( bpp )
|
||||
|
@ -624,13 +624,64 @@ THE SOFTWARE.
|
|||
|
||||
slot->linearHoriAdvance = (FT_Fixed)glyph.dwidth << 16;
|
||||
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
||||
slot->flags = FT_GLYPH_OWN_BITMAP;
|
||||
|
||||
Exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
static FT_Error
|
||||
bdf_get_bdf_property( BDF_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty )
|
||||
{
|
||||
bdf_property_t* prop;
|
||||
|
||||
FT_ASSERT( face && face->bdffont );
|
||||
|
||||
prop = bdf_get_font_property( face->bdffont, (char*)prop_name );
|
||||
if ( prop != NULL )
|
||||
{
|
||||
switch ( prop->format )
|
||||
{
|
||||
case BDF_ATOM:
|
||||
aproperty->type = BDF_PROPERTY_TYPE_ATOM;
|
||||
aproperty->u.atom = prop->value.atom;
|
||||
break;
|
||||
|
||||
case BDF_INTEGER:
|
||||
aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
|
||||
aproperty->u.integer = prop->value.int32;
|
||||
break;
|
||||
|
||||
case BDF_CARDINAL:
|
||||
aproperty->type = BDF_PROPERTY_TYPE_CARDINAL;
|
||||
aproperty->u.cardinal = prop->value.card32;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto Fail;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Fail:
|
||||
return FT_Err_Invalid_Argument;
|
||||
}
|
||||
|
||||
|
||||
static FT_Module_Interface
|
||||
bdf_driver_requester( FT_Module module,
|
||||
const char* name )
|
||||
{
|
||||
FT_UNUSED( module );
|
||||
|
||||
if ( name && ft_strcmp( name, "get_bdf_property" ) == 0 )
|
||||
return (FT_Module_Interface) bdf_get_bdf_property;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_TABLE_DEF
|
||||
const FT_Driver_ClassRec bdf_driver_class =
|
||||
{
|
||||
|
@ -646,7 +697,7 @@ THE SOFTWARE.
|
|||
|
||||
(FT_Module_Constructor)0,
|
||||
(FT_Module_Destructor) 0,
|
||||
(FT_Module_Requester) 0
|
||||
(FT_Module_Requester) bdf_driver_requester
|
||||
},
|
||||
|
||||
sizeof ( BDF_FaceRec ),
|
||||
|
|
347
reactos/lib/freetype/src/cache/ftccache.c
vendored
347
reactos/lib/freetype/src/cache/ftccache.c
vendored
|
@ -196,7 +196,8 @@
|
|||
FTC_Node* pold;
|
||||
|
||||
|
||||
FT_ASSERT( old_index >= FTC_HASH_INITIAL_SIZE );
|
||||
if ( old_index+1 <= FTC_HASH_INITIAL_SIZE )
|
||||
goto Exit;
|
||||
|
||||
if ( p == 0 )
|
||||
{
|
||||
|
@ -356,10 +357,12 @@
|
|||
|
||||
FT_FREE( node );
|
||||
|
||||
#if 0
|
||||
/* check, just in case of general corruption :-) */
|
||||
if ( manager->num_nodes == 0 )
|
||||
FT_ERROR(( "ftc_node_destroy: invalid cache node count! = %d\n",
|
||||
manager->num_nodes ));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -404,11 +407,14 @@
|
|||
FT_EXPORT_DEF( void )
|
||||
ftc_family_done( FTC_Family family )
|
||||
{
|
||||
FTC_Manager manager = family->cache->manager;
|
||||
if ( family && family->cache )
|
||||
{
|
||||
FTC_Manager manager = family->cache->manager;
|
||||
|
||||
|
||||
/* remove from manager's family table */
|
||||
ftc_family_table_free( &manager->families, family->fam_index );
|
||||
/* remove from manager's family table */
|
||||
ftc_family_table_free( &manager->families, family->fam_index );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -545,8 +551,10 @@
|
|||
FTC_Query query,
|
||||
FTC_Node *anode )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_LruNode lru;
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FTC_Manager manager;
|
||||
FT_LruNode lru;
|
||||
FT_UInt free_count = 0;
|
||||
|
||||
|
||||
if ( !cache || !query || !anode )
|
||||
|
@ -557,152 +565,237 @@
|
|||
query->hash = 0;
|
||||
query->family = NULL;
|
||||
|
||||
/* XXX: we break encapsulation for the sake of speed! */
|
||||
manager = cache->manager;
|
||||
|
||||
/* here's a small note explaining what's hapenning in the code below.
|
||||
*
|
||||
* we need to deal intelligently with out-of-memory (OOM) conditions
|
||||
* when trying to create a new family or cache node during the lookup.
|
||||
*
|
||||
* when an OOM is detected, we'll try to free one or more "old" nodes
|
||||
* from the cache, then try again. it may be necessary to do that several
|
||||
* times, so a loop is needed.
|
||||
*
|
||||
* the local variable "free_count" holds the number of "old" nodes to
|
||||
* discard on each attempt. it starts at 1 and doubles on each iteration.
|
||||
* the loop stops when:
|
||||
*
|
||||
* - a non-OOM error is detected
|
||||
* - a succesful lookup is performed
|
||||
* - there are no more unused nodes in the cache
|
||||
*
|
||||
* for the record, remember that all used nodes appear _before_
|
||||
* unused ones in the manager's MRU node list.
|
||||
*/
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* first of all, find the relevant family */
|
||||
FT_LruList list = cache->families;
|
||||
FT_LruNode fam, *pfam;
|
||||
FT_LruNode_CompareFunc compare = list->clazz->node_compare;
|
||||
|
||||
pfam = &list->nodes;
|
||||
for (;;)
|
||||
{
|
||||
fam = *pfam;
|
||||
if ( fam == NULL )
|
||||
/* first of all, find the relevant family */
|
||||
FT_LruList list = cache->families;
|
||||
FT_LruNode fam, *pfam;
|
||||
FT_LruNode_CompareFunc compare = list->clazz->node_compare;
|
||||
|
||||
pfam = &list->nodes;
|
||||
for (;;)
|
||||
{
|
||||
error = FT_LruList_Lookup( list, query, &lru );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
goto Skip;
|
||||
}
|
||||
|
||||
if ( compare( fam, query, list->data ) )
|
||||
break;
|
||||
|
||||
pfam = &fam->next;
|
||||
}
|
||||
|
||||
FT_ASSERT( fam != NULL );
|
||||
|
||||
/* move to top of list when needed */
|
||||
if ( fam != list->nodes )
|
||||
{
|
||||
*pfam = fam->next;
|
||||
fam->next = list->nodes;
|
||||
list->nodes = fam;
|
||||
}
|
||||
|
||||
lru = fam;
|
||||
|
||||
Skip:
|
||||
;
|
||||
}
|
||||
|
||||
{
|
||||
FTC_Family family = (FTC_Family) lru;
|
||||
FT_UFast hash = query->hash;
|
||||
FTC_Node* bucket;
|
||||
FT_UInt idx;
|
||||
|
||||
|
||||
idx = hash & cache->mask;
|
||||
if ( idx < cache->p )
|
||||
idx = hash & ( cache->mask * 2 + 1 );
|
||||
|
||||
bucket = cache->buckets + idx;
|
||||
|
||||
|
||||
if ( query->family != family ||
|
||||
family->fam_index >= cache->manager->families.size )
|
||||
{
|
||||
FT_ERROR((
|
||||
"ftc_cache_lookup: invalid query (bad 'family' field)\n" ));
|
||||
return FTC_Err_Invalid_Argument;
|
||||
}
|
||||
|
||||
if ( *bucket )
|
||||
{
|
||||
FTC_Node* pnode = bucket;
|
||||
FTC_Node_CompareFunc compare = cache->clazz->node_compare;
|
||||
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
FTC_Node node;
|
||||
|
||||
|
||||
node = *pnode;
|
||||
if ( node == NULL )
|
||||
break;
|
||||
|
||||
if ( node->hash == hash &&
|
||||
(FT_UInt)node->fam_index == family->fam_index &&
|
||||
compare( node, query, cache ) )
|
||||
fam = *pfam;
|
||||
if ( fam == NULL )
|
||||
{
|
||||
/* move to head of bucket list */
|
||||
if ( pnode != bucket )
|
||||
{
|
||||
*pnode = node->link;
|
||||
node->link = *bucket;
|
||||
*bucket = node;
|
||||
}
|
||||
error = FT_LruList_Lookup( list, query, &lru );
|
||||
if ( error )
|
||||
goto Fail;
|
||||
|
||||
/* move to head of MRU list */
|
||||
if ( node != cache->manager->nodes_list )
|
||||
ftc_node_mru_up( node, cache->manager );
|
||||
|
||||
*anode = node;
|
||||
goto Exit;
|
||||
goto Skip;
|
||||
}
|
||||
|
||||
pnode = &node->link;
|
||||
if ( compare( fam, query, list->data ) )
|
||||
break;
|
||||
|
||||
pfam = &fam->next;
|
||||
}
|
||||
|
||||
FT_ASSERT( fam != NULL );
|
||||
|
||||
/* move to top of list when needed */
|
||||
if ( fam != list->nodes )
|
||||
{
|
||||
*pfam = fam->next;
|
||||
fam->next = list->nodes;
|
||||
list->nodes = fam;
|
||||
}
|
||||
|
||||
lru = fam;
|
||||
|
||||
Skip:
|
||||
;
|
||||
}
|
||||
|
||||
/* didn't find a node, create a new one */
|
||||
{
|
||||
FTC_Cache_Class clazz = cache->clazz;
|
||||
FTC_Manager manager = cache->manager;
|
||||
FT_Memory memory = cache->memory;
|
||||
FTC_Node node;
|
||||
FTC_Manager manager = cache->manager;
|
||||
FTC_Family family = (FTC_Family) lru;
|
||||
FT_UFast hash = query->hash;
|
||||
FTC_Node* bucket;
|
||||
FT_UInt idx;
|
||||
|
||||
|
||||
if ( FT_ALLOC( node, clazz->node_size ) )
|
||||
goto Exit;
|
||||
idx = hash & cache->mask;
|
||||
if ( idx < cache->p )
|
||||
idx = hash & ( cache->mask * 2 + 1 );
|
||||
|
||||
node->fam_index = (FT_UShort) family->fam_index;
|
||||
node->hash = query->hash;
|
||||
node->ref_count = 0;
|
||||
bucket = cache->buckets + idx;
|
||||
|
||||
error = clazz->node_init( node, query, cache );
|
||||
if ( error )
|
||||
|
||||
if ( query->family != family ||
|
||||
family->fam_index >= manager->families.size )
|
||||
{
|
||||
FT_FREE( node );
|
||||
FT_ERROR((
|
||||
"ftc_cache_lookup: invalid query (bad 'family' field)\n" ));
|
||||
error = FTC_Err_Invalid_Argument;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
error = ftc_node_hash_link( node, cache );
|
||||
if ( error )
|
||||
if ( *bucket )
|
||||
{
|
||||
clazz->node_done( node, cache );
|
||||
FT_FREE( node );
|
||||
FTC_Node* pnode = bucket;
|
||||
FTC_Node_CompareFunc compare = cache->clazz->node_compare;
|
||||
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
FTC_Node node;
|
||||
|
||||
|
||||
node = *pnode;
|
||||
if ( node == NULL )
|
||||
break;
|
||||
|
||||
if ( node->hash == hash &&
|
||||
(FT_UInt)node->fam_index == family->fam_index &&
|
||||
compare( node, query, cache ) )
|
||||
{
|
||||
/* move to head of bucket list */
|
||||
if ( pnode != bucket )
|
||||
{
|
||||
*pnode = node->link;
|
||||
node->link = *bucket;
|
||||
*bucket = node;
|
||||
}
|
||||
|
||||
/* move to head of MRU list */
|
||||
if ( node != manager->nodes_list )
|
||||
ftc_node_mru_up( node, manager );
|
||||
|
||||
*anode = node;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
pnode = &node->link;
|
||||
}
|
||||
}
|
||||
|
||||
/* didn't find a node, create a new one */
|
||||
{
|
||||
FTC_Cache_Class clazz = cache->clazz;
|
||||
FT_Memory memory = cache->memory;
|
||||
FTC_Node node;
|
||||
|
||||
|
||||
if ( FT_ALLOC( node, clazz->node_size ) )
|
||||
goto Fail;
|
||||
|
||||
node->fam_index = (FT_UShort) family->fam_index;
|
||||
node->hash = query->hash;
|
||||
node->ref_count = 0;
|
||||
|
||||
error = clazz->node_init( node, query, cache );
|
||||
if ( error )
|
||||
{
|
||||
FT_FREE( node );
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
error = ftc_node_hash_link( node, cache );
|
||||
if ( error )
|
||||
{
|
||||
clazz->node_done( node, cache );
|
||||
FT_FREE( node );
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
ftc_node_mru_link( node, cache->manager );
|
||||
|
||||
cache->manager->cur_weight += clazz->node_weight( node, cache );
|
||||
|
||||
/* now try to compress the node pool when necessary */
|
||||
if ( manager->cur_weight >= manager->max_weight )
|
||||
{
|
||||
node->ref_count++;
|
||||
FTC_Manager_Compress( manager );
|
||||
node->ref_count--;
|
||||
}
|
||||
|
||||
*anode = node;
|
||||
}
|
||||
|
||||
/* all is well, exit now
|
||||
*/
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Fail:
|
||||
if ( error != FT_Err_Out_Of_Memory )
|
||||
goto Exit;
|
||||
|
||||
/* there is not enough memory, try to release some unused nodes
|
||||
* from the cache to make room for a new one.
|
||||
*/
|
||||
{
|
||||
FT_UInt new_count;
|
||||
|
||||
new_count = 1 + free_count*2;
|
||||
|
||||
/* check overflow and bounds */
|
||||
if ( new_count < free_count || free_count > manager->num_nodes )
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
ftc_node_mru_link( node, cache->manager );
|
||||
free_count = new_count;
|
||||
|
||||
cache->manager->cur_weight += clazz->node_weight( node, cache );
|
||||
|
||||
/* now try to compress the node pool when necessary */
|
||||
if ( manager->cur_weight >= manager->max_weight )
|
||||
/* try to remove "new_count" nodes from the list */
|
||||
{
|
||||
node->ref_count++;
|
||||
FTC_Manager_Compress( manager );
|
||||
node->ref_count--;
|
||||
}
|
||||
FTC_Node first = manager->nodes_list;
|
||||
FTC_Node node;
|
||||
|
||||
*anode = node;
|
||||
if ( first == NULL ) /* empty list ! */
|
||||
goto Exit;
|
||||
|
||||
/* go to last node - it's a circular list */
|
||||
node = first->mru_prev;
|
||||
for ( ; node && new_count > 0; new_count-- )
|
||||
{
|
||||
FTC_Node prev = node->mru_prev;
|
||||
|
||||
/* used nodes always appear before unused one in the MRU
|
||||
* list. if we find one here, we'd better stop right now
|
||||
* our iteration
|
||||
*/
|
||||
if ( node->ref_count > 0 )
|
||||
{
|
||||
/* if there are no unused nodes in the list, we'd better exit */
|
||||
if ( new_count == free_count )
|
||||
goto Exit;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ftc_node_destroy( node, manager );
|
||||
|
||||
if ( node == first )
|
||||
break;
|
||||
|
||||
node = prev;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
58
reactos/lib/freetype/src/cache/ftccmap.c
vendored
58
reactos/lib/freetype/src/cache/ftccmap.c
vendored
|
@ -23,9 +23,13 @@
|
|||
#include FT_CACHE_MANAGER_H
|
||||
#include FT_INTERNAL_MEMORY_H
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
|
||||
#include "ftcerror.h"
|
||||
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT trace_cache
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Each FTC_CMapNode contains a simple array to map a range of character */
|
||||
|
@ -131,7 +135,7 @@
|
|||
ftc_cmap_node_weight( FTC_CMapNode cnode )
|
||||
{
|
||||
FT_UNUSED( cnode );
|
||||
|
||||
|
||||
return sizeof ( *cnode );
|
||||
}
|
||||
|
||||
|
@ -189,10 +193,54 @@
|
|||
break;
|
||||
|
||||
case FTC_CMAP_BY_ENCODING:
|
||||
for ( idx = 0; idx < count; idx++, cur++ )
|
||||
if ( cur[0]->encoding == desc->u.encoding )
|
||||
break;
|
||||
if (desc->u.encoding == FT_ENCODING_UNICODE)
|
||||
{
|
||||
/* since the `interesting' table, with id's 3,10, is normally the
|
||||
* last one, we loop backwards. This looses with type1 fonts with
|
||||
* non-BMP characters (<.0001%), this wins with .ttf with non-BMP
|
||||
* chars (.01% ?), and this is the same about 99.99% of the time!
|
||||
*/
|
||||
|
||||
FT_UInt unicmap_idx = count; /* some UCS-2 map, if we found it */
|
||||
|
||||
cur += count - 1;
|
||||
|
||||
for ( idx = 0; idx < count; idx++, cur-- )
|
||||
{
|
||||
if ( cur[0]->encoding == FT_ENCODING_UNICODE )
|
||||
{
|
||||
unicmap_idx = idx; /* record we found a Unicode charmap */
|
||||
|
||||
/* XXX If some new encodings to represent UCS-4 are added,
|
||||
* they should be added here.
|
||||
*/
|
||||
if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT &&
|
||||
cur[0]->encoding_id == TT_MS_ID_UCS_4 ) ||
|
||||
( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
|
||||
cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) )
|
||||
|
||||
/* Hurray! We found a UCS-4 charmap. We can stop the scan! */
|
||||
{
|
||||
idx = count - 1 - idx;
|
||||
goto Found_idx_for_FTC_CMAP_BY_ENCODING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We do not have any UCS-4 charmap. Sigh.
|
||||
* Let's see if we have some other kind of Unicode charmap, though.
|
||||
*/
|
||||
if ( unicmap_idx < count )
|
||||
idx = count - 1 - unicmap_idx;
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( idx = 0; idx < count; idx++, cur++ )
|
||||
if ( cur[0]->encoding == desc->u.encoding )
|
||||
break;
|
||||
}
|
||||
|
||||
Found_idx_for_FTC_CMAP_BY_ENCODING:
|
||||
hash = idx * 67;
|
||||
break;
|
||||
|
||||
|
@ -227,7 +275,7 @@
|
|||
return error;
|
||||
|
||||
Bad_Descriptor:
|
||||
FT_ERROR(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
|
||||
FT_TRACE1(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
|
||||
return FTC_Err_Invalid_Argument;
|
||||
}
|
||||
|
||||
|
|
2
reactos/lib/freetype/src/cache/ftcsbits.c
vendored
2
reactos/lib/freetype/src/cache/ftcsbits.c
vendored
|
@ -216,7 +216,7 @@
|
|||
/* we mark unloaded glyphs with `sbit.buffer == 0' */
|
||||
/* and 'width == 255', 'height == 0' */
|
||||
/* */
|
||||
if ( error )
|
||||
if ( error && error != FT_Err_Out_Of_Memory )
|
||||
{
|
||||
sbit->width = 255;
|
||||
error = 0;
|
||||
|
|
156
reactos/lib/freetype/src/cache/ftlru.c
vendored
156
reactos/lib/freetype/src/cache/ftlru.c
vendored
|
@ -21,6 +21,7 @@
|
|||
#include FT_CACHE_INTERNAL_LRU_H
|
||||
#include FT_LIST_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
|
||||
#include "ftcerror.h"
|
||||
|
||||
|
@ -187,80 +188,135 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* we haven't found the relevant element. We will now try */
|
||||
/* to create a new one. */
|
||||
/* */
|
||||
|
||||
/* first, check if our list if full, when appropriate */
|
||||
if ( list->max_nodes > 0 && list->num_nodes >= list->max_nodes )
|
||||
/* since we haven't found the relevant element in our LRU list,
|
||||
* we're going to "create" a new one.
|
||||
*
|
||||
* the following code is a bit special, because it tries to handle
|
||||
* out-of-memory conditions (OOM) in an intelligent way.
|
||||
*
|
||||
* more precisely, if not enough memory is available to create a
|
||||
* new node or "flush" an old one, we need to remove the oldest
|
||||
* elements from our list, and try again. since several tries may
|
||||
* be necessary, a loop is needed
|
||||
*
|
||||
* this loop will only exit when:
|
||||
*
|
||||
* - a new node was succesfully created, or an old node flushed
|
||||
* - an error other than FT_Err_Out_Of_Memory is detected
|
||||
* - the list of nodes is empty, and it isn't possible to create
|
||||
* new nodes
|
||||
*
|
||||
* on each unsucesful attempt, one node will be removed from the list
|
||||
*
|
||||
*/
|
||||
|
||||
{
|
||||
/* this list list is full; we will now flush */
|
||||
/* the oldest node, if there's one! */
|
||||
FT_LruNode last = *plast;
|
||||
FT_Int drop_last = ( list->max_nodes > 0 &&
|
||||
list->num_nodes >= list->max_nodes );
|
||||
|
||||
|
||||
if ( last )
|
||||
for (;;)
|
||||
{
|
||||
if ( clazz->node_flush )
|
||||
node = NULL;
|
||||
|
||||
/* when "drop_last" is true, we should free the last node in
|
||||
* the list to make room for a new one. note that we re-use
|
||||
* its memory block to save allocation calls.
|
||||
*/
|
||||
if ( drop_last )
|
||||
{
|
||||
error = clazz->node_flush( last, key, list->data );
|
||||
/* find the last node in the list
|
||||
*/
|
||||
pnode = &list->nodes;
|
||||
node = *pnode;
|
||||
|
||||
if ( node == NULL )
|
||||
{
|
||||
FT_ASSERT( list->nodes == 0 );
|
||||
error = FT_Err_Out_Of_Memory;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
FT_ASSERT( list->num_nodes > 0 );
|
||||
|
||||
while ( node->next )
|
||||
{
|
||||
pnode = &node->next;
|
||||
node = *pnode;
|
||||
}
|
||||
|
||||
/* remove it from the list, and try to "flush" it. doing this will
|
||||
* save a significant number of dynamic allocations compared to
|
||||
* a classic destroy/create cycle
|
||||
*/
|
||||
*pnode = NULL;
|
||||
list->num_nodes -= 1;
|
||||
|
||||
if ( clazz->node_flush )
|
||||
{
|
||||
error = clazz->node_flush( node, key, list->data );
|
||||
if ( !error )
|
||||
goto Success;
|
||||
|
||||
/* note that if an error occured during the flush, we need to
|
||||
* finalize it since it is potentially in incomplete state.
|
||||
*/
|
||||
}
|
||||
|
||||
/* we finalize, but do not destroy the last node, we
|
||||
* simply re-use its memory block !
|
||||
*/
|
||||
if ( clazz->node_done )
|
||||
clazz->node_done( node, list->data );
|
||||
|
||||
FT_MEM_ZERO( node, clazz->node_size );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( clazz->node_done )
|
||||
clazz->node_done( last, list->data );
|
||||
|
||||
last->key = key;
|
||||
error = clazz->node_init( last, key, list->data );
|
||||
/* try to allocate a new node when "drop_last" is not TRUE
|
||||
* this usually happens on the first pass, when the LRU list
|
||||
* is not already full.
|
||||
*/
|
||||
if ( FT_ALLOC( node, clazz->node_size ) )
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
FT_ASSERT( node != NULL );
|
||||
|
||||
if ( !error )
|
||||
node->key = key;
|
||||
error = clazz->node_init( node, key, list->data );
|
||||
if ( error )
|
||||
{
|
||||
/* move it to the top of the list */
|
||||
*plast = NULL;
|
||||
last->next = list->nodes;
|
||||
list->nodes = last;
|
||||
if ( clazz->node_done )
|
||||
clazz->node_done( node, list->data );
|
||||
|
||||
result = last;
|
||||
goto Exit;
|
||||
FT_FREE( node );
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
/* in case of error during the flush or done/init cycle, */
|
||||
/* we need to discard the node */
|
||||
if ( clazz->node_done )
|
||||
clazz->node_done( last, list->data );
|
||||
Success:
|
||||
result = node;
|
||||
|
||||
*plast = NULL;
|
||||
list->num_nodes--;
|
||||
|
||||
FT_FREE( last );
|
||||
node->next = list->nodes;
|
||||
list->nodes = node;
|
||||
list->num_nodes++;
|
||||
goto Exit;
|
||||
|
||||
Fail:
|
||||
if ( error != FT_Err_Out_Of_Memory )
|
||||
goto Exit;
|
||||
|
||||
drop_last = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* otherwise, simply allocate a new node */
|
||||
if ( FT_ALLOC( node, clazz->node_size ) )
|
||||
goto Exit;
|
||||
|
||||
node->key = key;
|
||||
error = clazz->node_init( node, key, list->data );
|
||||
if ( error )
|
||||
{
|
||||
FT_FREE( node );
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
result = node;
|
||||
node->next = list->nodes;
|
||||
list->nodes = node;
|
||||
list->num_nodes++;
|
||||
|
||||
Exit:
|
||||
*anode = result;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FT_EXPORT_DEF( void )
|
||||
FT_LruList_Remove( FT_LruList list,
|
||||
FT_LruNode node )
|
||||
|
|
|
@ -2363,6 +2363,29 @@
|
|||
cff_builder_done( &decoder.builder );
|
||||
}
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_INCREMENTAL
|
||||
|
||||
/* Incremental fonts can optionally override the metrics. */
|
||||
if ( !error &&
|
||||
face->root.internal->incremental_interface &&
|
||||
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
|
||||
{
|
||||
FT_Incremental_MetricsRec metrics;
|
||||
|
||||
metrics.bearing_x = decoder.builder.left_bearing.x;
|
||||
metrics.bearing_y = decoder.builder.left_bearing.y;
|
||||
metrics.advance = decoder.builder.advance.x;
|
||||
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
|
||||
face->root.internal->incremental_interface->object,
|
||||
glyph_index, FALSE, &metrics );
|
||||
decoder.builder.left_bearing.x = metrics.bearing_x;
|
||||
decoder.builder.left_bearing.y = metrics.bearing_y;
|
||||
decoder.builder.advance.x = metrics.advance;
|
||||
decoder.builder.advance.y = 0;
|
||||
}
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
font_matrix = cff->top_font.font_dict.font_matrix;
|
||||
font_offset = cff->top_font.font_dict.font_offset;
|
||||
|
||||
|
|
|
@ -1538,10 +1538,10 @@
|
|||
{
|
||||
if ( FT_FRAME_ENTER( ( num_glyphs - 1 ) * 2 ) )
|
||||
goto Exit;
|
||||
|
||||
|
||||
for ( j = 1; j < num_glyphs; j++ )
|
||||
charset->sids[j] = FT_GET_USHORT();
|
||||
|
||||
|
||||
FT_FRAME_EXIT();
|
||||
}
|
||||
break;
|
||||
|
@ -1595,17 +1595,16 @@
|
|||
/* In order to use a predefined charset, the following must be */
|
||||
/* true: The charset constructed for the glyphs in the font's */
|
||||
/* charstrings dictionary must match the predefined charset in */
|
||||
/* the first num_glyphs, and hence must match the predefined */
|
||||
/* charset *exactly*. */
|
||||
/* the first num_glyphs */
|
||||
|
||||
charset->offset = offset; /* record charset type */
|
||||
|
||||
switch ( (FT_UInt)offset )
|
||||
{
|
||||
case 0:
|
||||
if ( num_glyphs != 229 )
|
||||
if ( num_glyphs > 229 )
|
||||
{
|
||||
FT_ERROR(("cff_charset_load: implicit charset not equal to\n"
|
||||
FT_ERROR(("cff_charset_load: implicit charset larger than\n"
|
||||
"predefined charset (Adobe ISO-Latin)!\n" ));
|
||||
error = CFF_Err_Invalid_File_Format;
|
||||
goto Exit;
|
||||
|
@ -1622,9 +1621,9 @@
|
|||
break;
|
||||
|
||||
case 1:
|
||||
if ( num_glyphs != 166 )
|
||||
if ( num_glyphs > 166 )
|
||||
{
|
||||
FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
|
||||
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
|
||||
"predefined charset (Adobe Expert)!\n" ));
|
||||
error = CFF_Err_Invalid_File_Format;
|
||||
goto Exit;
|
||||
|
@ -1641,9 +1640,9 @@
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if ( num_glyphs != 87 )
|
||||
if ( num_glyphs > 87 )
|
||||
{
|
||||
FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
|
||||
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
|
||||
"predefined charset (Adobe Expert Subset)!\n" ));
|
||||
error = CFF_Err_Invalid_File_Format;
|
||||
goto Exit;
|
||||
|
@ -1744,26 +1743,29 @@
|
|||
FT_READ_BYTE( count ) )
|
||||
goto Exit;
|
||||
|
||||
encoding->count = count + 1;
|
||||
|
||||
switch ( encoding->format & 0x7F )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
FT_Byte* p;
|
||||
|
||||
|
||||
/* by convention, GID 0 is always ".notdef" and is never */
|
||||
/* coded in the font. Hence, the number of codes found */
|
||||
/* in the table is 'count+1' */
|
||||
/* */
|
||||
encoding->count = count + 1;
|
||||
|
||||
if ( FT_FRAME_ENTER( count ) )
|
||||
goto Exit;
|
||||
|
||||
p = (FT_Byte*)stream->cursor;
|
||||
|
||||
|
||||
for ( j = 1; j <= count; j++ )
|
||||
{
|
||||
glyph_code = *p++;
|
||||
|
||||
/* Make sure j is not too big. */
|
||||
if ( (FT_UInt) glyph_code < num_glyphs )
|
||||
if ( j < num_glyphs )
|
||||
{
|
||||
/* Assign code to GID mapping. */
|
||||
encoding->codes[glyph_code] = (FT_UShort)j;
|
||||
|
@ -1772,7 +1774,7 @@
|
|||
encoding->sids[glyph_code] = charset->sids[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FT_FRAME_EXIT();
|
||||
}
|
||||
break;
|
||||
|
@ -1784,6 +1786,8 @@
|
|||
FT_UInt k;
|
||||
|
||||
|
||||
encoding->count = 0;
|
||||
|
||||
/* Parse the Format1 ranges. */
|
||||
for ( j = 0; j < count; j++, i += nleft )
|
||||
{
|
||||
|
@ -1798,6 +1802,10 @@
|
|||
/* Increment nleft, so we read `nleft + 1' codes/sids. */
|
||||
nleft++;
|
||||
|
||||
/* compute max number of character codes */
|
||||
if ( (FT_UInt)nleft > encoding->count )
|
||||
encoding->count = nleft;
|
||||
|
||||
/* Fill in the range of codes/sids. */
|
||||
for ( k = i; k < nleft + i; k++, glyph_code++ )
|
||||
{
|
||||
|
@ -1812,6 +1820,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* simple check, one never knows what can be found in a font */
|
||||
if ( encoding->count > 256 )
|
||||
encoding->count = 256;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1867,8 +1879,6 @@
|
|||
/* encoding (see the note at the end of section 12 in the CFF */
|
||||
/* specification). */
|
||||
|
||||
encoding->count = 256;
|
||||
|
||||
switch ( (FT_UInt)offset )
|
||||
{
|
||||
case 0:
|
||||
|
@ -1886,6 +1896,10 @@
|
|||
Populate:
|
||||
/* Construct code to GID mapping from code to SID mapping */
|
||||
/* and charset. */
|
||||
|
||||
encoding->count = 0;
|
||||
|
||||
|
||||
for ( j = 0; j < 256; j++ )
|
||||
{
|
||||
/* If j is encoded, find the GID for it. */
|
||||
|
@ -1905,7 +1919,13 @@
|
|||
encoding->sids [j] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
encoding->codes[j] = (FT_UShort)i;
|
||||
|
||||
/* update encoding count */
|
||||
if ( encoding->count < j+1 )
|
||||
encoding->count = j+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
else
|
||||
|
||||
#endif
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
/* For ordinary fonts read the CID font dictionary index */
|
||||
/* and charstring offset from the CIDMap. */
|
||||
|
@ -162,23 +162,21 @@
|
|||
face->root.internal->incremental_interface &&
|
||||
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
|
||||
{
|
||||
FT_Bool found = FALSE;
|
||||
FT_Incremental_MetricsRec metrics;
|
||||
|
||||
|
||||
metrics.bearing_x = decoder->builder.left_bearing.x;
|
||||
metrics.bearing_y = decoder->builder.left_bearing.y;
|
||||
metrics.advance = decoder->builder.advance.x;
|
||||
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
|
||||
face->root.internal->incremental_interface->object,
|
||||
glyph_index, FALSE, &metrics, &found );
|
||||
if ( found )
|
||||
{
|
||||
decoder->builder.left_bearing.x = metrics.bearing_x;
|
||||
decoder->builder.left_bearing.y = metrics.bearing_y;
|
||||
decoder->builder.advance.x = metrics.advance;
|
||||
decoder->builder.advance.y = 0;
|
||||
}
|
||||
glyph_index, FALSE, &metrics );
|
||||
decoder->builder.left_bearing.x = metrics.bearing_x;
|
||||
decoder->builder.left_bearing.y = metrics.bearing_y;
|
||||
decoder->builder.advance.x = metrics.advance;
|
||||
decoder->builder.advance.y = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
Exit:
|
||||
return error;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: adler32.c,v 1.1 2003/04/01 08:38:22 gvg Exp $ */
|
||||
/* @(#) $Id: adler32.c,v 1.2 2003/04/18 10:44:17 gvg Exp $ */
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
|||
#define DO16(buf) DO8(buf,0); DO8(buf,8);
|
||||
|
||||
/* ========================================================================= */
|
||||
ZEXTERNDEF uLong ZEXPORT adler32(adler, buf, len)
|
||||
uLong adler;
|
||||
const Bytef *buf;
|
||||
uInt len;
|
||||
ZEXPORT(uLong) adler32( /* adler, buf, len) */
|
||||
uLong adler,
|
||||
const Bytef *buf,
|
||||
uInt len )
|
||||
{
|
||||
unsigned long s1 = adler & 0xffff;
|
||||
unsigned long s2 = (adler >> 16) & 0xffff;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
|
||||
# include "zlib.h"
|
||||
# include <zlib.h>
|
||||
|
||||
#else /* !SYSTEM_ZLIB */
|
||||
|
||||
|
@ -96,10 +96,10 @@
|
|||
#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
|
||||
local voidpf
|
||||
zcalloc (opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
zcalloc ( /* opaque, items, size) */
|
||||
voidpf opaque,
|
||||
unsigned items,
|
||||
unsigned size )
|
||||
{
|
||||
return ft_gzip_alloc( opaque, items, size );
|
||||
}
|
||||
|
@ -177,7 +177,7 @@
|
|||
(void)FT_STREAM_SKIP( 6 );
|
||||
|
||||
/* skip the extra field */
|
||||
if ( head[3] && FT_GZIP_EXTRA_FIELD )
|
||||
if ( head[3] & FT_GZIP_EXTRA_FIELD )
|
||||
{
|
||||
FT_UInt len;
|
||||
|
||||
|
@ -187,7 +187,7 @@
|
|||
}
|
||||
|
||||
/* skip original file name */
|
||||
if ( head[3] && FT_GZIP_ORIG_NAME )
|
||||
if ( head[3] & FT_GZIP_ORIG_NAME )
|
||||
for (;;)
|
||||
{
|
||||
FT_UInt c;
|
||||
|
@ -276,6 +276,8 @@
|
|||
{
|
||||
z_stream* zstream = &zip->zstream;
|
||||
|
||||
inflateEnd( zstream );
|
||||
|
||||
/* clear the rest */
|
||||
zstream->zalloc = NULL;
|
||||
zstream->zfree = NULL;
|
||||
|
@ -376,6 +378,7 @@
|
|||
if ( err == Z_STREAM_END )
|
||||
{
|
||||
zip->limit = zstream->next_out;
|
||||
error = FT_Err_Invalid_Stream_Operation;
|
||||
break;
|
||||
}
|
||||
else if ( err != Z_OK )
|
||||
|
|
|
@ -64,10 +64,10 @@ local const uInt border[] = { /* Order of the bit length code lengths */
|
|||
*/
|
||||
|
||||
|
||||
local void inflate_blocks_reset(s, z, c)
|
||||
inflate_blocks_statef *s;
|
||||
z_streamp z;
|
||||
uLongf *c;
|
||||
local void inflate_blocks_reset( /* s, z, c) */
|
||||
inflate_blocks_statef *s,
|
||||
z_streamp z,
|
||||
uLongf *c )
|
||||
{
|
||||
if (c != Z_NULL)
|
||||
*c = s->check;
|
||||
|
@ -85,10 +85,10 @@ uLongf *c;
|
|||
}
|
||||
|
||||
|
||||
local inflate_blocks_statef *inflate_blocks_new(z, c, w)
|
||||
z_streamp z;
|
||||
check_func c;
|
||||
uInt w;
|
||||
local inflate_blocks_statef *inflate_blocks_new( /* z, c, w) */
|
||||
z_streamp z,
|
||||
check_func c,
|
||||
uInt w )
|
||||
{
|
||||
inflate_blocks_statef *s;
|
||||
|
||||
|
@ -116,10 +116,10 @@ uInt w;
|
|||
}
|
||||
|
||||
|
||||
local int inflate_blocks(s, z, r)
|
||||
inflate_blocks_statef *s;
|
||||
z_streamp z;
|
||||
int r;
|
||||
local int inflate_blocks( /* s, z, r) */
|
||||
inflate_blocks_statef *s,
|
||||
z_streamp z,
|
||||
int r )
|
||||
{
|
||||
uInt t; /* temporary storage */
|
||||
uLong b; /* bit buffer */
|
||||
|
@ -365,12 +365,15 @@ int r;
|
|||
r = Z_STREAM_ERROR;
|
||||
LEAVE
|
||||
}
|
||||
#ifdef NEED_DUMMY_RETURN
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
local int inflate_blocks_free(s, z)
|
||||
inflate_blocks_statef *s;
|
||||
z_streamp z;
|
||||
local int inflate_blocks_free( /* s, z) */
|
||||
inflate_blocks_statef *s,
|
||||
z_streamp z )
|
||||
{
|
||||
inflate_blocks_reset(s, z, Z_NULL);
|
||||
ZFREE(z, s->window);
|
||||
|
|
|
@ -55,11 +55,11 @@ struct inflate_codes_state {
|
|||
};
|
||||
|
||||
|
||||
local inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
|
||||
uInt bl, bd;
|
||||
inflate_huft *tl;
|
||||
inflate_huft *td; /* need separate declaration for Borland C++ */
|
||||
z_streamp z;
|
||||
local inflate_codes_statef *inflate_codes_new( /* bl, bd, tl, td, z) */
|
||||
uInt bl, uInt bd,
|
||||
inflate_huft *tl,
|
||||
inflate_huft *td, /* need separate declaration for Borland C++ */
|
||||
z_streamp z )
|
||||
{
|
||||
inflate_codes_statef *c;
|
||||
|
||||
|
@ -77,10 +77,10 @@ z_streamp z;
|
|||
}
|
||||
|
||||
|
||||
local int inflate_codes(s, z, r)
|
||||
inflate_blocks_statef *s;
|
||||
z_streamp z;
|
||||
int r;
|
||||
local int inflate_codes( /* s, z, r) */
|
||||
inflate_blocks_statef *s,
|
||||
z_streamp z,
|
||||
int r )
|
||||
{
|
||||
uInt j; /* temporary storage */
|
||||
inflate_huft *t; /* temporary pointer */
|
||||
|
@ -241,9 +241,9 @@ int r;
|
|||
}
|
||||
|
||||
|
||||
local void inflate_codes_free(c, z)
|
||||
inflate_codes_statef *c;
|
||||
z_streamp z;
|
||||
local void inflate_codes_free( /* c, z) */
|
||||
inflate_codes_statef *c,
|
||||
z_streamp z )
|
||||
{
|
||||
ZFREE(z, c);
|
||||
Tracev((stderr, "inflate: codes free\n"));
|
||||
|
|
|
@ -51,8 +51,8 @@ struct internal_state {
|
|||
};
|
||||
|
||||
|
||||
int ZEXPORT inflateReset(z)
|
||||
z_streamp z;
|
||||
ZEXPORT(int) inflateReset( /* z) */
|
||||
z_streamp z )
|
||||
{
|
||||
if (z == Z_NULL || z->state == Z_NULL)
|
||||
return Z_STREAM_ERROR;
|
||||
|
@ -65,8 +65,8 @@ z_streamp z;
|
|||
}
|
||||
|
||||
|
||||
int ZEXPORT inflateEnd(z)
|
||||
z_streamp z;
|
||||
ZEXPORT(int) inflateEnd( /* z) */
|
||||
z_streamp z )
|
||||
{
|
||||
if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
|
||||
return Z_STREAM_ERROR;
|
||||
|
@ -79,11 +79,11 @@ z_streamp z;
|
|||
}
|
||||
|
||||
|
||||
int ZEXPORT inflateInit2_(z, w, version, stream_size)
|
||||
z_streamp z;
|
||||
int w;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
ZEXPORT(int) inflateInit2_( /* z, w, version, stream_size) */
|
||||
z_streamp z,
|
||||
int w,
|
||||
const char *version,
|
||||
int stream_size )
|
||||
{
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
stream_size != sizeof(z_stream))
|
||||
|
@ -144,9 +144,9 @@ int stream_size;
|
|||
#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
|
||||
|
||||
|
||||
int ZEXPORT inflate(z, f)
|
||||
z_streamp z;
|
||||
int f;
|
||||
ZEXPORT(int) inflate( /* z, f) */
|
||||
z_streamp z,
|
||||
int f )
|
||||
{
|
||||
int r;
|
||||
uInt b;
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
local const char inflate_copyright[] =
|
||||
" inflate 1.1.4 Copyright 1995-2002 Mark Adler ";
|
||||
#endif
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
|
@ -89,21 +92,22 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */
|
|||
/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
|
||||
#define BMAX 15 /* maximum bit length of any code */
|
||||
|
||||
local int huft_build(b, n, s, d, e, t, m, hp, hn, v)
|
||||
uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
|
||||
uInt n; /* number of codes (assumed <= 288) */
|
||||
uInt s; /* number of simple-valued codes (0..s-1) */
|
||||
const uIntf *d; /* list of base values for non-simple codes */
|
||||
const uIntf *e; /* list of extra bits for non-simple codes */
|
||||
inflate_huft * FAR *t; /* result: starting table */
|
||||
uIntf *m; /* maximum lookup bits, returns actual */
|
||||
inflate_huft *hp; /* space for trees */
|
||||
uInt *hn; /* hufts used in space */
|
||||
uIntf *v; /* working area: values in order of bit length */
|
||||
local int huft_build( /* b, n, s, d, e, t, m, hp, hn, v) */
|
||||
uIntf *b, /* code lengths in bits (all assumed <= BMAX) */
|
||||
uInt n, /* number of codes (assumed <= 288) */
|
||||
uInt s, /* number of simple-valued codes (0..s-1) */
|
||||
const uIntf *d, /* list of base values for non-simple codes */
|
||||
const uIntf *e, /* list of extra bits for non-simple codes */
|
||||
inflate_huft * FAR *t, /* result: starting table */
|
||||
uIntf *m, /* maximum lookup bits, returns actual */
|
||||
inflate_huft *hp, /* space for trees */
|
||||
uInt *hn, /* hufts used in space */
|
||||
uIntf *v /* working area: values in order of bit length */
|
||||
/* Given a list of code lengths and a maximum table size, make a set of
|
||||
tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
|
||||
if the given code set is incomplete (the tables are still built in this
|
||||
case), or Z_DATA_ERROR if the input is invalid. */
|
||||
)
|
||||
{
|
||||
|
||||
uInt a; /* counter for codes of length k */
|
||||
|
@ -289,12 +293,13 @@ uIntf *v; /* working area: values in order of bit length */
|
|||
}
|
||||
|
||||
|
||||
local int inflate_trees_bits(c, bb, tb, hp, z)
|
||||
uIntf *c; /* 19 code lengths */
|
||||
uIntf *bb; /* bits tree desired/actual depth */
|
||||
inflate_huft * FAR *tb; /* bits tree result */
|
||||
inflate_huft *hp; /* space for trees */
|
||||
z_streamp z; /* for messages */
|
||||
local int inflate_trees_bits( /* c, bb, tb, hp, z) */
|
||||
uIntf *c, /* 19 code lengths */
|
||||
uIntf *bb, /* bits tree desired/actual depth */
|
||||
inflate_huft * FAR *tb, /* bits tree result */
|
||||
inflate_huft *hp, /* space for trees */
|
||||
z_streamp z /* for messages */
|
||||
)
|
||||
{
|
||||
int r;
|
||||
uInt hn = 0; /* hufts used in space */
|
||||
|
@ -316,16 +321,17 @@ z_streamp z; /* for messages */
|
|||
}
|
||||
|
||||
|
||||
local int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z)
|
||||
uInt nl; /* number of literal/length codes */
|
||||
uInt nd; /* number of distance codes */
|
||||
uIntf *c; /* that many (total) code lengths */
|
||||
uIntf *bl; /* literal desired/actual bit depth */
|
||||
uIntf *bd; /* distance desired/actual bit depth */
|
||||
inflate_huft * FAR *tl; /* literal/length tree result */
|
||||
inflate_huft * FAR *td; /* distance tree result */
|
||||
inflate_huft *hp; /* space for trees */
|
||||
z_streamp z; /* for messages */
|
||||
local int inflate_trees_dynamic( /* nl, nd, c, bl, bd, tl, td, hp, z) */
|
||||
uInt nl, /* number of literal/length codes */
|
||||
uInt nd, /* number of distance codes */
|
||||
uIntf *c, /* that many (total) code lengths */
|
||||
uIntf *bl, /* literal desired/actual bit depth */
|
||||
uIntf *bd, /* distance desired/actual bit depth */
|
||||
inflate_huft * FAR *tl, /* literal/length tree result */
|
||||
inflate_huft * FAR *td, /* distance tree result */
|
||||
inflate_huft *hp, /* space for trees */
|
||||
z_streamp z /* for messages */
|
||||
)
|
||||
{
|
||||
int r;
|
||||
uInt hn = 0; /* hufts used in space */
|
||||
|
@ -394,12 +400,13 @@ local inflate_huft *fixed_td;
|
|||
#endif
|
||||
|
||||
|
||||
local int inflate_trees_fixed(bl, bd, tl, td, z)
|
||||
uIntf *bl; /* literal desired/actual bit depth */
|
||||
uIntf *bd; /* distance desired/actual bit depth */
|
||||
inflate_huft * FAR *tl; /* literal/length tree result */
|
||||
inflate_huft * FAR *td; /* distance tree result */
|
||||
z_streamp z; /* for memory allocation */
|
||||
local int inflate_trees_fixed( /* bl, bd, tl, td, z) */
|
||||
uIntf *bl, /* literal desired/actual bit depth */
|
||||
uIntf *bd, /* distance desired/actual bit depth */
|
||||
inflate_huft * FAR *tl, /* literal/length tree result */
|
||||
inflate_huft * FAR *td, /* distance tree result */
|
||||
z_streamp z /* for memory allocation */
|
||||
)
|
||||
{
|
||||
#ifdef BUILDFIXED
|
||||
/* build fixed tables if not already */
|
||||
|
|
|
@ -19,10 +19,10 @@ local uInt inflate_mask[17] = {
|
|||
|
||||
|
||||
/* copy as much as possible from the sliding window to the output area */
|
||||
local int inflate_flush(s, z, r)
|
||||
inflate_blocks_statef *s;
|
||||
z_streamp z;
|
||||
int r;
|
||||
local int inflate_flush( /* s, z, r) */
|
||||
inflate_blocks_statef *s,
|
||||
z_streamp z,
|
||||
int r )
|
||||
{
|
||||
uInt n;
|
||||
Bytef *p;
|
||||
|
|
|
@ -21,7 +21,11 @@ GZIP_DIR_ := $(GZIP_DIR)$(SEP)
|
|||
|
||||
# compilation flags for the driver
|
||||
#
|
||||
GZIP_COMPILE := $(FT_COMPILE) $I$(GZIP_DIR)
|
||||
ifeq ($(SYSTEM_ZLIB),)
|
||||
GZIP_COMPILE := $(FT_COMPILE) $I$(GZIP_DIR)
|
||||
else
|
||||
GZIP_COMPILE := $(FT_COMPILE)
|
||||
endif
|
||||
|
||||
|
||||
# gzip support sources (i.e., C files)
|
||||
|
@ -30,15 +34,19 @@ GZIP_DRV_SRC := $(GZIP_DIR_)ftgzip.c
|
|||
|
||||
# gzip support headers
|
||||
#
|
||||
GZIP_DRV_H :=
|
||||
GZIP_DRV_H :=
|
||||
|
||||
|
||||
# Pfr driver object(s)
|
||||
# gzip driver object(s)
|
||||
#
|
||||
# GZIP_DRV_OBJ_M is used during `multi' builds
|
||||
# GZIP_DRV_OBJ_S is used during `single' builds
|
||||
#
|
||||
GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR_)%.c=$(OBJ_)%.$O)
|
||||
ifeq ($(SYSTEM_ZLIB),)
|
||||
GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR_)%.c=$(OBJ_)%.$O)
|
||||
else
|
||||
GZIP_DRV_OBJ_M := $(OBJ_)ftgzip.$O
|
||||
endif
|
||||
GZIP_DRV_OBJ_S := $(OBJ_)ftgzip.$O
|
||||
|
||||
# gzip support source file for single build
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zconf.h,v 1.1 2003/04/01 08:38:22 gvg Exp $ */
|
||||
/* @(#) $Id: zconf.h,v 1.2 2003/04/18 10:44:17 gvg Exp $ */
|
||||
|
||||
#ifndef _ZCONF_H
|
||||
#define _ZCONF_H
|
||||
|
@ -91,11 +91,14 @@
|
|||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Old Borland C incorrectly complains about missing returns: */
|
||||
/* Old Borland C and LCC incorrectly complains about missing returns: */
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
||||
# define NEED_DUMMY_RETURN
|
||||
#endif
|
||||
|
||||
#if defined(__LCC__)
|
||||
# define NEED_DUMMY_RETURN
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
|
@ -167,22 +170,22 @@
|
|||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# define ZEXPORT WINAPI
|
||||
# define ZEXPORT(x) x WINAPI
|
||||
# ifdef WIN32
|
||||
# define ZEXPORTVA WINAPIV
|
||||
# define ZEXPORTVA(x) x WINAPIV
|
||||
# else
|
||||
# define ZEXPORTVA FAR _cdecl _export
|
||||
# define ZEXPORTVA(x) x FAR _cdecl _export
|
||||
# endif
|
||||
# endif
|
||||
# if defined (__BORLANDC__)
|
||||
# if (__BORLANDC__ >= 0x0500) && defined (WIN32)
|
||||
# include <windows.h>
|
||||
# define ZEXPORT __declspec(dllexport) WINAPI
|
||||
# define ZEXPORTRVA __declspec(dllexport) WINAPIV
|
||||
# define ZEXPORT(x) x __declspec(dllexport) WINAPI
|
||||
# define ZEXPORTRVA(x) x __declspec(dllexport) WINAPIV
|
||||
# else
|
||||
# if defined (_Windows) && defined (__DLL__)
|
||||
# define ZEXPORT _export
|
||||
# define ZEXPORTVA _export
|
||||
# define ZEXPORT(x) x _export
|
||||
# define ZEXPORTVA(x) x _export
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
@ -190,16 +193,16 @@
|
|||
|
||||
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT
|
||||
# define ZEXPORT(x) static x
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA
|
||||
# define ZEXPORTVA(x) static x
|
||||
#endif
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN static
|
||||
# define ZEXTERN(x) static x
|
||||
#endif
|
||||
#ifndef ZEXTERNDEF
|
||||
# define ZEXTERNDEF static
|
||||
# define ZEXTERNDEF(x) static x
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
|
|
|
@ -173,7 +173,7 @@ typedef z_stream FAR *z_streamp;
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
|
||||
ZEXTERN(int) deflateInit OF((z_streamp strm, int level));
|
||||
|
||||
Initializes the internal stream state for compression. The fields
|
||||
zalloc, zfree and opaque must be initialized before by the caller.
|
||||
|
@ -286,7 +286,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
|
|||
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
||||
ZEXTERN(int) inflateInit OF((z_streamp strm));
|
||||
|
||||
Initializes the internal stream state for decompression. The fields
|
||||
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
|
||||
|
@ -306,7 +306,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
ZEXTERN(int) inflate OF((z_streamp strm, int flush));
|
||||
/*
|
||||
inflate decompresses as much data as possible, and stops when the input
|
||||
buffer becomes empty or the output buffer becomes full. It may some
|
||||
|
@ -375,7 +375,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
||||
ZEXTERN(int) inflateEnd OF((z_streamp strm));
|
||||
/*
|
||||
All dynamically allocated data structures for this stream are freed.
|
||||
This function discards any unprocessed input and does not flush any
|
||||
|
@ -393,7 +393,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
||||
ZEXTERN(int) deflateInit2 OF((z_streamp strm,
|
||||
int level,
|
||||
int method,
|
||||
int windowBits,
|
||||
|
@ -514,7 +514,7 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
||||
ZEXTERN(int) inflateInit2 OF((z_streamp strm,
|
||||
int windowBits));
|
||||
|
||||
This is another version of inflateInit with an extra parameter. The
|
||||
|
@ -566,7 +566,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
|||
until success or end of the input data.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
||||
ZEXTERN(int) inflateReset OF((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to inflateEnd followed by inflateInit,
|
||||
but does not free and reallocate all the internal decompression state.
|
||||
|
@ -772,7 +772,7 @@ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
|||
compression library.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
ZEXTERN(uLong) adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
|
||||
/*
|
||||
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
||||
|
@ -810,7 +810,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
|||
/* deflateInit and inflateInit are macros to allow checking the zlib version
|
||||
* and the compiler's view of z_stream:
|
||||
*/
|
||||
ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
|
||||
ZEXTERN(int) inflateInit2_ OF((z_streamp strm, int windowBits,
|
||||
const char *version, int stream_size));
|
||||
#define deflateInit(strm, level) \
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zutil.c,v 1.1 2003/04/01 08:38:22 gvg Exp $ */
|
||||
/* @(#) $Id: zutil.c,v 1.2 2003/04/18 10:44:17 gvg Exp $ */
|
||||
|
||||
#include "zutil.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zutil.h,v 1.1 2003/04/01 08:38:22 gvg Exp $ */
|
||||
/* @(#) $Id: zutil.h,v 1.2 2003/04/18 10:44:17 gvg Exp $ */
|
||||
|
||||
#ifndef _Z_UTIL_H
|
||||
#define _Z_UTIL_H
|
||||
|
@ -203,7 +203,7 @@ typedef unsigned long ulg;
|
|||
#endif
|
||||
|
||||
|
||||
typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
|
||||
typedef uLong (*check_func) OF((uLong check, const Bytef *buf,
|
||||
uInt len));
|
||||
local voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
|
||||
local void zcfree OF((voidpf opaque, voidpf ptr));
|
||||
|
|
|
@ -19,10 +19,12 @@ OTL_SCRIPT_TAG( 'a','r','m','n', "Armenian", ARMENIAN )
|
|||
OTL_SCRIPT_TAG( 'b','e','n','g', "Bengali", BENGALI )
|
||||
OTL_SCRIPT_TAG( 'b','o','p','o', "Bopomofo", BOPOMOFO )
|
||||
OTL_SCRIPT_TAG( 'b','r','a','i', "Braille", BRAILLE )
|
||||
OTL_SCRIPT_TAG( 'b','y','z','m', "Byzantine Music", BYZANTINE_MUSIC )
|
||||
OTL_SCRIPT_TAG( 'c','a','n','s', "Canadian Syllabic", CANADIAN )
|
||||
OTL_SCRIPT_TAG( 'c','h','e','r', "Cherokee", CHEROKEE )
|
||||
OTL_SCRIPT_TAG( 'h','a','n','i', "CJK Ideographic", CJK )
|
||||
OTL_SCRIPT_TAG( 'c','y','r','l', "Cyrillic", CYRILLIC )
|
||||
OTL_SCRIPT_TAG( 'd','f','l','t', "Default", DEFAULT )
|
||||
OTL_SCRIPT_TAG( 'd','e','v','a', "Devanagari", DEVANAGARI )
|
||||
OTL_SCRIPT_TAG( 'e','t','h','i', "Ethiopic", ETHIOPIC )
|
||||
OTL_SCRIPT_TAG( 'g','e','o','r', "Georgian", GEORGIAN )
|
||||
|
@ -32,9 +34,9 @@ OTL_SCRIPT_TAG( 'g','u','r','u', "Gurmukhi", GURMUKHI )
|
|||
OTL_SCRIPT_TAG( 'j','a','m','o', "Hangul Jamo", JAMO )
|
||||
OTL_SCRIPT_TAG( 'h','a','n','g', "Hangul", HANGUL )
|
||||
OTL_SCRIPT_TAG( 'h','e','b','r', "Hebrew", HEBREW )
|
||||
OTL_SCRIPT_TAG( 'h','i','r','a', "Hiragana", HIRAGANA )
|
||||
OTL_SCRIPT_TAG( 'h','i','r','a', "Hiragana", HIRAGANA ) /* not in TAGS.txt */
|
||||
OTL_SCRIPT_TAG( 'k','n','d','a', "Kannada", KANNADA )
|
||||
OTL_SCRIPT_TAG( 'k','a','n','a', "Katakana", KATAKANA )
|
||||
OTL_SCRIPT_TAG( 'k','a','n','a', "Katakana", KATAKANA ) /* in TAGS.txt, means Hiragana _and_ Katakana */
|
||||
OTL_SCRIPT_TAG( 'k','h','m','r', "Khmer", KHMER )
|
||||
OTL_SCRIPT_TAG( 'l','a','o',' ', "Lao", LAO )
|
||||
OTL_SCRIPT_TAG( 'l','a','t','n', "Latin", LATIN )
|
||||
|
|
|
@ -229,7 +229,6 @@ FT_BEGIN_HEADER
|
|||
pcf_load_font( FT_Stream,
|
||||
PCF_Face );
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __PCF_H__ */
|
||||
|
|
|
@ -32,10 +32,12 @@ THE SOFTWARE.
|
|||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_GZIP_H
|
||||
#include FT_ERRORS_H
|
||||
#include FT_BDF_H
|
||||
|
||||
#include "pcf.h"
|
||||
#include "pcfdriver.h"
|
||||
#include "pcfutil.h"
|
||||
#include "pcfread.h"
|
||||
|
||||
#include "pcferror.h"
|
||||
|
||||
|
@ -353,7 +355,6 @@ THE SOFTWARE.
|
|||
PCF_Face face = (PCF_Face)FT_SIZE_FACE( size );
|
||||
FT_Stream stream = face->root.stream;
|
||||
FT_Error error = PCF_Err_Ok;
|
||||
FT_Memory memory = FT_FACE( face )->memory;
|
||||
FT_Bitmap* bitmap = &slot->bitmap;
|
||||
PCF_Metric metric;
|
||||
int bytes;
|
||||
|
@ -409,7 +410,8 @@ THE SOFTWARE.
|
|||
/* XXX: to do: are there cases that need repadding the bitmap? */
|
||||
bytes = bitmap->pitch * bitmap->rows;
|
||||
|
||||
if ( FT_ALLOC( bitmap->buffer, bytes ) )
|
||||
error = ft_glyphslot_alloc_bitmap( slot, bytes );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
if ( FT_STREAM_SEEK( metric->bits ) ||
|
||||
|
@ -449,7 +451,6 @@ THE SOFTWARE.
|
|||
|
||||
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
|
||||
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
||||
slot->flags = FT_GLYPH_OWN_BITMAP;
|
||||
|
||||
FT_TRACE4(( " --- ok\n" ));
|
||||
|
||||
|
@ -458,6 +459,49 @@ THE SOFTWARE.
|
|||
}
|
||||
|
||||
|
||||
static FT_Error
|
||||
pcf_get_bdf_property( PCF_Face face,
|
||||
const char* prop_name,
|
||||
BDF_PropertyRec *aproperty )
|
||||
{
|
||||
PCF_Property prop;
|
||||
|
||||
prop = pcf_find_property( face, prop_name );
|
||||
if ( prop != NULL )
|
||||
{
|
||||
if ( prop->isString )
|
||||
{
|
||||
aproperty->type = BDF_PROPERTY_TYPE_ATOM;
|
||||
aproperty->u.atom = prop->value.atom;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* apparently, the PCF driver loads all properties as signed integers !
|
||||
* this really doesn't seem to be a problem, because this is
|
||||
* sufficient for any meaningful values
|
||||
*/
|
||||
aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
|
||||
aproperty->u.integer = prop->value.integer;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return FT_Err_Invalid_Argument;
|
||||
}
|
||||
|
||||
|
||||
static FT_Module_Interface
|
||||
pcf_driver_requester( FT_Module module,
|
||||
const char* name )
|
||||
{
|
||||
FT_UNUSED( module );
|
||||
|
||||
if ( name && ft_strcmp( name, "get_bdf_property" ) == 0 )
|
||||
return (FT_Module_Interface) pcf_get_bdf_property;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_TABLE_DEF
|
||||
const FT_Driver_ClassRec pcf_driver_class =
|
||||
{
|
||||
|
@ -473,7 +517,7 @@ THE SOFTWARE.
|
|||
|
||||
(FT_Module_Constructor)0,
|
||||
(FT_Module_Destructor) 0,
|
||||
(FT_Module_Requester) 0
|
||||
(FT_Module_Requester) pcf_driver_requester
|
||||
},
|
||||
|
||||
sizeof( PCF_FaceRec ),
|
||||
|
|
|
@ -33,6 +33,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "pcf.h"
|
||||
#include "pcfdriver.h"
|
||||
#include "pcfread.h"
|
||||
|
||||
#include "pcferror.h"
|
||||
|
||||
|
@ -316,7 +317,7 @@ THE SOFTWARE.
|
|||
};
|
||||
|
||||
|
||||
static PCF_Property
|
||||
FT_LOCAL_DEF( PCF_Property )
|
||||
pcf_find_property( PCF_Face face,
|
||||
const FT_String* prop )
|
||||
{
|
||||
|
|
45
reactos/lib/freetype/src/pcf/pcfread.h
Normal file
45
reactos/lib/freetype/src/pcf/pcfread.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* pcfread.h
|
||||
|
||||
FreeType font driver for pcf fonts
|
||||
|
||||
Copyright 2000-2001 by
|
||||
Francesco Zappa Nardelli
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __PCFREAD_H__
|
||||
#define __PCFREAD_H__
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
FT_LOCAL( PCF_Property )
|
||||
pcf_find_property( PCF_Face face,
|
||||
const FT_String* prop );
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __PCFUTIL_H__ */
|
||||
|
||||
|
||||
/* END */
|
|
@ -432,7 +432,16 @@
|
|||
}
|
||||
|
||||
|
||||
/* load font ID, i.e. name */
|
||||
/* load font ID, this is a so-called "unique" name that is rather
|
||||
* long and descriptive (like "Tiresias ScreenFont v7.51").
|
||||
*
|
||||
* note that a PFR font's family name is contained in an *undocumented*
|
||||
* string of the "auxiliary data" portion of a physical font record. this
|
||||
* may also contain the "real" style name !
|
||||
*
|
||||
* if no family name is present, the font id is used instead for the
|
||||
* family
|
||||
*/
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
pfr_extra_item_load_font_id( FT_Byte* p,
|
||||
FT_Byte* limit,
|
||||
|
@ -693,12 +702,54 @@
|
|||
};
|
||||
|
||||
|
||||
/* loads a name from the auxiliary data. Since this extracts undocumented
|
||||
* strings from the font file, we need to be careful here
|
||||
*/
|
||||
static FT_Error
|
||||
pfr_aux_name_load( FT_Byte* p,
|
||||
FT_UInt len,
|
||||
FT_Memory memory,
|
||||
FT_String* *astring )
|
||||
{
|
||||
FT_Error error = 0;
|
||||
FT_String* result = NULL;
|
||||
FT_UInt n, ok;
|
||||
|
||||
if ( len > 0 && p[len-1] == 0 )
|
||||
len--;
|
||||
|
||||
/* check that each character is ASCII, that's to be sure
|
||||
* to not load garbage..
|
||||
*/
|
||||
ok = (len > 0);
|
||||
for ( n = 0; n < len; n++ )
|
||||
if ( p[n] < 32 || p[n] > 127 )
|
||||
{
|
||||
ok = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ok )
|
||||
{
|
||||
if ( FT_ALLOC( result, len+1 ) )
|
||||
goto Exit;
|
||||
|
||||
FT_MEM_COPY( result, p, len );
|
||||
result[len] = 0;
|
||||
}
|
||||
Exit:
|
||||
*astring = result;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
pfr_phy_font_done( PFR_PhyFont phy_font,
|
||||
FT_Memory memory )
|
||||
{
|
||||
if ( phy_font->font_id )
|
||||
FT_FREE( phy_font->font_id );
|
||||
FT_FREE( phy_font->font_id );
|
||||
FT_FREE( phy_font->family_name );
|
||||
FT_FREE( phy_font->style_name );
|
||||
|
||||
FT_FREE( phy_font->vertical.stem_snaps );
|
||||
phy_font->vertical.num_stem_snaps = 0;
|
||||
|
@ -736,6 +787,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
pfr_phy_font_load( PFR_PhyFont phy_font,
|
||||
FT_Stream stream,
|
||||
|
@ -790,12 +842,80 @@
|
|||
goto Fail;
|
||||
}
|
||||
|
||||
/* skip the aux bytes */
|
||||
/* in certain fonts, the auxiliary bytes contain interesting */
|
||||
/* information. These are not in the specification but can be */
|
||||
/* guessed by looking at the content of a few PFR0 fonts */
|
||||
PFR_CHECK( 3 );
|
||||
num_aux = PFR_NEXT_ULONG( p );
|
||||
|
||||
PFR_CHECK( num_aux );
|
||||
p += num_aux;
|
||||
if ( num_aux > 0 )
|
||||
{
|
||||
FT_Byte* q = p;
|
||||
FT_Byte* q2;
|
||||
|
||||
PFR_CHECK( num_aux );
|
||||
p += num_aux;
|
||||
|
||||
while ( num_aux > 0 )
|
||||
{
|
||||
FT_UInt length, type;
|
||||
|
||||
if ( q + 4 > p )
|
||||
break;
|
||||
|
||||
length = PFR_NEXT_USHORT(q);
|
||||
if ( length < 4 || length > num_aux )
|
||||
break;
|
||||
|
||||
q2 = q + length - 2;
|
||||
type = PFR_NEXT_USHORT(q);
|
||||
|
||||
switch ( type )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
/* this seems to correspond to the font's family name,
|
||||
* padded to 16-bits with one zero when necessary
|
||||
*/
|
||||
error = pfr_aux_name_load( q, length-4U, memory,
|
||||
&phy_font->family_name );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
if ( q + 32 > q2 )
|
||||
break;
|
||||
|
||||
q += 10;
|
||||
phy_font->ascent = PFR_NEXT_SHORT(q);
|
||||
phy_font->descent = PFR_NEXT_SHORT(q);
|
||||
phy_font->leading = PFR_NEXT_SHORT(q);
|
||||
q += 16;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
/* this seems to correspond to the font's style name,
|
||||
* padded to 16-bits with one zero when necessary
|
||||
*/
|
||||
error = pfr_aux_name_load( q, length-4U, memory,
|
||||
&phy_font->style_name );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
}
|
||||
q = q2;
|
||||
num_aux -= length;
|
||||
}
|
||||
}
|
||||
|
||||
/* read the blue values */
|
||||
{
|
||||
|
|
|
@ -41,10 +41,17 @@
|
|||
FT_LOCAL_DEF( void )
|
||||
pfr_face_done( PFR_Face face )
|
||||
{
|
||||
FT_Memory memory = face->root.driver->root.memory;
|
||||
|
||||
/* we don't want dangling pointers */
|
||||
face->root.family_name = NULL;
|
||||
face->root.style_name = NULL;
|
||||
|
||||
/* finalize the physical font record */
|
||||
pfr_phy_font_done( &face->phy_font, FT_FACE_MEMORY( face ) );
|
||||
|
||||
/* no need to finalize the logical font or the header */
|
||||
FT_FREE( face->root.available_sizes );
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,8 +143,18 @@
|
|||
if ( phy_font->num_kern_pairs > 0 )
|
||||
root->face_flags |= FT_FACE_FLAG_KERNING;
|
||||
|
||||
root->family_name = phy_font->font_id;
|
||||
root->style_name = NULL; /* no style name in font file */
|
||||
/* if no family name was found in the "undocumented" auxiliary
|
||||
* data, use the font ID instead. This sucks but is better than
|
||||
* nothing
|
||||
*/
|
||||
root->family_name = phy_font->family_name;
|
||||
if ( root->family_name == NULL )
|
||||
root->family_name = phy_font->font_id;
|
||||
|
||||
/* note that the style name can be NULL in certain PFR fonts,
|
||||
* probably meaning "Regular"
|
||||
*/
|
||||
root->style_name = phy_font->style_name;
|
||||
|
||||
root->num_fixed_sizes = 0;
|
||||
root->available_sizes = 0;
|
||||
|
@ -150,6 +167,27 @@
|
|||
( ( ( root->ascender - root->descender ) * 12 )
|
||||
/ 10 );
|
||||
|
||||
if ( phy_font->num_strikes > 0 )
|
||||
{
|
||||
FT_UInt n, count = phy_font->num_strikes;
|
||||
FT_Bitmap_Size* size;
|
||||
PFR_Strike strike;
|
||||
FT_Memory memory = root->stream->memory;
|
||||
|
||||
|
||||
if ( FT_NEW_ARRAY( root->available_sizes, count ) )
|
||||
goto Exit;
|
||||
|
||||
size = root->available_sizes;
|
||||
strike = phy_font->strikes;
|
||||
for ( n = 0; n < count; n++, size++, strike++ )
|
||||
{
|
||||
size->height = (FT_UShort) strike->y_ppm;
|
||||
size->width = (FT_UShort) strike->x_ppm;
|
||||
}
|
||||
root->num_fixed_sizes = count;
|
||||
}
|
||||
|
||||
/* now compute maximum advance width */
|
||||
if ( ( phy_font->flags & PFR_PHY_PROPORTIONAL ) == 0 )
|
||||
root->max_advance_width = (FT_Short)phy_font->standard_advance;
|
||||
|
@ -255,6 +293,12 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
if ( load_flags & FT_LOAD_SBITS_ONLY )
|
||||
{
|
||||
error = FT_Err_Invalid_Argument;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
gchar = face->phy_font.chars + gindex;
|
||||
slot->root.format = FT_GLYPH_FORMAT_OUTLINE;
|
||||
outline->n_points = 0;
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
static void
|
||||
pfr_bitwriter_init( PFR_BitWriter writer,
|
||||
FT_Bitmap* target,
|
||||
FT_Bool decreasing )
|
||||
FT_UInt decreasing )
|
||||
{
|
||||
writer->line = target->buffer;
|
||||
writer->pitch = target->pitch;
|
||||
|
@ -107,7 +107,7 @@
|
|||
}
|
||||
else if ( mask == 0 )
|
||||
{
|
||||
cur[0] = c;
|
||||
cur[0] = (FT_Byte)c;
|
||||
mask = 0x80;
|
||||
c = 0;
|
||||
cur ++;
|
||||
|
@ -115,7 +115,7 @@
|
|||
}
|
||||
|
||||
if ( mask != 0x80 )
|
||||
cur[0] = c;
|
||||
cur[0] = (FT_Byte) c;
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@
|
|||
}
|
||||
else if ( mask == 0 )
|
||||
{
|
||||
cur[0] = c;
|
||||
cur[0] = (FT_Byte) c;
|
||||
mask = 0x80;
|
||||
c = 0;
|
||||
cur ++;
|
||||
|
@ -249,7 +249,7 @@
|
|||
}
|
||||
else if ( mask == 0 )
|
||||
{
|
||||
cur[0] = c;
|
||||
cur[0] = (FT_Byte) c;
|
||||
c = 0;
|
||||
mask = 0x80;
|
||||
cur ++;
|
||||
|
@ -281,7 +281,7 @@
|
|||
FT_ULong* found_size )
|
||||
{
|
||||
FT_UInt left, right, char_len;
|
||||
FT_Bool two = flags & 1;
|
||||
FT_Bool two = FT_BOOL( flags & 1 );
|
||||
FT_Byte* buff;
|
||||
|
||||
|
||||
|
@ -583,7 +583,7 @@
|
|||
pfr_lookup_bitmap_data( stream->cursor,
|
||||
stream->limit,
|
||||
strike->num_bitmaps,
|
||||
strike->flags,
|
||||
(FT_Byte) strike->flags,
|
||||
character->char_code,
|
||||
&gps_offset,
|
||||
&gps_size );
|
||||
|
@ -624,7 +624,7 @@
|
|||
if ( !error )
|
||||
{
|
||||
glyph->root.format = FT_GLYPH_FORMAT_BITMAP;
|
||||
|
||||
|
||||
/* Set up glyph bitmap and metrics */
|
||||
glyph->root.bitmap.width = (FT_Int)xsize;
|
||||
glyph->root.bitmap.rows = (FT_Int)ysize;
|
||||
|
@ -645,11 +645,10 @@
|
|||
|
||||
/* Allocate and read bitmap data */
|
||||
{
|
||||
FT_Memory memory = face->root.memory;
|
||||
FT_Long len = glyph->root.bitmap.pitch * ysize;
|
||||
FT_ULong len = glyph->root.bitmap.pitch * ysize;
|
||||
|
||||
|
||||
if ( !FT_ALLOC( glyph->root.bitmap.buffer, len ) )
|
||||
error = ft_glyphslot_alloc_bitmap( &glyph->root, len );
|
||||
if ( !error )
|
||||
{
|
||||
error = pfr_load_bitmap_bits( p,
|
||||
stream->limit,
|
||||
|
|
|
@ -230,11 +230,17 @@ FT_BEGIN_HEADER
|
|||
FT_BBox bbox;
|
||||
FT_UInt flags;
|
||||
FT_UInt standard_advance;
|
||||
|
||||
FT_Int ascent; /* optional, bbox.yMax if not present */
|
||||
FT_Int descent; /* optional, bbox.yMin if not present */
|
||||
FT_Int leading; /* optional, 0 if not present */
|
||||
|
||||
PFR_DimensionRec horizontal;
|
||||
PFR_DimensionRec vertical;
|
||||
|
||||
FT_String* font_id;
|
||||
FT_String* family_name;
|
||||
FT_String* style_name;
|
||||
|
||||
FT_UInt num_strikes;
|
||||
FT_UInt max_strikes;
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
|
||||
/* allocate new base block */
|
||||
if ( FT_ALLOC( table->block, new_size ) )
|
||||
{
|
||||
table->block = old_base;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* copy elements and shift offsets */
|
||||
if (old_base )
|
||||
|
|
|
@ -332,6 +332,7 @@
|
|||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
#if 1
|
||||
static FT_Pos
|
||||
psh3_dimension_quantize_len( PSH_Dimension dim,
|
||||
FT_Pos len,
|
||||
|
@ -380,6 +381,7 @@
|
|||
|
||||
return len;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
#ifdef DEBUG_HINTER
|
||||
|
@ -456,7 +458,9 @@
|
|||
return;
|
||||
}
|
||||
|
||||
/* perform stem snapping when requested */
|
||||
/* perform stem snapping when requested - this is necessary
|
||||
* for monochrome and LCD hinting modes only
|
||||
*/
|
||||
do_snapping = ( dimension == 0 && glyph->do_horz_snapping ) ||
|
||||
( dimension == 1 && glyph->do_vert_snapping );
|
||||
|
||||
|
@ -516,17 +520,29 @@
|
|||
hint->cur_pos = pos;
|
||||
hint->cur_len = fit_len;
|
||||
|
||||
if ( len <= 64 )
|
||||
/* stem adjustment tries to snap stem widths to standard
|
||||
* ones. this is important to prevent unpleasant rounding
|
||||
* artefacts...
|
||||
*/
|
||||
if ( glyph->do_stem_adjust )
|
||||
{
|
||||
/* the stem is less than one pixel, we will center it */
|
||||
/* around the nearest pixel center */
|
||||
/* */
|
||||
pos = ( pos + ( (len >> 1) & -64 ) );
|
||||
len = 64;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = psh3_dimension_quantize_len( dim, len, 0 );
|
||||
if ( len <= 64 )
|
||||
{
|
||||
/* the stem is less than one pixel, we will center it
|
||||
* around the nearest pixel center
|
||||
*/
|
||||
#if 1
|
||||
pos = ( pos + (len >> 1) ) & -64;
|
||||
#else
|
||||
/* this seems to be a bug !! */
|
||||
pos = ( pos + ( (len >> 1) & -64 ) );
|
||||
#endif
|
||||
len = 64;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = psh3_dimension_quantize_len( dim, len, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
/* now that we have a good hinted stem width, try to position */
|
||||
|
@ -584,6 +600,189 @@
|
|||
}
|
||||
|
||||
|
||||
#if 0 /* not used for now, experimental */
|
||||
|
||||
/*
|
||||
* A variant to perform "light" hinting (i.e. FT_RENDER_MODE_LIGHT)
|
||||
* of stems
|
||||
*/
|
||||
static void
|
||||
psh3_hint_align_light( PSH3_Hint hint,
|
||||
PSH_Globals globals,
|
||||
FT_Int dimension,
|
||||
PSH3_Glyph glyph )
|
||||
{
|
||||
PSH_Dimension dim = &globals->dimension[dimension];
|
||||
FT_Fixed scale = dim->scale_mult;
|
||||
FT_Fixed delta = dim->scale_delta;
|
||||
|
||||
|
||||
if ( !psh3_hint_is_fitted(hint) )
|
||||
{
|
||||
FT_Pos pos = FT_MulFix( hint->org_pos, scale ) + delta;
|
||||
FT_Pos len = FT_MulFix( hint->org_len, scale );
|
||||
|
||||
FT_Pos fit_len;
|
||||
|
||||
PSH_AlignmentRec align;
|
||||
|
||||
/* ignore stem alignments when requested through the hint flags */
|
||||
if ( ( dimension == 0 && !glyph->do_horz_hints ) ||
|
||||
( dimension == 1 && !glyph->do_vert_hints ) )
|
||||
{
|
||||
hint->cur_pos = pos;
|
||||
hint->cur_len = len;
|
||||
|
||||
psh3_hint_set_fitted( hint );
|
||||
return;
|
||||
}
|
||||
|
||||
fit_len = len;
|
||||
|
||||
hint->cur_len = fit_len;
|
||||
|
||||
/* check blue zones for horizontal stems */
|
||||
align.align = PSH_BLUE_ALIGN_NONE;
|
||||
align.align_bot = align.align_top = 0;
|
||||
|
||||
if ( dimension == 1 )
|
||||
psh_blues_snap_stem( &globals->blues,
|
||||
hint->org_pos + hint->org_len,
|
||||
hint->org_pos,
|
||||
&align );
|
||||
|
||||
switch ( align.align )
|
||||
{
|
||||
case PSH_BLUE_ALIGN_TOP:
|
||||
/* the top of the stem is aligned against a blue zone */
|
||||
hint->cur_pos = align.align_top - fit_len;
|
||||
break;
|
||||
|
||||
case PSH_BLUE_ALIGN_BOT:
|
||||
/* the bottom of the stem is aligned against a blue zone */
|
||||
hint->cur_pos = align.align_bot;
|
||||
break;
|
||||
|
||||
case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:
|
||||
/* both edges of the stem are aligned against blue zones */
|
||||
hint->cur_pos = align.align_bot;
|
||||
hint->cur_len = align.align_top - align.align_bot;
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
PSH3_Hint parent = hint->parent;
|
||||
|
||||
|
||||
if ( parent )
|
||||
{
|
||||
FT_Pos par_org_center, par_cur_center;
|
||||
FT_Pos cur_org_center, cur_delta;
|
||||
|
||||
|
||||
/* ensure that parent is already fitted */
|
||||
if ( !psh3_hint_is_fitted( parent ) )
|
||||
psh3_hint_align_light( parent, globals, dimension, glyph );
|
||||
|
||||
par_org_center = parent->org_pos + ( parent->org_len / 2);
|
||||
par_cur_center = parent->cur_pos + ( parent->cur_len / 2);
|
||||
cur_org_center = hint->org_pos + ( hint->org_len / 2);
|
||||
|
||||
cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );
|
||||
pos = par_cur_center + cur_delta - ( len >> 1 );
|
||||
}
|
||||
|
||||
/* Stems less than one pixel wide are easy - we want to
|
||||
* make them as dark as possible, so they must fall within
|
||||
* one pixel. If the stem is split between two pixels
|
||||
* then snap the edge that is nearer to the pixel boundary
|
||||
* to the pixel boundary
|
||||
*/
|
||||
if (len <= 64)
|
||||
{
|
||||
if ( ( pos + len + 63 ) / 64 != pos / 64 + 1 )
|
||||
pos += psh3_hint_snap_stem_side_delta ( pos, len );
|
||||
}
|
||||
/* Position stems other to minimize the amount of mid-grays.
|
||||
* There are, in general, two positions that do this,
|
||||
* illustrated as A) and B) below.
|
||||
*
|
||||
* + + + +
|
||||
*
|
||||
* A) |--------------------------------|
|
||||
* B) |--------------------------------|
|
||||
* C) |--------------------------------|
|
||||
*
|
||||
* Position A) (split the excess stem equally) should be better
|
||||
* for stems of width N + f where f < 0.5
|
||||
*
|
||||
* Position B) (split the deficiency equally) should be better
|
||||
* for stems of width N + f where f > 0.5
|
||||
*
|
||||
* It turns out though that minimizing the total number of lit
|
||||
* pixels is also important, so position C), with one edge
|
||||
* aligned with a pixel boundary is actually preferable
|
||||
* to A). There are also more possibile positions for C) than
|
||||
* for A) or B), so it involves less distortion of the overall
|
||||
* character shape.
|
||||
*/
|
||||
else /* len > 64 */
|
||||
{
|
||||
FT_Fixed frac_len = len & 63;
|
||||
FT_Fixed center = pos + ( len >> 1 );
|
||||
FT_Fixed delta_a, delta_b;
|
||||
|
||||
if ( ( len / 64 ) & 1 )
|
||||
{
|
||||
delta_a = ( center & -64 ) + 32 - center;
|
||||
delta_b = ( ( center + 32 ) & - 64 ) - center;
|
||||
}
|
||||
else
|
||||
{
|
||||
delta_a = ( ( center + 32 ) & - 64 ) - center;
|
||||
delta_b = ( center & -64 ) + 32 - center;
|
||||
}
|
||||
|
||||
/* We choose between B) and C) above based on the amount
|
||||
* of fractinal stem width; for small amounts, choose
|
||||
* C) always, for large amounts, B) always, and inbetween,
|
||||
* pick whichever one involves less stem movement.
|
||||
*/
|
||||
if (frac_len < 32)
|
||||
{
|
||||
pos += psh3_hint_snap_stem_side_delta ( pos, len );
|
||||
}
|
||||
else if (frac_len < 48)
|
||||
{
|
||||
FT_Fixed side_delta = psh3_hint_snap_stem_side_delta ( pos, len );
|
||||
|
||||
if ( ABS( side_delta ) < ABS( delta_b ) )
|
||||
pos += side_delta;
|
||||
else
|
||||
pos += delta_b;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos += delta_b;
|
||||
}
|
||||
}
|
||||
|
||||
hint->cur_pos = pos;
|
||||
}
|
||||
} /* switch */
|
||||
|
||||
psh3_hint_set_fitted( hint );
|
||||
|
||||
#ifdef DEBUG_HINTER
|
||||
if ( ps3_debug_hint_func )
|
||||
ps3_debug_hint_func( hint, dimension );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
static void
|
||||
psh3_hint_table_align_hints( PSH3_Hint_Table table,
|
||||
PSH_Globals globals,
|
||||
|
@ -1720,6 +1919,8 @@
|
|||
glyph->do_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||
|
||||
hint_mode == FT_RENDER_MODE_LCD_V );
|
||||
|
||||
glyph->do_stem_adjust = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );
|
||||
|
||||
for ( dimension = 0; dimension < 2; dimension++ )
|
||||
{
|
||||
/* load outline coordinates into glyph */
|
||||
|
|
|
@ -221,6 +221,7 @@ FT_BEGIN_HEADER
|
|||
FT_Bool do_vert_hints;
|
||||
FT_Bool do_horz_snapping;
|
||||
FT_Bool do_vert_snapping;
|
||||
FT_Bool do_stem_adjust;
|
||||
|
||||
} PSH3_GlyphRec, *PSH3_Glyph;
|
||||
|
||||
|
|
|
@ -228,6 +228,9 @@
|
|||
if ( ft_strcmp( module_interface, "get_sfnt" ) == 0 )
|
||||
return (FT_Module_Interface)get_sfnt_table;
|
||||
|
||||
if ( ft_strcmp( module_interface, "load_sfnt" ) == 0 )
|
||||
return (FT_Module_Interface)tt_face_load_any;
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
if ( ft_strcmp( module_interface, "glyph_name" ) == 0 )
|
||||
return (FT_Module_Interface)get_sfnt_glyph_name;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue