Commit Graph

293 Commits

Author SHA1 Message Date
David Turner f9b8dec437 major reformatting of the modules source code in order to get
rid of most of the basic types redefinitions (i.e. FT_Int instead
of "FT_Int", etc..)

The format-specific prefixs like "TT_", "T1_", "T2_" & 'CID_"
are now only used in relevant structures..

fixed Werner's fix to t2gload.c :-)
other small bug fixes
2000-06-16 19:34:52 +00:00
Werner Lemberg e3c11d7f00 A new round of formatting, adding/fixing documentation etc. 2000-06-16 06:49:56 +00:00
Werner Lemberg 67d301f305 Fixed the PACK() macro. 2000-06-14 04:13:59 +00:00
Werner Lemberg 78575dc0d1 A lot of formatting.
Added more tracing levels.

More Makefile fixes.

Minor other changes.
2000-06-12 19:36:41 +00:00
Werner Lemberg e35cac66c6 A complete revision of FreeType 2's GNU makefiles (of the library):
Tons of unnecessary stuff have been removed; only the essential rules
  have been retained.

  The source files now depend on all header files in include/freetype,
  include/freetype/config, and include/freetype/internal.  This is not
  optimal, I know, and I'll try to improve this, but it is better than
  before (namely no dependencies on `internal').

  FTDEBUG_SRC has been added (similar to FTSYS_SRC) -- I don't know
  exactly whether this is really useful, but it doesn't harm.

  There is now more documentation in the makefiles itself.

io-frames.html: Use of <th>, <code>, and <var> for better tagging.

Reactivating of FT_DEBUG_LEVEL_xxx macros.

Added a lot of #include directives to make `multi' builds possible -- note
that currently the modules cid, t1, and t1z have clashing structures and
functions which means that you can only use one of these three modules for a
multi build.

Added some missing function declarations to (local) header files.

Renamed some T1_Open_Face() to CID_Open_Face() in the cid module -- a lot
of other functions should be renamed also...

Replaced many FT_xxx stuff with T1_xxx in t1z driver -- this isn't finished
yet...

Fixed FT_Free() to allow a NULL pointer without an assertion (this has
always been a valid assumption in FreeType, at least in FT 1.x).

A lot of other, minor fixes (mostly documentation).
2000-06-11 03:46:57 +00:00
Werner Lemberg 61bd4b9dd1 Added FT_FRAME_SKIP_xxx to skip fields.
More use of READ_Fields() in ttsbit.c

Other minor fixes.
2000-06-07 00:00:08 +00:00
Werner Lemberg 1c0d4acb25 Fine-tuned a lot of tracing levels to make them more functional with ftview.
Added a lot of \n to tracing messages.

Fixed a serious bug in loading SBit offsets (missing parentheses around a
xxx ? yyy : zzz construct).

Replaced most GET_xxx() functions with calls to READ_Frame() in ttsbit.c
2000-06-06 20:41:48 +00:00
Werner Lemberg 4e6dd8587e freetype.h: Adding ft_encoding_xxx values for some CJK encodings.
Fixing copyright notice on many files.

Changed some tracing levels.

A lot of formatting, fixing documentation etc. as usual.
2000-06-05 05:26:15 +00:00
Werner Lemberg 5617726108 ftview now has two new options: -d activates debugging, and -l sets the
trace level.

Since FT2 is still beta, I've activated the FT_DEBUG_xxx macros by default.

To make reasonable output, I've changed some TRACEx macros to other levels.
2000-06-03 21:59:44 +00:00
Werner Lemberg eb81e37825 More preparation for tracing. Formatting. 2000-06-03 06:03:11 +00:00
Werner Lemberg 9a754ce32b Formatting; adding some tracing code. 2000-06-02 21:31:32 +00:00
Werner Lemberg 91e52d416a Finishing first formatting/documenting etc. of the `base' dir. Some modules
are still badly documented, though...
2000-06-02 14:30:38 +00:00
Werner Lemberg 08edde5805 Correct wrong fix. 2000-06-02 00:11:57 +00:00
Werner Lemberg 2fbf7e439f Added a lot of error checking code to the exported functions in the `base'
subdir (not complete yet).
2000-06-02 00:01:14 +00:00
Werner Lemberg d66ea312f6 FT_Outline_Decompose() now returns FT_Error.
Minor bug fixes.

More formatting, adding/fixing documentation.
2000-06-01 15:49:28 +00:00
David Turner 6b0bf34665 slight change to the smooth renderer to make it compile
stand alone with the _STANDALONE_ macro defined..
See comments inside it "src/base/ftgrays.c"
2000-06-01 05:01:01 +00:00
David Turner 04aa800ce9 added a CID-keyed font driver in "src/cid"
fixed two bugs in the smooth renderer
2000-06-01 03:27:48 +00:00
Werner Lemberg a3b6c6c290 Formatting, fixing and adding documentation. 2000-05-31 06:55:12 +00:00
Werner Lemberg 0c8cde2e05 ftgrays.c: Formatting. It seems to me that _STANDALONE_ doesn't work yet...
Will it ever work?  If not, the unused code should be removed.

ftconfig.h, ftobjs.h: Fix my last fix of the UNUSED() macro.
2000-05-30 20:10:06 +00:00
Werner Lemberg f13e6333f9 Formatting; minor improvements. 2000-05-30 16:49:14 +00:00
Werner Lemberg 026bd17b41 ftmulti.c: Will now accept any filename. It will no longer append `.ttf'
or `.ttc'.  Reformatted.

ftcalc.c, ftdebug.c: Minor formatting stuff.
2000-05-30 05:13:30 +00:00
Werner Lemberg c3c344c76e Fixing the fixes :-) More formatting. 2000-05-29 22:40:57 +00:00
David Turner 4f99c3c423 fixed divide by zero bug
added CFF/OpenType driver source (not working for now)
2000-05-29 20:55:13 +00:00
Werner Lemberg a519b3b7a3 Formatting, fixing descriptions. 2000-05-29 20:46:12 +00:00
David Turner 2e421319fc moved a lot of things from the TrueType driver to the SFNT
module (whose interface has changed, by the way)

