* include/freetype/freetype.h (FT_Glyph_Metrics, FT_GlyphSlotRec),
src/autofit/afloader.c, src/autohint/ahhint.c: moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY of the library !! * src/sfnt/sfobjs.c: removing compiler warning
This commit is contained in:
parent
89d4e4bd9a
commit
8530a22888
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-06-08 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/freetype.h (FT_Glyph_Metrics, FT_GlyphSlotRec),
|
||||
src/autofit/afloader.c, src/autohint/ahhint.c:
|
||||
moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics
|
||||
to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY
|
||||
of the library !!
|
||||
|
||||
* src/sfnt/sfobjs.c: removing compiler warning
|
||||
|
||||
2004-06-05 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and
|
||||
|
@ -11,9 +21,6 @@
|
|||
|
||||
Improve inter-letter spacing for autohinted glyphs.
|
||||
|
||||
* include/freetype/freetype.h (FT_Glyph_Metrics): Add elements
|
||||
`lsb_delta' and `rsb_delta'.
|
||||
|
||||
* src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
|
||||
`rsb_delta' in slot->metrics and tune side bearings slightly.
|
||||
|
||||
|
|
|
@ -213,41 +213,6 @@ FT_BEGIN_HEADER
|
|||
/* vertAdvance :: */
|
||||
/* Advance height for vertical layout. */
|
||||
/* */
|
||||
/* lsb_delta :: */
|
||||
/* The difference between hinted and unhinted left side bearing */
|
||||
/* while autohinting is active. Zero otherwise. */
|
||||
/* */
|
||||
/* rsb_delta :: */
|
||||
/* The difference between hinted and unhinted right side bearing */
|
||||
/* while autohinting is active. Zero otherwise. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Here a small pseudo code fragment which shows how to use */
|
||||
/* `lsb_delta' and `rsb_delta': */
|
||||
/* */
|
||||
/* FT_Pos origin_x = 0; */
|
||||
/* FT_Pos prev_rsb_delta = 0; */
|
||||
/* */
|
||||
/* */
|
||||
/* for all glyphs do */
|
||||
/* <compute kern between current and previous glyph and add it to */
|
||||
/* `origin_x'> */
|
||||
/* */
|
||||
/* <load glyph with `FT_Load_Glyph'> */
|
||||
/* */
|
||||
/* if ( prev_rsb_delta - face->glyph->metrics.lsb_delta >= 32 ) */
|
||||
/* origin_x -= 64; */
|
||||
/* else if */
|
||||
/* ( prev_rsb_delta - face->glyph->metrics.lsb_delta < -32 ) */
|
||||
/* origin_x += 64; */
|
||||
/* */
|
||||
/* prev_rsb_delta = face->glyph->metrics.rsb_delta; */
|
||||
/* */
|
||||
/* <save glyph image, or render glyph, or ...> */
|
||||
/* */
|
||||
/* origin_x += face->glyph->advance.x; */
|
||||
/* endfor */
|
||||
/* */
|
||||
typedef struct FT_Glyph_Metrics_
|
||||
{
|
||||
FT_Pos width;
|
||||
|
@ -261,9 +226,6 @@ FT_BEGIN_HEADER
|
|||
FT_Pos vertBearingY;
|
||||
FT_Pos vertAdvance;
|
||||
|
||||
FT_Pos lsb_delta;
|
||||
FT_Pos rsb_delta;
|
||||
|
||||
} FT_Glyph_Metrics;
|
||||
|
||||
|
||||
|
@ -1506,6 +1468,14 @@ FT_BEGIN_HEADER
|
|||
/* Note that the app will need to know about the */
|
||||
/* image format. */
|
||||
/* */
|
||||
/* lsb_delta :: */
|
||||
/* The difference between hinted and unhinted left side bearing */
|
||||
/* while autohinting is active. Zero otherwise. */
|
||||
/* */
|
||||
/* rsb_delta :: */
|
||||
/* The difference between hinted and unhinted right side bearing */
|
||||
/* while autohinting is active. Zero otherwise. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* If @FT_Load_Glyph is called with default flags (see */
|
||||
/* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
|
||||
|
@ -1525,6 +1495,34 @@ FT_BEGIN_HEADER
|
|||
/* position (e.g. coordinates [0,0] on the baseline). Of course, */
|
||||
/* `slot->format' is also changed to `FT_GLYPH_FORMAT_BITMAP' . */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Here a small pseudo code fragment which shows how to use */
|
||||
/* `lsb_delta' and `rsb_delta': */
|
||||
/* { */
|
||||
/* FT_Pos origin_x = 0; */
|
||||
/* FT_Pos prev_rsb_delta = 0; */
|
||||
/* */
|
||||
/* */
|
||||
/* for all glyphs do */
|
||||
/* <compute kern between current and previous glyph and add it to */
|
||||
/* `origin_x'> */
|
||||
/* */
|
||||
/* <load glyph with `FT_Load_Glyph'> */
|
||||
/* */
|
||||
/* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */
|
||||
/* origin_x -= 64; */
|
||||
/* else if */
|
||||
/* ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */
|
||||
/* origin_x += 64; */
|
||||
/* */
|
||||
/* prev_rsb_delta = face->glyph->rsb_delta; */
|
||||
/* */
|
||||
/* <save glyph image, or render glyph, or ...> */
|
||||
/* */
|
||||
/* origin_x += face->glyph->advance.x; */
|
||||
/* endfor */
|
||||
/* } */
|
||||
/* */
|
||||
typedef struct FT_GlyphSlotRec_
|
||||
{
|
||||
FT_Library library;
|
||||
|
@ -1552,6 +1550,9 @@ FT_BEGIN_HEADER
|
|||
void* control_data;
|
||||
long control_len;
|
||||
|
||||
FT_Pos lsb_delta;
|
||||
FT_Pos rsb_delta;
|
||||
|
||||
void* other;
|
||||
|
||||
FT_Slot_Internal internal;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "afdummy.h"
|
||||
#include "afhints.h"
|
||||
|
||||
|
||||
static FT_Error
|
||||
|
|
|
@ -190,8 +190,8 @@
|
|||
loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
|
||||
loader->pp2.x = FT_PIX_ROUND( pp2x_uh );
|
||||
|
||||
slot->metrics.lsb_delta = hinter->pp1.x - pp1x_uh;
|
||||
slot->metrics.rsb_delta = hinter->pp2.x - pp2x_uh;
|
||||
slot->lsb_delta = loader->pp1.x - pp1x_uh;
|
||||
slot->rsb_delta = loader->pp2.x - pp2x_uh;
|
||||
|
||||
#if 0
|
||||
/* try to fix certain bad advance computations */
|
||||
|
|
|
@ -1569,8 +1569,8 @@
|
|||
hinter->pp1.x = FT_PIX_ROUND( pp1x_uh );
|
||||
hinter->pp2.x = FT_PIX_ROUND( pp2x_uh );
|
||||
|
||||
slot->metrics.lsb_delta = hinter->pp1.x - pp1x_uh;
|
||||
slot->metrics.rsb_delta = hinter->pp2.x - pp2x_uh;
|
||||
slot->lsb_delta = hinter->pp1.x - pp1x_uh;
|
||||
slot->rsb_delta = hinter->pp2.x - pp2x_uh;
|
||||
|
||||
#if 0
|
||||
/* try to fix certain bad advance computations */
|
||||
|
|
|
@ -251,6 +251,14 @@
|
|||
typedef unsigned char Byte, *PByte;
|
||||
typedef char Bool;
|
||||
|
||||
typedef union
|
||||
{
|
||||
long l;
|
||||
void* p;
|
||||
void (*f)(void);
|
||||
|
||||
} Alignment, *PAlignment;
|
||||
|
||||
typedef struct TPoint_
|
||||
{
|
||||
Long x;
|
||||
|
@ -313,7 +321,7 @@
|
|||
|
||||
|
||||
#define AlignProfileSize \
|
||||
( ( sizeof ( TProfile ) + sizeof ( long ) - 1 ) / sizeof ( long ) )
|
||||
( ( sizeof ( TProfile ) + sizeof ( Alignment ) - 1 ) / sizeof ( long ) )
|
||||
|
||||
|
||||
#ifdef TT_STATIC_RASTER
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
FT_Int found_win = -1;
|
||||
FT_Int found_unicode = -1;
|
||||
|
||||
FT_Bool is_english;
|
||||
FT_Bool is_english = 0;
|
||||
|
||||
TT_NameEntry_ConvertFunc convert;
|
||||
|
||||
|
|
Loading…
Reference in New Issue