What's new?
===========

The Future: FreeType 2.0
------------------------

FreeType 1.1 is  released to fix some bugs found in  1.0, as well as
enhance the engine's features.

However,  the  FreeType  distribution   is  going  through  a  major
re-design and will extend  its capabilities from a TrueType-specific
font driver  to a higher-level text rendering  library, which should
hopefully be independent of font file formats.

We're  aimed at a  portable, efficient  and lightweight  system.  We
want a _single_  API to be used on all systems.   Our first try will
be released soon as FreeType 2.0 (or maybe 1.99).

Changes between FreeType 1.1 and 1.2:
-------------------------------------

Mostly bug fixes and build fixes.

Changes between FreeType 1.0 and 1.1:
-------------------------------------

There were  various changes  since the 1.0  release.  Here  they are
summarized:

- "Added vertical layout support"

  The  engine  now  loads  the  vertical  header  and  metrics  when
  available and makes them  visible through the new 'vertical' field
  of the  face properties (it is  set to NULL when  no vertical data
  was found in the font file).

  The glyph loader now  loads all metrics (horizontal and vertical),
  but  still   returns  the  horizontal  ones  only   with  the  API
  TT_Get_Glyph_Metrics().   However,  TT_Get_Glyph_Bit_Metrics() has
  been added to extract them from a glyph container.

- "Serialisation of coordinates arrays in TT_Outline"

  As  announced in  the  previous API  reference,  the structure  of
  TT_Outline changed slightly, as well  as the naming of its fields.
  The points are now stored  in a single array of TT_Vector, instead
  of two parallel arrays (one for the Xs, the other for the Ys).

- "New API TT_Get_Face_Metrics()"

  Useful  to  access  un-scaled  metrics like  left  side  bearings,
  advance widths, top side bearings  and advance height, for a given
  range of glyphs.

- "New extension ftxcmap.c"

  Used  by some  applications  to enumerate  and  parse the  charmap
  tables in an easier way.

- "New extension ftxpost.c"

  With  this extension  you can  access the  PostScript  glyph names
  given in the 'post' table.

- "New extension ftxwidth.c"

  This extension  is used to parse  the 'glyf' table  to extract the
  bounding boxes  of a given range  of glyphs.  This  is much faster
  than loading individual glyphs.

- "Engine is now THREAD-SAFE and REENTRANT"

  However, the  implementation of ttmutex  must be refined  for your
  system  -- the default  one is  a dummy  and doesn't  do anything!
  Beware! THIS IS STILL IN BETA.

  The thread-safe and  reentrant builds now compile and  seem to run
  well when used with a  single thread. Some efforts have been spent
  to check the coherency of  the lock contentions within the engine,
  but we haven't tested multi-threading heavily.

- "Large internal re-organisation"

  Too technical  to explain  shortly, but results  in a  much better
  memory  footprint  and   smaller  code,  especially  when  opening
  multiple faces.

- "Fixes/enhancements to the interpreter"

  The  infamous  Monotype.com  bug  (a  new free  font  released  by
  Microsoft Typography  a few days after the  FreeType 1.0 release!)
  is fixed,  of course, as well  as few other  little and unpleasant
  artifacts...

  The interpreter  was also seriously re-organized to  allow the use
  of a very large "switch" statement, instead of a jump table, which
  results in smaller  and faster code on some  systems (depending of
  the compiler too).   Users of the library can  experiment with the
  TT_CONFIG_OPTION_INTERPRETER_SWITCH  configuration  macro to  test
  this.

- "Single object compilation mode"

  The core  engine can  now be compiled  into a single  object file.
  This allows optimizing compilers  to do more global optimizations,
  and get rid of many of the 'intermediate' internal symbols used to
  link internal engine components together.

  The engine now takes only 48kByte of stripped Intel object code!

- "Dll compilation mode"

  In order  to allow the  compilation of the  library as a  DLL, the
  keyword EXPORT  has been added as  a prefix to  all high-level API
  functions found in "freetype.h".  Define  it to the value you need
  before '#include "freetype.h"' when building the DLL (if undefined
  it will default to nothing within this header file).

  (Apparently, this is only useful on Win32, maybe on OS/2.)


- "Renamed configuration macros"

  These  were  renamed  to  forms  of  TT_CONFIG_OPTION_XXXXX_YYYYY.
  They're  located  in   ttconfig.h  and  can  be  defined/undefined
  manually by  developers who  want to tune  the compilation  of the
  engine:

    TT_CONFIG_OPTION_EXTEND_ENGINE

      Allows extensions to be  linked with the single object engine.
      If  you don't  need any  of  them, you  may save  one or  more
      Kilobytes by undefining it.


    TT_CONFIG_OPTION_GRAY_SCALING
  
      Allows  the compilation of  the gray-scaling  (font smoothing)
      code in ttraster.  If undefined, some APIs won't be available:

        TT_Set_Raster_Palette(),
        TT_Get_Glyph_Pixmap(),
        TT_Get_Outline_Pixmap()


    TT_CONFIG_OPTION_INTERPRETER_SWITCH

      Uses  a large  'switch' statement  in the  bytecode intepreter
      instead of a constant call-table.  Depending on your processor
      and compiler,  this can lead to significant  reduction of code
      size and/or increase of performance.


    TT_CONFIG_OPTION_THREAD_SAFE

      When defined, a thread-safe version of the engine is built.  A
      thread-safe version is a bit bigger, probably not slower, than
      a non-threaded  build.  ATTENTION: You must  redefine the file
      "lib/ttmutex.c"  for  your own  platform  to  get  it to  work
      correctly.


    Some more options may come in the future...