This allows even more code re-use between TrueType and
OpenType formats..
2000-05-26 22:13:17 +00:00
David Turner 1118720679 finalised the multiple masters support
fixed some nasty little bugs too
2000-05-26 17:13:23 +00:00
David Turner fea68c6800 fixed two minor bugs:
- the glyph index was not checked in FT_Load_Glyph
  - the "type1" driver didn't read the FontBBox and FontMatrix
    correctly..
2000-05-26 06:40:49 +00:00
David Turner 1fb6eea7d1 EXPORT_DEF renamed to FT_EXPORT_DEF +
reformating/spacing
2000-05-24 00:31:14 +00:00
David Turner 51179f0ae3 some fixes for 64-bit systems. Mainly changed some
FT_TRACE calls to use %p instead of %lx when dumping
a pointer address
2000-05-18 16:18:05 +00:00
David Turner 3475e7fba3 removed TT_MAX_SUBGLYPHS macro, there is no static
limit on the number of subglyphs in a TrueType font..

changed the default number of gray levels used by the
smooth renderer to 256 (instead of 128). Of course, the
human eye can't tell a difference ;-)
2000-05-17 20:56:01 +00:00
David Turner e49ab25c08 formatting - removed trailing spaces 2000-05-16 23:44:38 +00:00
David Turner ea44d5ec3d formatting 2000-05-16 23:22:41 +00:00
David Turner 701d754665 removed obsolete header file 2000-05-16 23:21:59 +00:00
David Turner 414f38c572 at last, fixed the bug, and re-enabled 5-gray levels support
for backwards compatibility..
2000-05-16 22:37:30 +00:00
David Turner 0a29c6979d implemented FT_Select_Charmap and FT_Set_Charmap
(at last :-)
2000-05-12 17:09:38 +00:00
David Turner c30aea9846 another massive changes in order to completely avoid
compiler warnings with GCC + "-ansi -pedantic -Wall -W"
and LCC.

Also fixed the compilation of "type1z" with Win32-LCC
(its pre-processor is broken !!)

