From e4b32a5dc5517285dbecf9e058185a9d36712fbe Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 31 Oct 2000 20:42:18 +0000 Subject: [PATCH] Removing trailing whitespace. --- CHANGES | 90 ++++++++--------- INSTALL | 17 ++-- builds/compiler/unix-lcc.mk | 4 +- builds/compiler/win-lcc.mk | 4 +- builds/cygwin/configure.in | 2 +- builds/cygwin/cygwin.mk | 6 +- builds/cygwin/detect.mk | 2 +- builds/cygwin/ftsystem.c | 14 +-- builds/dos/detect.mk | 2 +- builds/dos/dos-def.mk | 6 +- builds/link_dos.mk | 6 +- builds/link_std.mk | 6 +- builds/os2/os2-def.mk | 6 +- builds/os2/os2-dev.mk | 4 +- builds/os2/os2-gcc.mk | 4 +- builds/toplevel.mk | 4 +- builds/unix/configure.in | 2 +- builds/unix/ftsystem.c | 14 +-- builds/unix/unix.mk | 8 +- builds/win32/detect.mk | 2 +- builds/win32/win32-def.mk | 2 +- docs/BUILD | 14 +-- docs/convntns.txt | 20 ++-- docs/design/design-1.html | 2 +- docs/design/design-2.html | 4 +- docs/design/design-3.html | 6 +- docs/design/design-4.html | 10 +- docs/design/design-5.html | 4 +- docs/design/modules.html | 2 +- docs/docmaker.py | 138 +++++++++++++-------------- docs/freetype2.html | 42 ++++---- docs/ft2faq.html | 16 ++-- docs/glnames.py | 26 ++--- docs/tutorial/step1.html | 2 +- docs/tutorial/step2.html | 2 +- include/freetype/cache/ftcchunk.h | 4 +- include/freetype/cache/ftcsbits.h | 6 +- include/freetype/cache/ftlru.h | 24 ++--- include/freetype/ftcache.h | 2 +- include/freetype/internal/autohint.h | 2 +- include/freetype/internal/ftobjs.h | 28 +++--- include/freetype/internal/ftstream.h | 6 +- include/freetype/internal/psaux.h | 50 +++++----- include/freetype/internal/psnames.h | 2 +- include/freetype/internal/sfnt.h | 2 +- include/freetype/internal/t1types.h | 4 +- include/freetype/internal/t2types.h | 28 +++--- include/freetype/internal/tttypes.h | 10 +- src/autohint/CatharonLicense.txt | 2 +- src/autohint/ahglyph.c | 10 +- src/autohint/ahhint.c | 2 +- src/autohint/ahoptim.c | 2 +- src/autohint/mather.py | 14 +-- src/autohint/module.mk | 2 +- src/base/ftcalc.c | 4 +- src/base/ftglyph.c | 2 +- src/base/ftinit.c | 2 +- src/base/ftnames.c | 16 ++-- src/base/ftsynth.c | 18 ++-- src/cache/ftcchunk.c | 8 +- src/cache/ftcglyph.c | 12 +-- src/cache/ftcimage.c | 4 +- src/cache/ftcmanag.c | 4 +- src/cache/ftcsbits.c | 22 ++--- src/cache/ftlru.c | 64 ++++++------- src/cff/module.mk | 2 +- src/cid/cidgload.c | 6 +- src/cid/cidload.c | 4 +- src/cid/cidobjs.c | 2 +- src/cid/cidparse.c | 2 +- src/psaux/psauxmod.c | 6 +- src/psaux/psobjs.c | 8 +- src/psaux/psobjs.h | 18 ++-- src/psaux/t1decode.c | 16 ++-- src/sfnt/sfdriver.c | 10 +- src/sfnt/sfobjs.c | 10 +- src/truetype/ttdriver.c | 2 +- src/truetype/ttgload.c | 4 +- src/type1/t1driver.c | 8 +- src/type1/t1gload.c | 10 +- src/type1/t1load.c | 22 ++--- src/type1/t1objs.c | 2 +- src/type1/t1parse.c | 4 +- src/winfonts/winfnt.c | 4 +- 84 files changed, 494 insertions(+), 495 deletions(-) diff --git a/CHANGES b/CHANGES index 23980f9bb..7c288398e 100644 --- a/CHANGES +++ b/CHANGES @@ -28,7 +28,7 @@ LATEST CHANGES - fixed two memory leaks: - the memory manager (16 bytes) isn't released in FT_Done_FreeType !! - + - using custom input streams, the copy of the original stream was never released @@ -42,14 +42,14 @@ LATEST CHANGES BETA-8 (RELEASE CANDIDATE) CHANGES - deactivated the trueType bytecode interpreter by default - + - deactivated the "src/type1" font driver. Now "src/type1z" is used by default.. - updates to the build system. We now compile the library correctly under Unix system through "configure" which is automatically called on the first "make" invocation. - + - added the auto-hinting module !!. Fixing some bugs here and there.. - found some bugs in the composite loader (seac) of the Type1-based @@ -59,7 +59,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES updated all relevant files.. - found a memory leak in the "type1" driver - + - incorporated Tom's patches to support flex operators correctly in OpenType/CFF fonts.. Now all I need is to support pure CFF and CEF fonts to be done with this driver.. :-) @@ -67,24 +67,24 @@ BETA-8 (RELEASE CANDIDATE) CHANGES - added the Windows FNT/FON driver in "src/winfonts". For now, it always "simulates" a Unicode charmap, so it shouldn't be considered completed right now.. - + It's there to be more a proof of concept than anything else anyway. The driver is a single C source file, that compiles to 3 Kb of code.. - + I'm still working on the PCF/BDF drivers.. but I'm too lazy to finish them now.. - CHANGES TO THE HIGH-LEVEL API - + o FT_Get_Kerning has a new parameter that allows you to select the coordinates of the kerning vector ( font units, scaled, scaled + grid-fitted ). - + o the outline functions are now in and not part of anymore - + o now contains declarations for FT_New_Library, FT_Done_Library, FT_Add_Default_Modules @@ -96,9 +96,9 @@ BETA-8 (RELEASE CANDIDATE) CHANGES (i.e. corresponds to render_mode == 0 == ft_render_mode_normal). To generate a monochrome bitmap, use ft_render_mode_mono, or the FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char. - + FT_LOAD_ANTI_ALIAS is still defined, but values to 0. - + o now include , solving a few headaches :-) @@ -107,7 +107,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES - CHANGES TO THE "ftglyph.h" API - + This API has been severely modified in order to make it simpler, clearer, and more efficient. It certainly now looks like a real "glyph factory" object, and allows client applications to manage @@ -121,59 +121,59 @@ BETA-8 (RELEASE CANDIDATE) CHANGES - cleaned up source code in order to avoid two functions with the same name. Also changed the names of the files in "type1z" from "t1XXXX" to "z1XXXX" in order to avoid any conflicts. - + "make multi" now works well :-) - + Also removed the use of "cidafm" for now, even if the source files are still there. This functionality will certainly go into a specific module.. - - ADDED SUPPORT FOR THE AUTO-HINTER - + - ADDED SUPPORT FOR THE AUTO-HINTER + It works :-) I have a demo program which simply is a copy of "ftview" that does a FT_Add_Module( library, &autohinter_module_class ) after library initialisation, and Type 1 & OpenType/CFF fonts are now hinted. - + CID fonts are not hinted, as they include no charmap and the auto-hinter doesn't include "generic" global metrics computations yet.. - + Now, I need to release this thing to the FreeType 2 source.. - - + + - CHANGES TO THE RENDERER MODULES - + the monochrome and smooth renderers are now in two distinct directories, namely "src/raster1" and "src/smooth". Note that the old "src/renderer" is now gone.. - + I ditched the 5-gray-levels renderers. Basically, it involved a simple #define toggle in 'src/raster1/ftraster.c' - + FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select the best renderer available, depending on render mode. If the current renderer for a given glyph image format isn't capable of supporting the render mode, another one will be found in the library's list. - + This means that client applications do not need to switch or set the renderers themselves (as in the latest change), they'll get what they want automatically... At last.. - + Changed the demo programs accordingly.. - - + + - MAJOR INTERNAL REDESIGN: - + A lot of internal modifications have been performed lately on the source in order to provide the following enhancements: - + - more generic module support: - + The FT_Module type is now defined to represent a handle to a given module. The file contains the FT_Module_Class definition, as well as the module-loading public API @@ -187,10 +187,10 @@ BETA-8 (RELEASE CANDIDATE) CHANGES The FT_Renderer type is a pointer to a module used to perform various operations on glyph image. - + Each renderer is capable of handling images in a single format (e.g. ft_glyph_format_outline). Its functions are used to: - + - transform an glyph image - render a glyph image into a bitmap - return the control box (dimensions) of a given glyph image @@ -199,16 +199,16 @@ BETA-8 (RELEASE CANDIDATE) CHANGES The scan converters "ftraster.c" and "ftgrays.c" have been moved to the new directory "src/renderer", and are used to provide two default renderer modules. - + One corresponds to the "standard" scan-converter, the other to the "smooth" one. - + The current renderer can be set through the new function FT_Set_Renderer. - + The old raster-related function FT_Set_Raster, FT_Get_Raster and FT_Set_Raster_Mode have now disappeared, in favor of the new: - + FT_Get_Renderer FT_Set_Renderer @@ -223,7 +223,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES A new internal object, called a 'glyph loader' has been introduced in the base layer. It is used by all scalable format font drivers to load glyphs and composites. - + This object has been created to reduce the code size of each driver, as each one of them basically re-implemented its functionality. @@ -236,20 +236,20 @@ BETA-8 (RELEASE CANDIDATE) CHANGES In order to support extended features (see below), the FT_GlyphSlot structure has a few new fields: - + linearHoriAdvance: this field gives the linearly scaled (i.e. scaled but unhinted) advance width for the glyph, expressed as a 16.16 fixed pixel value. This is useful to perform WYSIWYG text. - + linearVertAdvance: this field gives the linearly scaled advance height for the glyph (relevant in vertical glyph layouts only). This is useful to perform - WYSIWYG text. + WYSIWYG text. Note that the two above field replace the removed "metrics2" field in the glyph slot. - + advance: this field is a vector that gives the transformed advance for the glyph. By default, it corresponds to the advance width, unless FT_LOAD_VERTICAL_LAYOUT @@ -261,7 +261,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES when the "format" field is set to "ft_glyph_format_bitmap", for example, after calling the new function FT_Render_Glyph. - + bitmap_top: this field gives the distance in integer pixels from the current pen position (located on the baseline) to the top-most pixel of the glyph image WHEN IT IS A @@ -275,7 +275,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES Most of the functionality found in has been moved to the core library. Hence, the following: - + - a transform can be specified for a face through FT_Set_Transform. this transform is applied by FT_Load_Glyph to scalable glyph images (i.e. NOT TO BITMAPS) before the function returns, unless the @@ -307,7 +307,7 @@ OLD CHANGES FOR BETA 7 - bug-fixed the OpenType/CFF parser. It now loads and displays my two fonts nicely, but I'm pretty certain that more testing is needed :-) - + - fixed the crummy Type 1 hinter, it now handles accented characters correctly (well, the accent is not always well placed, but that's another problem..) @@ -338,7 +338,7 @@ OLD CHANGES FOR BETA 7 - added support for Multiple Master fonts in "type1z". There is also a new file named which defines functions to manage them from client applications. - + The new file "src/base/ftmm.c" is also optional to the engine.. - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) + diff --git a/INSTALL b/INSTALL index cc7bcba55..3890bd13a 100644 --- a/INSTALL +++ b/INSTALL @@ -11,7 +11,7 @@ directory. Quick starter: go to "freetype2-beta8", then: Unix (+GNU Make): - + - make (don't worry, this will invoke a configure script) - make @@ -22,21 +22,20 @@ directory. Quick starter: go to "freetype2-beta8", then: - make - Windows + gcc + GNU Make: - + Windows + gcc + GNU Make: + - make - make Windows + Visual C++ + GNU Make: - make setup visualc - - make - + - make + Windows + Win32-LCC + GNU Make: - + - make setup lcc - make - - etc... - + + etc... diff --git a/builds/compiler/unix-lcc.mk b/builds/compiler/unix-lcc.mk index e1a925f2b..27394fc76 100644 --- a/builds/compiler/unix-lcc.mk +++ b/builds/compiler/unix-lcc.mk @@ -70,7 +70,7 @@ endif # # LCC is pure ANSI anyway! # -# the "-A" flag simply increments verbosity about non ANSI code +# the "-A" flag simply increments verbosity about non ANSI code # ANSIFLAGS := -A @@ -82,5 +82,5 @@ ifndef CLEAN_LIBRARY $(NO_OUTPUT) endif LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST) - + # EOF diff --git a/builds/compiler/win-lcc.mk b/builds/compiler/win-lcc.mk index 677268633..6e9512ae5 100644 --- a/builds/compiler/win-lcc.mk +++ b/builds/compiler/win-lcc.mk @@ -75,7 +75,7 @@ ANSIFLAGS := # library linking # -#CLEAN_LIBRARY := +#CLEAN_LIBRARY := LINK_LIBRARY = lcclib /out:$(subst $(SEP),\\,$@) $(subst $(SEP),\\,$(OBJECTS_LIST)) - + # EOF diff --git a/builds/cygwin/configure.in b/builds/cygwin/configure.in index 33af2209a..8c1c7ef76 100644 --- a/builds/cygwin/configure.in +++ b/builds/cygwin/configure.in @@ -79,7 +79,7 @@ AC_CHECK_FUNCS(memcpy memmove) AM_PROG_LIBTOOL -dnl create the CygWin-specific sub-Makefile `builds/cygwin/cygwin-def.mk' +dnl create the CygWin-specific sub-Makefile `builds/cygwin/cygwin-def.mk' dnl and 'builds/cygwin/cygwin-cc.mk' that will be used by the build system dnl AC_OUTPUT(cygwin-cc.mk:cygwin-cc.in cygwin-def.mk:cygwin-def.in) diff --git a/builds/cygwin/cygwin.mk b/builds/cygwin/cygwin.mk index 916d12df5..19178465a 100644 --- a/builds/cygwin/cygwin.mk +++ b/builds/cygwin/cygwin.mk @@ -30,13 +30,13 @@ ifdef BUILD_PROJECT distclean_project: distclean_project_cygwin - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # this is compiler-specific # $(PROJECT_LIBRARY): $(OBJECTS_LIST) - ifdef CLEAN_LIBRARY + ifdef CLEAN_LIBRARY -$(CLEAN_LIBRARY) $(NO_OUTPUT) - endif + endif $(LINK_LIBRARY) endif diff --git a/builds/cygwin/detect.mk b/builds/cygwin/detect.mk index 34a82a5cf..e27c3bfe1 100644 --- a/builds/cygwin/detect.mk +++ b/builds/cygwin/detect.mk @@ -20,7 +20,7 @@ ifeq ($(PLATFORM),ansi) # work... # ifeq ($(OS),Windows_NT) - + # Check if we are running on a CygWin system by checking the OSTYPE # variable. ifeq ($(OSTYPE),cygwin) diff --git a/builds/cygwin/ftsystem.c b/builds/cygwin/ftsystem.c index 570afa1dc..ded434240 100644 --- a/builds/cygwin/ftsystem.c +++ b/builds/cygwin/ftsystem.c @@ -194,7 +194,7 @@ void ft_close_stream( FT_Stream stream ) { munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size ); - + stream->descriptor.pointer = NULL; stream->size = 0; stream->base = 0; @@ -243,7 +243,7 @@ FT_ERROR(( " could not `fstat' file `%s'\n", filepathname )); goto Fail_Map; } - + stream->size = stat_buf.st_size; stream->pos = 0; stream->base = (unsigned char *)mmap( NULL, @@ -264,23 +264,23 @@ stream->descriptor.pointer = stream->base; stream->pathname.pointer = (char*)filepathname; - + stream->close = ft_close_stream; stream->read = 0; - + FT_TRACE1(( "FT_New_Stream:" )); FT_TRACE1(( " opened `%s' (%d bytes) successfully\n", filepathname, stream->size )); return FT_Err_Ok; - + Fail_Map: close( file ); stream->base = NULL; stream->size = 0; stream->pos = 0; - + return FT_Err_Cannot_Open_Stream; } @@ -299,7 +299,7 @@ FT_EXPORT_FUNC( FT_Memory ) FT_New_Memory( void ) { FT_Memory memory; - + memory = (FT_Memory)malloc( sizeof ( *memory ) ); if ( memory ) diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk index 377b7096a..3ce43f238 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -27,7 +27,7 @@ ifeq ($(PLATFORM),ansi) # ifneq ($(OSTYPE),cygwin) is_dos := $(findstring Dos,$(shell ver)) - + # We try to recognize a Dos session under OS/2. The `ver' command # returns `Operating System/2 ...' there, so `is_dos' should be empty. # diff --git a/builds/dos/dos-def.mk b/builds/dos/dos-def.mk index 000bcd24a..16f4e0dea 100644 --- a/builds/dos/dos-def.mk +++ b/builds/dos/dos-def.mk @@ -52,7 +52,7 @@ LIBRARY := $(PROJECT) # The NO_OUTPUT macro is used to ignore the output of commands. -# +# NO_OUTPUT = &> nul @@ -68,11 +68,11 @@ ifdef BUILD_PROJECT clean_project: clean_project_dos distclean_project: distclean_project_dos - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # It is part of the system-specific sub-Makefile because not all # librarians accept a simple syntax like # - # librarian library_file {list of object files} + # librarian library_file {list of object files} # $(PROJECT_LIBRARY): $(OBJECTS_LIST) -$(CLEAN_LIBRARY) $(NO_OUTPUT) diff --git a/builds/link_dos.mk b/builds/link_dos.mk index ee6fe69f2..09dda0aca 100644 --- a/builds/link_dos.mk +++ b/builds/link_dos.mk @@ -25,13 +25,13 @@ ifdef BUILD_PROJECT clean_project: clean_project_dos distclean_project: distclean_project_dos - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # this is compiler-specific # $(PROJECT_LIBRARY): $(OBJECTS_LIST) -ifdef CLEAN_LIBRARY +ifdef CLEAN_LIBRARY -$(CLEAN_LIBRARY) $(NO_OUTPUT) -endif +endif $(LINK_LIBRARY) endif diff --git a/builds/link_std.mk b/builds/link_std.mk index d9fc9551f..53133c02c 100644 --- a/builds/link_std.mk +++ b/builds/link_std.mk @@ -25,13 +25,13 @@ ifdef BUILD_PROJECT clean_project: clean_project_std distclean_project: distclean_project_std - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # this is compiler-specific # $(PROJECT_LIBRARY): $(OBJECTS_LIST) -ifdef CLEAN_LIBRARY +ifdef CLEAN_LIBRARY -$(CLEAN_LIBRARY) $(NO_OUTPUT) -endif +endif $(LINK_LIBRARY) endif diff --git a/builds/os2/os2-def.mk b/builds/os2/os2-def.mk index 486b9783d..42f505dbd 100644 --- a/builds/os2/os2-def.mk +++ b/builds/os2/os2-def.mk @@ -52,7 +52,7 @@ LIBRARY := $(PROJECT) # The NO_OUTPUT macro is used to ignore the output of commands. -# +# NO_OUTPUT = 2> nul @@ -68,11 +68,11 @@ ifdef BUILD_LIBRARY clean_project: clean_project_dos distclean_project: distclean_project_dos - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # It is part of the system-specific sub-Makefile because not all # librarians accept a simple syntax like # - # librarian library_file {list of object files} + # librarian library_file {list of object files} # $(PROJECT_LIBRARY): $(OBJECTS_LIST) -$(CLEAN_LIBRARY) $(NO_OUTPUT) diff --git a/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk index 56a1f6f0b..cf1fbd2b3 100644 --- a/builds/os2/os2-dev.mk +++ b/builds/os2/os2-dev.mk @@ -124,11 +124,11 @@ ifdef BUILD_FREETYPE FT_LIBRARIAN := $(AR) -r - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # It is part of the system-specific sub-Makefile because not all # librarians accept a simple syntax like # - # librarian library_file {list of object files} + # librarian library_file {list of object files} # $(FT_LIBRARY): $(OBJECTS_LIST) -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul diff --git a/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk index 7e57b60ee..af47bd7e0 100644 --- a/builds/os2/os2-gcc.mk +++ b/builds/os2/os2-gcc.mk @@ -123,11 +123,11 @@ ifdef BUILD_FREETYPE FT_LIBRARIAN := $(AR) -r - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # It is part of the system-specific sub-Makefile because not all # librarians accept a simple syntax like # - # librarian library_file {list of object files} + # librarian library_file {list of object files} # $(FT_LIBRARY): $(OBJECTS_LIST) -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul diff --git a/builds/toplevel.mk b/builds/toplevel.mk index fc7461f76..58c0e1679 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -66,7 +66,7 @@ ifdef check_platform all: setup - ifdef USE_MODULES + ifdef USE_MODULES # If the module list $(MODULE_LIST) file is not present, generate it. # #modules: make_module_list setup @@ -74,7 +74,7 @@ ifdef check_platform include $(TOP)/builds/detect.mk - ifdef USE_MODULES + ifdef USE_MODULES include $(TOP)/builds/modules.mk ifeq ($(wildcard $(MODULE_LIST)),) diff --git a/builds/unix/configure.in b/builds/unix/configure.in index d6488e1fd..33b2f0873 100644 --- a/builds/unix/configure.in +++ b/builds/unix/configure.in @@ -79,7 +79,7 @@ AC_CHECK_FUNCS(memcpy memmove) AM_PROG_LIBTOOL -dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' +dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' dnl and 'builds/unix/unix-cc.mk' that will be used by the build system dnl AC_OUTPUT(unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in) diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 570afa1dc..ded434240 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -194,7 +194,7 @@ void ft_close_stream( FT_Stream stream ) { munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size ); - + stream->descriptor.pointer = NULL; stream->size = 0; stream->base = 0; @@ -243,7 +243,7 @@ FT_ERROR(( " could not `fstat' file `%s'\n", filepathname )); goto Fail_Map; } - + stream->size = stat_buf.st_size; stream->pos = 0; stream->base = (unsigned char *)mmap( NULL, @@ -264,23 +264,23 @@ stream->descriptor.pointer = stream->base; stream->pathname.pointer = (char*)filepathname; - + stream->close = ft_close_stream; stream->read = 0; - + FT_TRACE1(( "FT_New_Stream:" )); FT_TRACE1(( " opened `%s' (%d bytes) successfully\n", filepathname, stream->size )); return FT_Err_Ok; - + Fail_Map: close( file ); stream->base = NULL; stream->size = 0; stream->pos = 0; - + return FT_Err_Cannot_Open_Stream; } @@ -299,7 +299,7 @@ FT_EXPORT_FUNC( FT_Memory ) FT_New_Memory( void ) { FT_Memory memory; - + memory = (FT_Memory)malloc( sizeof ( *memory ) ); if ( memory ) diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk index f904548d5..027f3c96b 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -30,16 +30,16 @@ ifdef BUILD_PROJECT distclean_project: distclean_project_unix - # This final rule is used to link all object files into a single library. + # This final rule is used to link all object files into a single library. # It is part of the system-specific sub-Makefile because not all # librarians accept a simple syntax like # - # librarian library_file {list of object files} + # librarian library_file {list of object files} # $(PROJECT_LIBRARY): $(OBJECTS_LIST) -ifdef CLEAN_LIBRARY +ifdef CLEAN_LIBRARY -$(CLEAN_LIBRARY) $(NO_OUTPUT) -endif +endif $(LINK_LIBRARY) endif diff --git a/builds/win32/detect.mk b/builds/win32/detect.mk index 4ba0fbf87..81638a394 100644 --- a/builds/win32/detect.mk +++ b/builds/win32/detect.mk @@ -20,7 +20,7 @@ ifeq ($(PLATFORM),ansi) # work... # ifeq ($(OS),Windows_NT) - + # Check if we are running on a CygWin system by checking the OSTYPE # variable. ifneq ($(OSTYPE),cygwin) diff --git a/builds/win32/win32-def.mk b/builds/win32/win32-def.mk index d1ba5993f..eabd59fb3 100644 --- a/builds/win32/win32-def.mk +++ b/builds/win32/win32-def.mk @@ -55,7 +55,7 @@ LIBRARY := $(PROJECT) # The NO_OUTPUT macro is used to ignore the output of commands. -# +# NO_OUTPUT = 2> nul # EOF diff --git a/docs/BUILD b/docs/BUILD index 47daa9444..86b292157 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -32,7 +32,7 @@ I. QUICK COMMAND-LINE GUIDE 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 @@ -61,11 +61,11 @@ II. COMMAND-LINE COMPILATION Make sure that you are invoking GNU Make from the command line, by typing something like: - + make -v - + to display its version number. - + b. Invoke `make' Go to the root directory of FreeType 2, then simply invoke GNU @@ -248,16 +248,16 @@ IV. Support for flat-directory compilation Note that you still need to only compile the `wrapper' sources described above. Define the `FT_FLAT_COMPILE' macro when compiling. Here an example: - + 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 -DFT_FLAT_COMPILE -Ifreetype2/include ftsystem.c cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftinit.c cc -c -DFT_FLAT_COMPILE -Ifreetype2/include ftdebug.c diff --git a/docs/convntns.txt b/docs/convntns.txt index 6653c217f..327f438d6 100644 --- a/docs/convntns.txt +++ b/docs/convntns.txt @@ -102,7 +102,7 @@ points: `numberOfPoints' or `number_Of_Points' `IncredibleFunction' or `Incredible_Function' - + And finally, always put a capital letter after an underscore, except in variable labels that are all lowercase: @@ -191,7 +191,7 @@ points: PProfile next; /* next profile in same contour, used */ /* during drop-out control */ }; - + instead of struct TProfile_ @@ -207,7 +207,7 @@ points: PProfile next; /* next profile in same contour, used */ /* during drop-out control */ }; - + This comes from the fact that you are more interested in the field and its function than in its type. @@ -272,7 +272,7 @@ points: same column. It makes it easier to separate a block from the rest of the source, and it helps your _brain_ associate the accolades easily (ask any Lisp programmer on the topic!). - + Use two spaces for the next indentation level. Never use tabs in FreeType 2 code; their widths may vary with @@ -427,11 +427,11 @@ II. Design Conventions have thus decided to stick to the following restrictions: - The C version is written entirely in ANSI C. - + - The library, if compiled with gcc, doesn't produce any warning with the `-ansi -pedantic' flags. Other compilers with better checks may produce ANSI warnings -- please report. - + (NOTE: It can of course be compiled by an `average' C compiler, and even by a C++ one.) @@ -510,7 +510,7 @@ III. Usage conventions goto Fail; with - + #define PERFORM_Action_1( parms_1 ) \ ( error = Perform_Action_1( parms_1 ) ) #define PERFORM_Action_2( parms_1 ) \ @@ -525,7 +525,7 @@ III. Usage conventions actual error handling performed. Another advantage is that the structure of source files remain very similar, even though the error handling may be different. - + This convention is very close to the use of exceptions in languages like C++, Pascal, Java, etc. where the developer focuses on the actions to perform, and not on every little error @@ -546,7 +546,7 @@ III. Usage conventions and independence of a complete C library, it is possible to re-implement the component for a specific system or OS, letting it use system calls. - + b. Frames TrueType is tied to the big-endian format, which implies that @@ -686,4 +686,4 @@ III. Usage conventions access to it yourself with a simple mutex. ---- end of convntns.txt --- +--- end of convntns.txt --- diff --git a/docs/design/design-1.html b/docs/design/design-1.html index c2d1b7290..522d23aba 100644 --- a/docs/design/design-1.html +++ b/docs/design/design-1.html @@ -76,7 +76,7 @@
  • Customization. It should be easy to build a version of the - library that only contains the features needed by a specific project. + library that only contains the features needed by a specific project. This really is important when you need to integrate it in a font server for embedded graphics libraries.

  • diff --git a/docs/design/design-2.html b/docs/design/design-2.html index b8bcb8506..7270474e0 100644 --- a/docs/design/design-2.html +++ b/docs/design/design-2.html @@ -71,7 +71,7 @@
    • Some parts of the base layer can be replaced for specific builds of - the library, and can thus be considered as components themselves. + the library, and can thus be considered as components themselves. This is the case for the ftsystem component, which is in charge of implementing memory management & input stream access, as well as ftinit, which is in charge of library initialization @@ -119,7 +119,7 @@

      A replacable component can provide a function of the high-level API. For example, ftinit provides FT_Init_FreeType() to client applications.

      -
    • +
    diff --git a/docs/design/design-3.html b/docs/design/design-3.html index 0c1bbd1fc..bc57b17f1 100644 --- a/docs/design/design-3.html +++ b/docs/design/design-3.html @@ -37,7 +37,7 @@

    Though written in ANSI C, the library employs a few techniques, - inherited from object-oriented programming, to make it easy to extend. + inherited from object-oriented programming, to make it easy to extend. Hence, the following conventions apply in the FreeType 2 source code:

    @@ -152,7 +152,7 @@ specific typeface with a specific style. For example, "Arial" and "Arial Italic" correspond to two distinct faces.

    -

    A face object is normally created through FT_New_Face(). +

    A face object is normally created through FT_New_Face(). This function takes the following parameters: an FT_Library handle, a C file pathname used to indicate which font file to open, an index used to decide which face to load from the file (a single file may @@ -171,7 +171,7 @@ value.

    Note that the face object contains several fields used to describe - global font data that can be accessed directly by client applications. + global font data that can be accessed directly by client applications. For example, the total number of glyphs in the face, the face's family name, style name, the EM size for scalable formats, etc. For more details, look at the FT_FaceRec definition in the diff --git a/docs/design/design-4.html b/docs/design/design-4.html index f71cf07d0..4a3061819 100644 --- a/docs/design/design-4.html +++ b/docs/design/design-4.html @@ -92,19 +92,19 @@

    The function FT_New_Face() will always automatically create a new stream object from the C pathname given as its second argument. This is achieved by calling the function - FT_New_Stream() provided by the ftsystem component. + FT_New_Stream() provided by the ftsystem component. As the latter is replaceable, the implementation of streams may vary greatly between platforms.

    As an example, the default implementation of streams is located in the file src/base/ftsystem.c and uses the ANSI - fopen(), fseek(), and fread() calls. + fopen(), fseek(), and fread() calls. However, the Unix build of FreeType 2 provides an alternative implementation that uses memory-mapped files, when available on the host platform, resulting in a significant access speed-up.

    -

    FreeType distinguishes between memory-based and disk-based streams. - In the first case, all data is directly accessed in memory (e.g. +

    FreeType distinguishes between memory-based and disk-based streams. + In the first case, all data is directly accessed in memory (e.g. ROM-based, write-only static data and memory-mapped files), while in the second, portions of the font files are read in chunks called frames, and temporarily buffered similarly through typical @@ -222,7 +222,7 @@

    Note that every FT_Face object is owned by the - corresponding font driver, depending on the original font file's format. + corresponding font driver, depending on the original font file's format. This means that all face objects are destroyed when a module is removed/unregistered from a library instance (typically by calling the FT_Remove_Module() function).

    diff --git a/docs/design/design-5.html b/docs/design/design-5.html index 76634d277..b85badd8d 100644 --- a/docs/design/design-5.html +++ b/docs/design/design-5.html @@ -35,13 +35,13 @@
    • -

      Renderer modules are used to manage scalable glyph images. +

      Renderer modules are used to manage scalable glyph images. This means transforming them, computing their bounding box, and converting them to either monochrome or anti-aliased bitmaps.

      Note that FreeType 2 is capable of dealing with any - kind of glyph images, as long as a renderer module is provided for it. + kind of glyph images, as long as a renderer module is provided for it. The library comes by default with two renderers:

      diff --git a/docs/design/modules.html b/docs/design/modules.html index 118ddd4b3..fad6e6233 100644 --- a/docs/design/modules.html +++ b/docs/design/modules.html @@ -210,7 +210,7 @@ modules:

      well as other variants (like TrueType fonts that only contain embedded bitmaps).
      - + psnames used to provide various useful function related to glyph diff --git a/docs/docmaker.py b/docs/docmaker.py index dbfd8b75b..85b17f20d 100644 --- a/docs/docmaker.py +++ b/docs/docmaker.py @@ -157,8 +157,8 @@ class DocCode: def __init__( self, margin = 0 ): self.lines = [] - self.margin = margin - + self.margin = margin + def add( self, line ): # remove margin whitespace if string.strip( line[: self.margin] ) == "": @@ -176,7 +176,7 @@ class DocCode: return "UNKNOWN_CODE_IDENTIFIER!!" def dump_html( self ): - + # clean the last empty lines l = len( self.lines ) - 1 while l > 0 and string.strip( self.lines[l - 1] ) == "": @@ -199,7 +199,7 @@ class DocParagraph: def __init__( self ): self.words = [] - + def add( self, line ): # get rid of unwanted spaces in the paragraph # @@ -220,24 +220,24 @@ class DocParagraph: # should never happen return "UNKNOWN_PARA_IDENTIFIER!!" - - + + def dump( self ): max_width = 50 cursor = 0 line = "" - + for word in self.words: - + if cursor + len( word ) + 1 > max_width: print line cursor = 0 line = "" - + line = line + word + " " cursor = cursor + len( word ) + 1 - + if cursor > 0: print line @@ -245,7 +245,7 @@ class DocParagraph: def dump_html( self ): - + print para_header self.dump() print para_footer @@ -277,7 +277,7 @@ class DocParagraph: # [ ( None, [ DocParagraph, DocParagraph] ), # ( "x", [ DocParagraph ] ), # ( "y", [ DocParagraph, DocCode ] ) ] -# +# # in self.items # # the DocContent object is entirely built at creation time, you must @@ -293,14 +293,14 @@ class DocContent: text = [] paragraph = None # represents the current DocParagraph code = None # represents the current DocCode - + elements = [] # the list of elements for the current field, # contains DocParagraph or DocCode objects - + field = None # the current field for aline in lines_list: - + if code_mode == 0: line = string.lstrip( aline ) l = len( line ) @@ -309,26 +309,26 @@ class DocContent: # if the line is empty, this is the end of the current # paragraph if l == 0 or line == '{': - + if paragraph: elements.append( paragraph ) paragraph = None - + if line == "": continue - + code_mode = 1 code_margin = margin code = None continue - + words = string.split( line ) - + # test for a field delimiter on the start of the line, i.e. # the token `::' # if len( words ) >= 2 and words[1] == "::": - + # start a new field - complete current paragraph if any if paragraph: elements.append( paragraph ) @@ -336,47 +336,47 @@ class DocContent: # append previous "field" to self.items self.items.append( ( field, elements ) ) - + # start new field and elements list field = words[0] elements = [] words = words[2 :] - + # append remaining words to current paragraph if len( words ) > 0: line = string.join( words ) if not paragraph: paragraph = DocParagraph() paragraph.add( line ) - + else: # we're in code mode.. line = aline - + # the code block ends with a line that has a single '}' on it # that is located at the same column that the opening # accolade.. if line == " " * code_margin + '}': - + if code: elements.append( code ) code = None - + code_mode = 0 code_margin = 0 - + # otherwise, add the line to the current paragraph else: if not code: code = DocCode() code.add( line ) - + if paragraph: elements.append( paragraph ) if code: elements.append( code ) - + self.items.append( ( field, elements ) ) @@ -388,7 +388,7 @@ class DocContent: # should never happen return "UNKNOWN_CONTENT_IDENTIFIER!!" - + def dump( self ): for item in self.items: @@ -398,25 +398,25 @@ class DocContent: for element in item[1]: element.dump() - + if field: print " " def dump_html( self ): - + n = len( self.items ) in_table = 0 - + for i in range( n ): item = self.items[i] field = item[0] - + if not field: - + if in_table: print "
      " in_table = 0 - + for element in item[1]: element.dump_html() else: @@ -425,9 +425,9 @@ class DocContent: in_table = 1 else: print "" - + print "" + field + "" - + for element in item[1]: element.dump_html() @@ -459,19 +459,19 @@ class DocBlock: marker = None # current marker content = [] # current content lines list alphanum = string.letters + string.digits + "_" - + for line in block_line_list: line2 = string.lstrip( line ) l = len( line2 ) margin = len( line ) - l - + if l > 3: ender = None if line2[0] == '<': ender = '>' elif line2[0] == '@': ender = ':' - + if ender: i = 1 while i < l and line2[i] in alphanum: @@ -484,12 +484,12 @@ class DocBlock: line2 = string.lstrip( line2[i + 1 :] ) l = len( line2 ) line = " " * margin + line2 - + content.append( line ) - + if marker and content: self.add( marker, content ) - + self.source = [] if self.items: self.source = source_line_list @@ -512,14 +512,14 @@ class DocBlock: i = i + 1 lines = lines[i : l] l = len( lines ) - + # add a new marker only if its marker and its content list aren't empty if l > 0 and marker: content = DocContent(lines) self.items.append( ( string.lower(marker), content ) ) if not self.identifier: self.identifier = content.get_identifier() - + def dump( self ): @@ -529,22 +529,22 @@ class DocBlock: content.dump() def dump_html( self ): - + types = [ 'type', 'struct', 'functype', 'function', 'constant', 'enum', 'macro' ] if not self.items: return - + # start of a block print block_header - + print "

      " + self.identifier + "

      " # print source code if not self.source: return - + lines = self.source l = len( lines ) - 1 while l >= 0 and string.strip( lines[l] ) == "": @@ -556,7 +556,7 @@ class DocBlock: # dump each (marker,content) element for element in self.items: - + marker = element[0] content = element[1] @@ -564,13 +564,13 @@ class DocBlock: print "
        " content.dump_html() print "
      " - + elif not (marker in types): print "

      " + marker + "

      " print "
        " content.dump_html() print "
      " - + print "" print block_footer @@ -581,7 +581,7 @@ class DocBlock: # "type" (i.e. first marker) is in the "types" parameter # def filter_blocks( block_list, types ): - + new_list = [] for block in block_list: if block.items: @@ -601,7 +601,7 @@ def block_lexicographical_compare( b1, b2 ): return -1 if not b2.identifier: return 1 - + id1 = string.lower(b1.identifier) id2 = string.lower(b2.identifier) if id1 < id2: @@ -610,7 +610,7 @@ def block_lexicographical_compare( b1, b2 ): return 0 else: return 1 - + def block_make_list( source_block_list ): list = [] @@ -627,10 +627,10 @@ def block_make_list( source_block_list ): def dump_html_1( block_list ): print html_header - + for block in block_list: block.dump_html() - + print html_footer @@ -642,7 +642,7 @@ def make_block_list(): list = [] block = [] format = 0 - + # we use "format" to store the state of our parser: # # 0 - wait for beginning of comment @@ -652,7 +652,7 @@ def make_block_list(): # 4 - wait for beginning of source (or comment ??) # 5 - process source # - + comment = [] source = [] state = 0 @@ -666,7 +666,7 @@ def make_block_list(): # stripped version of the line line2 = string.strip( line ) l = len( line2 ) - + # if this line begins with a comment and we are processing some # source, exit to state 0 # @@ -718,7 +718,7 @@ def make_block_list(): if l == 0 or line2[0] != '*': block = [] format = 0 - + # otherwise, we test for an end of block, which is an # arbitrary number of '*', followed by '/' else: @@ -765,7 +765,7 @@ def make_block_list(): else: # otherwise, add the line to the current block block.append( line2 ) - + continue @@ -774,18 +774,18 @@ def make_block_list(): if l > 0: format = 5 - + if format == 5: source.append( line ) if format >= 4: list.append( [block, source] ) - + return list - + # This function is only used for debugging # def dump_block_list( list ): @@ -806,11 +806,11 @@ def main( argv ): sys.stderr.write( "extracting comment blocks from sources...\n" ) list = make_block_list() list = block_make_list(list) - + list2 = filter_blocks( list, ['type','macro','enum','constant', 'functype'] ) #list2 = list list2.sort( block_lexicographical_compare ) - + dump_html_1( list2 ) #dump_doc_blocks( list ) #dump_block_lists( list ) diff --git a/docs/freetype2.html b/docs/freetype2.html index 3cc94c971..dbac6b994 100644 --- a/docs/freetype2.html +++ b/docs/freetype2.html @@ -17,7 +17,7 @@ alink="#FF0000"> -http://www.freetype.org

      +http://www.freetype.org

      @@ -61,7 +61,7 @@ ubiquitous products.

      returns and manages outline font data (images & metrics).

    - +
  • Support for several font formats through loadable modules:

      @@ -71,8 +71,8 @@ ubiquitous products.

      the font.

  • - - + +
  • High-quality anti-aliasing:

      @@ -95,9 +95,9 @@ ubiquitous products.

      memory, compressed file, network, etc..).

    - + - +

    Note that the beta of FreeType 2 is available now. For more info, check our Download page or see the source and its diffs through our CVS Web interface. @@ -144,7 +144,7 @@ ubiquitous products.

    Apple. We're currently in contact with Apple to discuss the importance of such patents and their use in open source projects like FreeType.

    - +

    In the meantime, we have developped our own alternative technology that is capable of automatically hinting scalable glyph images. It is now part of the FreeType 2 source tree as the "autohint" module, @@ -166,12 +166,12 @@ ubiquitous products.

    only compile the features you need. As each module is between 10 and 20 Kb in size, it's possible to build a bare-bones font engine that supports anti-aliasing in about 30 Kb !!

    - +

    Configuration is performed by modifications of only two header files (one to select global features, another one to select modules) and don't need tweaking of source code. Note that it is however possible to provide your own implementation of certain components.

    - +

    For example, when building on Unix, the engine will automatically use memory-mapped files when available on the target platform, thus significantly increasing font file i/o.

    @@ -188,7 +188,7 @@ ubiquitous products.

    glyph images from font files. These images can be bitmaps, scalable bezier outlines or even anything else. (e.g. bi-color or metafont glyphs, as long as they're supported by a module).

    - +

    Each scalable glyph image can be transformed, measured and rendered into a monochrome or anti-aliased bitmaps easily through a uniform interface. @@ -205,10 +205,10 @@ ubiquitous products.

    The FreeType 2 API is useful to retrieve advanced information from various fonts:

    - +
    • vertical metrics are available whenever found in the font file
    • - +
    • kerning distances are available when found in the font file. It is also possible to "attach" a given additional file to a given font face. This is useful to load kerning distances from an @@ -216,7 +216,7 @@ ubiquitous products.

    • provides ASCII glyph names whenever available in the font (TrueType, OpenType, Type1, etc..)
    • - +
    • provides access to important tables for SFNT-based font formats (i.e. TrueType, OpenType, CEF, etc..), like the name table, font header, maximum profile, etc...
    • @@ -225,15 +225,15 @@ ubiquitous products.

      those fonts or formats that do not provide one. This is extremely useful with Type 1 fonts which are normally limited to a stupid 256-characters encoding. -
    + + -

    Simple & clean API

    The FreeType 2 high-level API is simple and straightforward, as it has been specifically designed to make the most commmon font operations easy

    - +

    As a comparison, the number of function calls needed to perform a the tasks of font face creation/opening and glyph loading/rendering has been reduced by a factor of 4 !!

    @@ -242,7 +242,7 @@ ubiquitous products.

    it provides standard extensions to access format-specific tables and information. More extensions can also be easily added through new modules

    - +

    Robust & Portable code

    @@ -257,7 +257,7 @@ ubiquitous products.

    a disk file, memory, or through a client-provided input stream. This allows to support compressed font files, remote fonts, fonts embedded in other streams (e.g. Type42 fonts), etc..

    - +

    An advanced i/o sub-system is used to optimise file access, as well as reduce memory usage of the library when the file is memory-based ( ROM, RAM, memory-mapped ).

    @@ -268,13 +268,13 @@ ubiquitous products.

    Finally, FreeType 2 is released under its own BSD-like open source license, one of the less restricting licenses available, and this means that:

    - +