[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] glyphs with no pixels are not tolerated by the renderers
From: |
Graham Asher |
Subject: |
[Devel] glyphs with no pixels are not tolerated by the renderers |
Date: |
Mon, 13 Jan 2003 14:56:36 -0000 |
Working on the GhostScript-to-FreeType bridge today I found that a certain
PostScript file was failing because it contained glyphs with outlines that
produced empty bitmaps. The problem is that in ft_raster1_render in
ftrend1.c, the statement
if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
goto Exit;
creates a buffer into which the bitmap is rendered. It succeeds if (pitch *
height) is zero, but of course in that case bitmap->buffer remains null. The
function ft_black_render in ftraster.c is then called, but it returns an
error when running this statement:
if ( !target_map || !target_map->buffer )
return Raster_Err_Invalid;
My fix is to change lines 194-5 of ftrend1.c from
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
to
/* render outline into the bitmap if outline is of non-zero size */
if ( bitmap->buffer )
error = render->raster_render( render->raster, ¶ms );
This solves the problem.
Also, although no difficulty has occurred with anti-aliased rendering, I
suggest making the same change to ftsmooth.c: lines 198-199 are also changed
to exactly the same replacement lines.
I'd be grateful for comments or suggestions of a simpler fix.
Graham Asher
- [Devel] EPOC and true type fonts, Amir Kamal, 2003/01/02
- RE: [Devel] EPOC and true type fonts, Graham Asher, 2003/01/05
- [Devel] unpatented hinting system for Dynalab fonts, etc, Graham Asher, 2003/01/07
- Re: [Devel] unpatented hinting system for Dynalab fonts, etc, David Turner, 2003/01/08
- RE: [Devel] unpatented hinting system for Dynalab fonts, etc, Graham Asher, 2003/01/08
- [Devel] glyphs with no pixels are not tolerated by the renderers,
Graham Asher <=
- [Devel] RE: glyphs with no pixels are not tolerated by the renderers, Graham Asher, 2003/01/14
- Re: [Devel] glyphs with no pixels are not tolerated by the renderers, Werner LEMBERG, 2003/01/15
- Re: [Devel] glyphs with no pixels are not tolerated by the renderers, David Turner, 2003/01/16
- RE: [Devel] glyphs with no pixels are not tolerated by the renderers, Graham Asher, 2003/01/16
- [Devel] pixel size, hinting and scaling, Graham Asher, 2003/01/14
- Re: [Devel] pixel size, hinting and scaling, David Turner, 2003/01/16
- RE: [Devel] pixel size, hinting and scaling, Graham Asher, 2003/01/17
- Re: [Devel] pixel size, hinting and scaling, David Turner, 2003/01/17
- RE: [Devel] pixel size, hinting and scaling, Graham Asher, 2003/01/17
- Re: [Devel] pixel size, hinting and scaling, David Turner, 2003/01/17