Updated the BUILD document too
2000-05-12 15:01:18 +00:00
David Turner bfe2f98f1f a new massive grunt work. Redefined the EXPORT_DEF,
EXPORT_FUNC, BASE_DEF and BASE_FUNC macros to
let them take an argument..

This is needed to compile the library as a DLL on some platforms
that have different compiler conventions..
2000-05-12 12:17:15 +00:00
David Turner 4f2c5544bb additional changes, this time in order to pass extra parameters
to font drivers when creating a new face object.

The FT_Open_Args structure has been changed to simplify
its use and allow generic parameters too..
2000-05-12 10:19:41 +00:00
David Turner 2561b24537 I knew the first CVS commit wouldn't be good :o)
Here, the build system seems to be cured now..
(I'll need to try it on Unix too though..)
2000-05-11 18:47:39 +00:00
David Turner efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00
David Turner f382328131 added experimental emboldening/outlining code. This
is incomplete and will not compile so turned off
2000-05-05 13:11:36 +00:00
David Turner c1205799f5 changes the type of the "mode" parameter in FT_Set_Raster_Mode
to unsigned long (easier than string to compare)
2000-05-05 01:38:46 +00:00
David Turner c136b409eb an update to FT_Outline_Funcs used to improve
the accuracy of outline decomposition
2000-05-04 17:24:54 +00:00
David Turner d186a361a1 various updates to reduce the compilation warnings 2000-05-02 17:41:41 +00:00
David Turner e608a3e0d2 moved the smooth renderer to the base layer directory
it is compiled as a separate object, and its interface is
available in "include/ftgrays.h"
2000-05-02 10:53:11 +00:00
David Turner 271106133a added FT_Sqrt64 to ensure that all bytecode operations are
strictly equivalent to the ones in FT 1.4 when compiling with
the configuration macro FT_CONFIG_OPTION_OLD_CALCS
defined..
2000-05-02 10:52:28 +00:00
David Turner a8bcdf8ef6 added FT_Done_Stream 2000-05-02 10:51:41 +00:00
David Turner 68ebd1bee4 typo 2000-05-02 10:51:22 +00:00
David Turner 33ec7d473b removed an over-zealous assertation that halted the engine
with a few weird fonts.
2000-05-02 10:51:04 +00:00
David Turner 61492029a5 added macros to read little endian words from a byte stream
(e.g. NEXT_ShortLE(buffer))
2000-05-02 10:50:18 +00:00
David Turner 99a4d93b2d added FT_Get_Sfnt_Table from "include/tttables.h" 2000-04-25 16:10:50 +00:00
David Turner 2dbc54dd13 typo 2000-04-25 16:10:14 +00:00
David Turner 37379e2170 major changes to the library:
- there is now a "convenience" API to manage glyphs in
   "include/ftglyph.h". See the demo program "ftstring" for
   an example..

  - the raster interface has been changed in order to allow
    direct composition through user-provided callbacks. This
    has been tested but isn't demonstrated for now in "demos"

 - the FT_LOAD_NO_RECURSE flag is supported, as this is
   required by some new code in the auto-hinting engine

 - some bug fixed in FT_MulFix which made FT_xxx_Transform
   return incorrect results..
2000-03-28 11:22:31 +00:00
David Turner 7024ca1a37 ftoutln.c is now mandatory. The optional parts of this
component can be disabled with the config macro
FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS
2000-03-28 11:18:39 +00:00
David Turner e01a41d5eb fixed a stupid bug in FT_MulFix 2000-03-28 11:17:58 +00:00
David Turner c3c7e7fb0c updated CHANGES
added BUILD & INSTALL
2000-03-13 14:19:31 +00:00
David Turner 757429fdc9 fix to get rid of compile warning 2000-03-13 13:02:57 +00:00
David Turner 7f7aadf4f7 finished moving all configuration macros to
"config/ftoption.h"
2000-03-13 12:57:27 +00:00
David Turner 06d508c1de removed the unused/obsolete "ftbbox.c" 2000-03-13 11:52:44 +00:00
David Turner 7f615aef5e renamed all outlines functions to the
FT_Outline_<action> syntax..
2000-03-13 11:49:20 +00:00
David Turner 41dbcbf628 reformatting, changing the FT_Outline structure:
- "flags" have been renamed to "tags"
  - "outline_flags" have been renamed to "flags"

Look for more re-formatting today..
2000-03-09 11:46:25 +00:00
David Turner 0f99ddda5f changed the structure of FT_Outline in order to pack
all outline flags in a single integer..

Changed the rest of the library and demo programs
accordingly..
2000-03-06 13:23:32 +00:00
Just van Rossum 7eef5364b8 - ft_new_input_stream: don't make a new copy of the pathname
- ft_done_stream: remove the FREE(pathname) call, which wasn't
  kosher
- FT_Open_Face: after calling open_face, don't assume driver is
  the same as face->driver, use face->driver instead
2000-03-05 16:07:58 +00:00
Just van Rossum 59d8ac4615 formatting: some tabs replaced by spaces 2000-03-05 15:59:09 +00:00
Werner Lemberg febe3fbeba A first check of FT2's Make system. Many smaller and larger bugs have been
fixed:

. Removing unused variables.

. detect.mk files now must provide $(CONFIG_FILE) and not $(CONFIG_RULE).

. ansi.mk will now be really used as a fallback if the detect mechanism
  fails.

. ANSIFLAGS will now be really used (fixing a typo).

. `make clean' now works (again two typos).

. Detection of gcc on Unix has been fixed (using the `-v' option instead of
  `--version').

. `make devel' now works (on Unix).

. Fixing *again* a bug in demos/graph/x11/rules.mk to allow multiple use
  of `-L' compiler options.

. $(BASE_H) now contains a few more header files.

As usual, a lot of formatting (not finished yet).
2000-03-05 01:14:19 +00:00
Just van Rossum 1e5754f2d6 added missing "else": without it FT_Open_Face() would still scan the list of drivers when specifying an explicit driver 2000-03-02 10:52:57 +00:00
Just van Rossum d35aea7090 ft_new_input_stream(): set the pathname field of the stream to args->pathname. Needed for the Mac fond driver.
ft_done_stream(): free the pathname field, if not null
2000-03-02 01:07:50 +00:00
David Turner e755002ddc moved the ANSI "ftsystem.c" to src/base 2000-02-29 17:11:53 +00:00
David Turner cbfaedcefa added glyph zone objects 2000-02-21 16:00:36 +00:00
Werner Lemberg 547a252af1 Formatting. Adding/Fixing documentation. 2000-02-16 08:23:58 +00:00
David Turner 861ba624db small fix (reduce compiler warnings) 2000-02-15 12:54:51 +00:00
David Turner 24ea09fcbd small fix 2000-02-15 12:54:06 +00:00
David Turner 7663f22288 Added support for the "attach_file" format-specific driver
interface, used to implement FT_Attach_File.

Note, this is currently very lightly tested..
2000-02-13 13:37:38 +00:00
David Turner 818336fdf4 Added the function FT_Read_Fields, it acts as a
finite-state automata to load large TrueType tables
in object structures.

This is experimental, don't mess too much with it,
thanks :-)
2000-02-13 13:36:53 +00:00
David Turner cda32b71ba added the FT_Attach_File function to enable AFM
parsing.

Also, changed the API for FT_Open_Face to allow
broader stream descriptions..
2000-02-10 16:14:35 +00:00
David Turner d42c68e855 many new small, but important, changes there:
- modified the interface of the "sfnt" module. There is now a function
    called "load_format_tag", and another called "load_directory".

    The first one is in charge of returning the 4-byte tag located at
    the beginning of a given font file. It understand TrueType collections
    and parses them automatically

    The second loads the table directory that is located just after
    the format tag.

    This is useful, because the "SFNT" storage scheme can be used by
    several distinct formats, each with its own format tag.

    The TrueType driver now checks the format tag in "src/truetype/ttobjs.c"

  - made some changes to "src/shared/t1types.h" to clearly separate the
    Type 1 font content from the rest of the T1_Face structure. This
    will be useful when adding the CFF/Type2 driver that will be able
    to reuse the "T1_Font" structure within a "TT_Font" one (which
    really describes a SFNT-based font file).

    Some changes in "src/type1" were thus performed to reflect this.
    Note that the current type1 driver will be discontinued in a
    distant future. More on this later..
2000-01-27 13:56:02 +00:00
David Turner 3ba47068a6 some updates to the "rules.mk" files. Basically, we now
use "$(FT_COMPILE)" instead of "$(FT_CC)" in order to
compile the library.

$(FT_COMPILE) uses the $(ANSI_FLAGS) variable used to
define ANSI-compliance flags for the current compiler. It is used
to compile the library exclusively (some demo programs will _not_
compile properly with these flags set).
2000-01-17 11:25:57 +00:00
David Turner fdc225b153 fixed another small bug in the FT_Read_xxxx functions
(they didn't updated the stream position in the case of
disk-based streams. This went un-noticed under Linux
which uses memory-mapped files by default)
2000-01-17 11:21:49 +00:00
David Turner 8cd9575c27 fixed small bug 2000-01-17 11:21:00 +00:00
Werner Lemberg 7dff772e59 Added ftraster.h for better support of standalone mode.
Fixed cleaning rules for the demo programs.
2000-01-17 08:24:22 +00:00
Werner Lemberg 9ab7c3c37e Fixed compilation bug for standalone mode. 2000-01-15 12:43:27 +00:00
David Turner cef95a09d7 Yet another improvements to the scan-converter. Some macros were
introduced to use a constant precision and dynamic bezier decomposition
thresholding, leading some performance improvements.

Note that by now, the "high_precision" field of a FT_Outline
is ignored by the raster..
2000-01-14 15:36:00 +00:00
David Turner 4f2d5b9a48 fixed a bug which prevented the raster from correctly
performing horizontal dropout control..
2000-01-13 18:20:28 +00:00
Werner Lemberg 7880dd6630 ftcalc.c, ftextend.c, ftoutln.c, ftraster.c, ftstream.c:
Removing trailing spaces.

ftlist.h:
  Removing duplicated documentation (which is in ftlist.c also).

ftinit.c, ftlist.c, ftobjs.c:
  Formatting, adding documentation.
2000-01-10 17:19:45 +00:00
Werner Lemberg 0db8d1ab84 Formatting. 2000-01-09 17:54:56 +00:00
Werner Lemberg f993b6a033 demos/config/x11/rules.mk:
support for multiple X11R6 entries in $(PATH) added.

ftxbbox.c, ftcalc.c, ftdebug.c, ftdriver.h:
  doc fixes.

ftdebug.c:
  formatting.

ftdebug.h:
  making makros `;'-safe (i.e., they can now be used within if-else clauses
  without side effects resp. don't produce a single `;').