- "New APIs TT_MulDiv() and TT_MulFix()"

  To help you compute 'a*b/c' with 64-bit intermediate precision, or
  'a*b/0x10000' with the same one...

  These  are  not  necessarily  the fastest  functions  but  they're
  clearly  portable and  overflow-safe.   Your runtime/compiler  may
  provide better replacements, though...


====================================================================


Changes between FreeType Beta and 1.0:
--------------------------------------

There were a number of changes since the public beta:


I. Bug fixes

  The following bugs have been fixed in this release:

  - "Incorrect advance width and left side bearings"

    The glyph loader has been  re-designed to match the values found
    in the pre-calc tables...

  - "Problems when opening multiple fonts"

    Fixed.  A stupid bug in the i/o component.

  - "Problems with some Georgian fonts"

    Fixed.  Discovered some new undocumented opcodes behaviour...

  - "Buglets  in the test  programs which  made them  return invalid
    error codes"

    Fixed.

  - "Memory leaks when trying to open broken some font files"

    Fixed.  Waiting for more broken fonts to test...

  - "Non-square resolutions don't work or display correctly"

    They now work very well!

  - "The scan-line converter,  while in font-smoothing mode, doesn't
    perform horizontal drop-out control"

    This  wasn't really  bug,  but the  feature  has been  correctly
    added.


The remaining "features" persist, as they're not essential yet:

  - The "rotated"  and "stretched" flags do not  work (glyph loading
    will  then return  errors).  However,  it is  still  possible to
    rotate or transform any outline without setting these flags.

  - We  always use drop-out  mode number  2, as  some of  the values
    returned by some "cvt programs" seem invalid for now...


Note also that an "event  hook/callback" has been introduced in this
release, but  is still under alpha  (not even beta;  it is commented
ouy currently).  You should not rely on this...


II. Code changes:


  1. API Changes:

    A few API  changes were necessary in order  to support important
    features,  or  future  improvements  which will  come  in  later
    releases.

    - TT_Set_Instance_Resolution() was renamed to
      TT_Set_Instance_Resolutions().

    - TT_Set_Instance_PointSize()  has  disappeared.   Instead,  the
      following APIs have been defined:

        TT_Set_Instance_CharSize()
        TT_Set_Instance_CharSizes()
        TT_Set_Instance_PixelSizes()

    - The  TT_Engine  class  has  been introduced.   It  models  one
      instance of the library, and  is used to allow re-entrancy and
      shared  library code.   The functions  which now  depend  on a
      TT_Engine parameter are:

        TT_Init_FreeType()
        TT_Done_FreeType()
        TT_Open_Face()
        TT_Open_Collection()
        TT_Set_Raster_Palette()
        TT_Get_Outline_Bitmap()
        TT_Get_Outline_Pixmap()

      Note that  there is _no_ sharing of  objects between distincts
      engines.

    - Each face and instance object have an inside pointer which use
      is  reserved  to client  application.   Several functions  are
      defined to set and read it:

        TT_Set_Face_Pointer() / TT_Get_Face_Pointer()
        TT_Set_Instance_Pointer() / TT_Get_Instance_Pointer()

    - TT_Apply_Outline_Matrix() has been renamed to
      TT_Transform_Outline().
      TT_Apply_Outline_Translation() has been renamed to
      TT_Translate_Outline()
      TT_Apply_Vector_Matrix() has been renamed to
      TT_Transform_Vector()

      all for the sake of clarity.


  2. Structural changes:

    Some structures have evolved.

    - The  instance  metrics  have  now  two new  fields  which  are
      "x_scale"  and  "y_scale".   Each  one is  a  scaling  factor,
      expressed in the 16.16  fixed float format (TT_Fixed), used to
      convert  one distance expressed  in font  units into  the same
      distance in fractional (26.6) pixels.

    - A  new  structure TT_BBox  has  been  defined  to describe  an
      outline's bounding box.

    - The outlines  are now full-class  citizen.  It is  possible to
      create  new outlines,  copy, clone,  transform,  translate and
      render them  through specific methods of  the TT_Outline class
      (previously called TT_Glyph_Outline).   Read the API reference
      for a complete listing.

    - The glyph metrics have a new structure: they contain a TT_BBox
      field, a  TT_Outline field, as  well as three  metrics values,
      which are "bearingX", "bearingY" and "advance".  Read the file
      "glyphs.txt" for more  information about their definitions and
      uses.


  3. Small but IMPORTANT changes:

    - The "max_Faces" field of  a face's properties has disappeared.
      It is replaced by "num_Faces"  which gives the total number of
      fonts embedded  in a collection  (the previous field  gave the
      total minus one).

    - TT_Load_Glyph()  now returns  correctly  placed outlines,  and
      computes advance widths which match the pre-calc values in the
      "hdmx" table in nearly all cases.

    - TT_Get_Glyph_Metrics() returns  grid-fitted metrics for hinted
      glyphs   (i.e.,   loaded   with  the   TTLOAD_HINT_GLYPH,   or
      TTLOAD_DEFAULT, flags) This includes the bounding box.  To get
      the exact bounding  box of a hinted glyph,  you should extract
      its outline, then call TT_Get_Outline_BBox().

    - Some  improvements   in  the  glyph   loader,  which  improves
      drastically  the  placement  of glyphs  (especially  composite
      ones)   which  previously  caused   trouble  for   some  fonts
      (e.g. goudy.ttf).

    - Several  minor  improvements  in  the interpreter  to  improve
      rendering and bounds checking...

    - Up-to-date Pascal source code, with output equivalent to the C
      tree...


--- END ---
