diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-17 14:10:44 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-17 14:10:44 +0000 |
commit | c7cc04bad95bbc4f90674a2e3f1421a02d338caf (patch) | |
tree | a921d9b88ded67755f4dc3d8a307a2460163aa08 /psprint | |
parent | a0dbbf38b0fde5f9ab2aea763b798fcbab65c555 (diff) |
INTEGRATION: CWS vcl08 (1.18.2.1.20); FILE MERGED
2003/04/14 09:28:48 pl 1.18.2.1.20.2: #108862# merge from vcl07
2003/04/11 15:26:09 pl 1.18.2.1.20.1: #108862# workaround another standard violating font
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/fontsubset/sft.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/psprint/source/fontsubset/sft.c b/psprint/source/fontsubset/sft.c index e220c36ffddb..4810ed0c297d 100644 --- a/psprint/source/fontsubset/sft.c +++ b/psprint/source/fontsubset/sft.c @@ -2,9 +2,9 @@ * * $RCSfile: sft.c,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: vg $ $Date: 2003-04-15 16:14:17 $ + * last change: $Author: rt $ $Date: 2003-04-17 15:10:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,12 +59,12 @@ * ************************************************************************/ -/* $Id: sft.c,v 1.21 2003-04-15 16:14:17 vg Exp $ +/* * Sun Font Tools * * Author: Alexander Gelfenbain * - */ + */ #if OSL_DEBUG_LEVEL == 0 #define NDEBUG @@ -1423,7 +1423,7 @@ static void GetKern(TrueTypeFont *ttf) for (i=0; i < ttf->nkern; i++) { ttf->kerntables[i] = ptr; ptr += GetUInt16(ptr, 2, 1); - // sanity check + /* sanity check */ if( ptr > ttf->ptr+ttf->fsize ) { free( ttf->kerntables ); @@ -1443,7 +1443,7 @@ static void GetKern(TrueTypeFont *ttf) for (i = 0; i < ttf->nkern; i++) { ttf->kerntables[i] = ptr; ptr += GetUInt32(ptr, 0, 1); - // sanity check; there are some fonts that are broken in this regard + /* sanity check; there are some fonts that are broken in this regard */ if( ptr > ttf->ptr+ttf->fsize ) { free( ttf->kerntables ); @@ -2495,6 +2495,10 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info) info->typoLineGap = XUnits(UPEm, GetInt16(table, 72, 1)); info->winAscent = XUnits(UPEm, GetUInt16(table, 74, 1)); info->winDescent = XUnits(UPEm, GetUInt16(table, 76, 1)); + /* sanity check; some fonts treat winDescent as signed + * violating the standard */ + if( info->winDescent > 5*UPEm ) + info->winDescent = XUnits(UPEm, GetInt16(table, 76,1)); } if (ttf->cmapType == CMAP_MS_Unicode) { info->rangeFlag = 1; |