2000-01-08 17:10:33 +00:00
Werner Lemberg 2b94ffad74 More docs added. 2000-01-07 15:02:05 +00:00
Werner Lemberg 17ae985d38 ftbbox.h: FT_Get_Outline_BBox() must be called FT_Raster_GetBBox().
ftcalc.c: Added a missing closing paranthesis in 64bit version of
          FT_MulFix().

Some formatting; updating copyright.
2000-01-02 09:41:30 +00:00
David Turner 433bc53fb6 Additional improvements to make the anti-aliasing even faster :-)
As previously, this is only noticable for sizes over 64 pixels.
1999-12-30 12:28:03 +00:00
David Turner 5951ce9fc6 updated the CHANGES file
+ some basic formatting cleaning
1999-12-29 00:53:44 +00:00
David Turner 10effdf61e Added the rules files `module.mk' to "sfnt", "truetype" and "type1" to
reflect the new modules/drivers list management performed through the
file `freetype2/config/modules.mk'

Changed the driver header files to reflect the new modules/drivers
list management. We get rid, at last, of the infamous pre-processor
tricks used to build the list at compile time.

`src/base/ftinit.c' is also modified to reflect the changes..
1999-12-29 00:22:24 +00:00
David Turner 34b3032045 Some improvements to make the new anti-alias algorithm faster when
large glyph images are generated (e.g. ` fttimer -g' runs 20% faster).

For small pixel sizes (i.e. typically less than 64 pixels), rendering
speed is unaffected.
1999-12-28 18:36:10 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00