home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
ft-beta.zip
/
freetype
/
lib
/
changes
next >
Wrap
Text File
|
1997-10-06
|
11KB
|
387 lines
Latest changes, DavidT : 22 Sep 97
- "freetype.h" doesn't include "extapi.h" anymore.If a client
application needs to use extension, it will have to include the
API extension header file itself
- renamed "extkern.h" to "ftxkern.h". And modified "ttkern.h" to
include it now
- various format changes within the engine.
- added "ttcommon.h" to automatically prefix all function names with
"FT" to avoid problems at link time
- renamed Alloc and Free to TT_Alloc and TT_Free to follow the convention
of all replaceable components
- did the same with the mutex functions, though they're still dummy
- added "const" to some parameter types in the high-level API
- NOTE : thread-safety still unsupported..
- major rewrite of some docs.. incomplete though
- new directory layouts.
Latest changes, DavidT : 8 Sep 97
- Added a user guide in the docs directory. Still incomplete..
ttraster.c
The scan-line converter is now re-entrant, though we'll probably
only use it in thread-safe mode (as each render pool is about 64Kb )
ttcmap.c
Replaces ttindex.c. The charmap are now loaded on demand.
The structure of the cmap tables has changed slightly
( one unuseful indirection level removed )
ttload.c
Changed the cmap loader to only load the table directory
in memory
ttapi.c
Changed the character mapping API slightly to allow
charmaps enumerations.
freetype.h
added an include to allow extensions
ttobjs.h
changed to include the new definitions from ttcmap.h
extend/api.h
High-Level API extension file. This file should include
all extended API definitions (here 'apikern.h')
extend/apikern.h
High-level API extension relative to kerning
extend/kern.h and kern.c
Kerning support. The tables are loaded on demand
extend/extend.h and extend.c
Generic extension management.
updated the makefiles, as well as view, lint and timer.
Still to do :
- zoom.c
- last fixes in the interpreter regarding rotated text
- documentation !!!
-------------------------------------------------------------------
Latest Changes, introduced by me, DavidT :
- New component layout (again) :
The changes are very similar to those already applied to the Pascal source
Here is a list of the source files and their role/meaning :
freetype.h (interface only)
high-level API and external interface. In a perfect world, the
only file that should be included by client applications. Note
however that the test programs currently include also "ttraster.h"
to access directly the scan-line converter, as well as "tterror.h"
for the 'Panic' function.
Changes :
- introduced the API. Please have a look at it.
- changed the types of handles from 'void*' to 'struct ..' for
much safer compiles and uses
ttapi.c (body only)
implements most of the functions defined in 'freetype.h'. Does
some minimal handle checking/conversions then calls the appropriate
functions.
ttcache.h/c (new component)
the generic cache component. A cache is used to track and recycle
all instances of a given object class. A cache can be protected by
a mutex for thread-enabled builds.
ttcalc.h/c
the 'math' component used by the engine. Note that I changed the
configuration macro used to enable 'long longs' with gcc from
'_GNUC_' to '_GNUC_LONG64_'. This is because long longs are not
ANSI and give various unpleasant warnings. Moreover, it really
doesn't seem to speed up operations, but makes a bigger executable.
That's why it isn't the default anymore..
ttconfig.h (interface only)
configuration header file. Untouched
ttdebug.h/c
the debugging component. This is used by both the debugger and
the interpreter when compiled with '-DDEBUG' (which then includes
an in-line text-mode simple debugger). Untouched
ttengine.h (interface only)
Engine-specific data root structure definition. This component
was designed with the idea of grouping all library global variables
in a unique structure, called the 'Engine_Instance'. It contains
several variables, as well as pointers to component-specific
structures, defined in other source files.
Note that all global variables have not been gathered in the engine
instance yet. For example, the scan-line converter still uses a big
set of those.
tterror.h/c
Error definitions. Added a few ones
ttfile.h/c
The ANSI libc file component. rewritten for the new stream
semantics introduced here.
ttfile2.h/c
The memory-mapping version of the file component, for Unix
systems. rewritten for the new stream semantics introduced
here
ttgload.h/c
The glyph loader is now a single component.
It is now _complete_ !! And CJK composites work too !
ttindex.h/c
The glyph index component. Changed some function names and
calling parameters to reflect the changes introduced there.
Also 'fixed' the Cmap0 table lookup.
ttinterp.h/c (previously known as 'ttins.h/c')
The TrueType instructions interpreter. Fixed a bug in the
super-rounding. Chngaed some code to reflect the new error
reporting scheme.
ttlists.h/c
The generic lists component. A simple component to handle
all kinds of singly-linked lists.
ttload.h/c
The TrueType tables loader. Contains the routines that are
needed to load a TrueType table in memory. It also contains
some destructors for delicate structures, like CharMaps or
Names.
IMPORTANT NOTE :
The new error scheme not interprets a 0 as SUCCESS, and another
value as an error code. The macros have been updated to collect
the error code in a local variable called 'error' of type 'TT_Error'
while the calls themselves have been touched to convert lines like
if ( !ACTION(..) )
...
into their now equivalent
if ( ACTION(..) )
...
which really translates into :
if ( (error = Action(..)) )
...
The error assignement has been included in the macros to make
the code more readable and maintanable, while still close to the
Pascal version.
ttmemory.h/c
The memory component. Introduced a very simple debugging package
Just compile ttmemory.c with the 'DEBUG' macro defined to activate
it. It will dump the list of allocation errors when closing the
engine..
ttmutex.h/c ( interface only for non threaded builds )
The generic mutex component. Defines some macros
ttobjs.h/c
This component defines the object managed by the engine, as well
as their behaviour. Each object has several methods, uncareful of
concurrency and coherency, following the naming convention :
Class_Action
e.g. Instance_Init, Instance_Reset, Face_Create, Context_Run,
etc ..
Each object class has one constructor and a destructor that are
used by the caches defined in this component.
There is a more high-level interface, which takes care of coherency
and concurrency, following a slightly different convention :
Action_Class
e.g. New_Instance, New_Context, Done_Instance, Done_Context,..
NOTE : All object classes are gathered in these files, while in
the Pascal source, each class has its own tiny source file.
ttraster.h/c
The scan-line converter. Now uses the types defined in 'freetype.h'
tttables.h (interface only)
This interface component includes the definition of all TrueType
tables, as defined per the specifications.
tttags.h (interface only)
This component includes the definition of the TrueType table tags
as defined per the specifications
tttypes.h (interface only)
Engine internal types definitions. Changed the SUCCESS/FAILURE
macro values to match the new error model.
What's working :
- view, timer and lint (zoom on its way) in both C and Pascal
- the Pascal debugger now works well. It has been very useful again :-)
- it seems that composites are now OK, even CJK ones. Could
someone check the 'carons', etc .., of many fonts.. They now
seem good to me, but I may be wrong..
What's still to do :
- real support for horizontal _and_ vertical device resolutions
( the vertical one is currently ignored, and the lib assumes
square pixels ).
- support for all kinds of transforms in the API as well as the
interpreter. ( Not much work, but needs a bit of thinking to do
things well ). This would allow rotated text for instance.
( these two points are really only one )
- We currently do not support the 'instruction control' flags
and not all of the 'scan control' ones in the interpreter. This
would typically deactivate hinting at sizes under 7 ppem or
over 2048 ppem
- I'm thinking on a way of allowing several extensions to the
engine more easily ( like adding new tables, like kerning, and
new APIs ). I'll mail you about it soon..
What i'd like you to do :
- TEST this thing on the maximum fonts you can. I have currently
tested on the following configs :
- OS/2 gcc-2.6.3
- Linux gcc-2.7.2 ( also with electric fence )
- eventually port zoom.c..
===========================================================================
Changes between this version and 05q
- integrated Werner's patch
- debugged the glyph loader and the ttcalc component
- added full font viewing to 'view' as well as scaling and gray-levels.
Now works well.. Try it !!
( Warning : locks up on certain fonts at very small sizes < 7 ).
- added a very simple debugger called 'fdebug'
see note below on interpreter compilation.
- added a simple debugger shell within the interpreter. Compiled only when
the DEBUG maco is defined ( required to compile fdebug )
- added a parameter to Load_TrueType_Glyph named 'allow_components'.
if TRUE, enables the loading of composite glyphs; if FALSE, the
load will always fail on composites.
( This was needed for the viewer, as composite glyphs hinting doesn't
work yet ).
Of course all test programs were modified to work well with these
changes, with the exception of 'timer' ( on the todo list.. )
- enjoy the viewer, it's really nice :-) !!
NOTE : There seem to be very, very, light differences with the Pascal
viewer in the rendered glyphs. I'll take a deeper look at that
problem with Pavel's debugger.
- DavidT