* src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle
CID-keyed fonts. Remove MS-DOS line endings. Minor formatting issues.
This commit is contained in:
parent
87c0d30fc5
commit
328abf3094
46
ChangeLog
46
ChangeLog
|
@ -1,40 +1,16 @@
|
|||
2003-12-23 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle
|
||||
CID-keyed fonts.
|
||||
|
||||
2003-12-23 David Turner <david@freetype.org>
|
||||
|
||||
* include/freetype/fttypes.h
|
||||
src/autofit/afangles.c
|
||||
src/autofit/aflatin.c
|
||||
src/autohint/ahglyph.c
|
||||
src/autohint/ahhint.c
|
||||
src/base/ftcalc.c
|
||||
src/base/ftgloadr.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftobjs.c
|
||||
src/base/ftsynth.c
|
||||
src/base/fttrigon.c
|
||||
src/cff/cffgload.c
|
||||
src/cid/cidgload.c
|
||||
src/cid/cidload.c
|
||||
src/pfr/pfrgload.c
|
||||
src/pfr/pfrload.c
|
||||
src/pfr/pfrsbit.c
|
||||
src/psaux/psobjs.c
|
||||
src/pshinter/pshalgo.c
|
||||
src/pshinter/pshglob.c
|
||||
src/pshinter/pshrec.c
|
||||
src/raster/ftrend1.c
|
||||
src/sfnt/ttcmap0.c
|
||||
src/smooth/ftsmooth.c
|
||||
src/truetype/ttdriver.c
|
||||
src/truetype/ttgload.c
|
||||
src/truetype/ttinterp.c
|
||||
src/truetype/ttobjs.c
|
||||
src/type1/t1gload.c
|
||||
src/winfonts/winfnt.c:
|
||||
|
||||
use of the FT_PAD_XXX and FT_PIX_XXX macros to avoid compiler
|
||||
warnings with very pedantic compilers. Hints: (x) & -64 will
|
||||
warn if (x) is not signed.. use (x) & ~63 instead !
|
||||
|
||||
* include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND,
|
||||
FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros. They
|
||||
are used to avoid compiler warnings with very pedantic compilers.
|
||||
Note that `(x) & -64' causes a warning if (x) is not signed. Use
|
||||
`(x) & ~63' instead!
|
||||
Updated all related code.
|
||||
|
||||
2003-12-22 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
|
|
|
@ -591,7 +591,7 @@ FT_BEGIN_HEADER
|
|||
/* values as well. */
|
||||
/* */
|
||||
/* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
|
||||
/* is not Unicode or ISO-8859-1 (otherwise it is set to */
|
||||
/* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
|
||||
/* FT_ENCODING_UNICODE). Use `FT_Get_BDF_Charset_ID' to find out */
|
||||
/* which encoding is really present. If, for example, the */
|
||||
/* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */
|
||||
|
|
|
@ -59,7 +59,8 @@ FT_BEGIN_HEADER
|
|||
* A list of valid values for the `charset' byte in
|
||||
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
|
||||
* encodings (except for cp1361) can be found at ftp://ftp.unicode.org
|
||||
* in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory.
|
||||
* in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
|
||||
* roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
|
||||
*
|
||||
* @values:
|
||||
* FT_WinFNT_ID_DEFAULT ::
|
||||
|
|
|
@ -78,13 +78,15 @@ FT_BEGIN_HEADER
|
|||
#define ABS( a ) ( (a) < 0 ? -(a) : (a) )
|
||||
#endif
|
||||
|
||||
|
||||
#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) )
|
||||
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x)+((n)/2), n )
|
||||
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x)+((n)-1), n )
|
||||
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
|
||||
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
|
||||
|
||||
#define FT_PIX_FLOOR( x ) ( (x) & ~63 )
|
||||
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x)+32 )
|
||||
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x)+63 )
|
||||
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
|
||||
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* FreeType synthesizing code for emboldening and slanting (body). */
|
||||
/* */
|
||||
/* Copyright 2000-2001, 2002 by */
|
||||
/* Copyright 2000-2001, 2002, 2003 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -279,7 +279,8 @@
|
|||
first = last + 1;
|
||||
}
|
||||
|
||||
slot->metrics.horiAdvance = ( slot->metrics.horiAdvance + distance*4 ) & ~63;
|
||||
slot->metrics.horiAdvance =
|
||||
( slot->metrics.horiAdvance + distance*4 ) & ~63;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -545,6 +545,10 @@
|
|||
FT_UShort glyph_sid;
|
||||
|
||||
|
||||
/* CID-keyed fonts don't have glyph names */
|
||||
if ( !cff->charset.sids )
|
||||
return -1;
|
||||
|
||||
/* check range of standard char code */
|
||||
if ( charcode < 0 || charcode > 255 )
|
||||
return -1;
|
||||
|
@ -663,8 +667,6 @@
|
|||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
|
||||
|
||||
/* XXX: What about CID-keyed fonts? */
|
||||
|
||||
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
|
||||
achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );
|
||||
}
|
||||
|
|
|
@ -392,10 +392,13 @@
|
|||
else
|
||||
{
|
||||
/* a 16-bit character code */
|
||||
p += char_hi * 2; /* jump to key entry */
|
||||
sub = subs + ( FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 8 ) ); /* jump to sub-header */
|
||||
|
||||
/* check that the hi byte isn't a valid one-byte value */
|
||||
/* jump to key entry */
|
||||
p += char_hi * 2;
|
||||
/* jump to sub-header */
|
||||
sub = subs + ( FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 8 ) );
|
||||
|
||||
/* check that the high byte isn't a valid one-byte value */
|
||||
if ( sub == subs )
|
||||
goto Exit;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* s */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
|
@ -590,13 +590,14 @@
|
|||
}
|
||||
|
||||
/* Compute root ascender, descender, text height, and max_advance */
|
||||
metrics->ascender = FT_PIX_ROUND( FT_MulFix( face->root.ascender,
|
||||
metrics->y_scale ) );
|
||||
metrics->descender = FT_PIX_ROUND( FT_MulFix( face->root.descender,
|
||||
metrics->y_scale ) );
|
||||
metrics->height = FT_PIX_ROUND( FT_MulFix( face->root.height,
|
||||
metrics->y_scale ) );
|
||||
metrics->max_advance = FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
|
||||
metrics->ascender =
|
||||
FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
|
||||
metrics->descender =
|
||||
FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
|
||||
metrics->height =
|
||||
FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
|
||||
metrics->max_advance =
|
||||
FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
|
||||
metrics->x_scale ) );
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue