* builds/win32/ftdebug.c: added a missing #endif

* src/sfnt/ttload.c, src/bdf/bdflib.c: removing compiler warnings

        * src/type42/t42objs.c: removed the bug that prevented un-hinted
        outlines to be loaded
This commit is contained in:
David Turner 2002-06-11 20:35:58 +00:00
parent fb571201e7
commit 78a6c64069
5 changed files with 98 additions and 23 deletions

View File

@ -1,3 +1,12 @@
2002-06-11 David Turner <david@freetype.org>
* builds/win32/ftdebug.c: added a missing #endif
* src/sfnt/ttload.c, src/bdf/bdflib.c: removing compiler warnings
* src/type42/t42objs.c: removed the bug that prevented un-hinted
outlines to be loaded
2002-06-08 Juliusz Chroboczek <jch@pps.jussieu.fr>
* include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,

View File

@ -45,7 +45,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "..\..\..\objs\release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /MD /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# ADD CPP /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@ -69,7 +69,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "..\..\..\objs\debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /MDd /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# ADD CPP /MDd /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@ -94,7 +94,7 @@ LIB32=link.exe -lib
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
# SUBTRACT BASE CPP /X
# ADD CPP /MTd /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# ADD CPP /MTd /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206MT_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@ -118,7 +118,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "..\..\..\objs\release_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
# ADD CPP /MT /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# ADD CPP /MT /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206MT.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@ -143,7 +143,7 @@ LIB32=link.exe -lib
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /Za /W4 /Gm- /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# ADD CPP /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@ -152,7 +152,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype206ST.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype211ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@ -169,7 +169,7 @@ LIB32=link.exe -lib
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT BASE CPP /X /YX
# ADD CPP /Za /W4 /Gm- /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# ADD CPP /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@ -178,7 +178,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype206ST_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype211ST_D.lib"
!ENDIF
@ -196,79 +196,113 @@ LIB32=link.exe -lib
# Begin Source File
SOURCE=..\..\..\src\autohint\autohint.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\bdf\bdf.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cff\cff.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftbase.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cache\ftcache.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\ftdebug.c
# ADD CPP /Ze
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftglyph.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftinit.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftmm.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftsystem.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pcf\pcf.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psaux\psaux.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pshinter\pshinter.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psnames\psmodule.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\raster\raster.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\sfnt\sfnt.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\smooth\smooth.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\truetype\truetype.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type1\type1.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cid\type1cid.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type42\type42.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\winfonts\winfnt.c
# SUBTRACT CPP /Fr
# End Source File
# End Group
# Begin Group "Header Files"
@ -294,6 +328,10 @@ SOURCE=..\..\..\include\freetype\config\ftmodule.h
SOURCE=..\..\..\include\freetype\config\ftoption.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftstdlib.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -1772,14 +1772,14 @@
/* Determine the overall font bounding box as the characters are */
/* loaded so corrections can be done later if indicated. */
p->maxas = MAX( glyph->bbx.ascent, p->maxas );
p->maxds = MAX( glyph->bbx.descent, p->maxds );
p->maxas = (FT_Short) MAX( glyph->bbx.ascent, p->maxas );
p->maxds = (FT_Short) MAX( glyph->bbx.descent, p->maxds );
p->rbearing = (short)( glyph->bbx.width + glyph->bbx.x_offset );
p->maxrb = MAX( p->rbearing, p->maxrb );
p->minlb = MIN( glyph->bbx.x_offset, p->minlb );
p->maxlb = MAX( glyph->bbx.x_offset, p->maxlb );
p->maxrb = (FT_Short) MAX( p->rbearing, p->maxrb );
p->minlb = (FT_Short) MIN( glyph->bbx.x_offset, p->minlb );
p->maxlb = (FT_Short) MAX( glyph->bbx.x_offset, p->maxlb );
if ( !( p->flags & _BDF_DWIDTH ) )
{
@ -2165,12 +2165,12 @@
shift >>= 1;
}
shift = ( bitcount > 3 ) ? 8 : ( 1 << bitcount );
shift = (FT_UShort)(( bitcount > 3 ) ? 8 : ( 1 << bitcount ));
if ( p->font->bpp > shift || p->font->bpp != shift )
{
/* select next higher value */
p->font->bpp = shift << 1;
p->font->bpp = (FT_UShort)(shift << 1);
FT_TRACE2(( "_bdf_parse_start: " ACMSG11, p->font->bpp ));
}
}

View File

@ -1049,7 +1049,7 @@
FT_TRACE2(( "loaded\n" ));
/* everything went well, update face->num_names */
face->num_names = table->numNameRecords;
face->num_names = (FT_UShort) table->numNameRecords;
Exit:
return error;

View File

@ -252,6 +252,8 @@
if ( error )
goto Exit;
FT_Done_Size( face->ttf_face->size );
/* Ignore info in FontInfo dictionary and use the info from the */
/* loaded TTF font. The PostScript interpreter also ignores it. */
root->bbox = face->ttf_face->bbox;
@ -635,6 +637,8 @@
error = FT_New_Size( t42face->ttf_face, &ttsize );
size->ttsize = ttsize;
FT_Activate_Size( ttsize );
return error;
}
@ -701,6 +705,17 @@
}
static void
t42_check_size_change( FT_Face face )
{
FT_Face tt_face = ((T42_Face)face)->ttf_face;
FT_Size tt_size = ((T42_Size)face->size)->ttsize;
if ( tt_face->size != tt_size )
FT_Activate_Size( tt_size );
}
FT_LOCAL_DEF( FT_Error )
T42_Size_SetChars( T42_Size size,
FT_F26Dot6 char_width,
@ -712,6 +727,8 @@
T42_Face t42face = (T42_Face)face;
t42_check_size_change( t42face->ttf_face );
return FT_Set_Char_Size( t42face->ttf_face,
char_width,
char_height,
@ -729,6 +746,9 @@
T42_Face t42face = (T42_Face)face;
t42_check_size_change( t42face->ttf_face );
return FT_Set_Pixel_Sizes( t42face->ttf_face,
pixel_width,
pixel_height );
@ -749,9 +769,9 @@
}
/* clear all public fields in the glyph slot */
FT_MEM_SET( &slot->metrics, 0, sizeof ( slot->metrics ) );
FT_MEM_SET( &slot->outline, 0, sizeof ( slot->outline ) );
FT_MEM_SET( &slot->bitmap, 0, sizeof ( slot->bitmap ) );
FT_ZERO( &slot->metrics );
FT_ZERO( &slot->outline );
FT_ZERO( &slot->bitmap );
slot->bitmap_left = 0;
slot->bitmap_top = 0;
@ -776,8 +796,10 @@
FT_Error error;
T42_GlyphSlot t42slot = (T42_GlyphSlot)glyph;
T42_Size t42size = (T42_Size)size;
FT_Face tt_face = ((T42_Face) glyph->face)->ttf_face;
FT_Driver_Class ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz;
t42_check_size_change( tt_face );
ft_glyphslot_clear( t42slot->ttslot );
error = ttclazz->load_glyph( t42slot->ttslot,
@ -798,6 +820,12 @@
glyph->bitmap = t42slot->ttslot->bitmap;
glyph->bitmap_left = t42slot->ttslot->bitmap_left;
glyph->bitmap_top = t42slot->ttslot->bitmap_top;
glyph->num_subglyphs = t42slot->ttslot->num_subglyphs;
glyph->subglyphs = t42slot->ttslot->subglyphs;
glyph->control_data = t42slot->ttslot->control_data;
glyph->control_len = t42slot->ttslot->control_len;
}
return error;