Fix serious scaling bug in `FT_Get_Advances'.
* src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by `FT_Load_Glyph' must be simply multiplied by 1024.
This commit is contained in:
parent
96fcf87b75
commit
2fb22d5649
|
@ -1,3 +1,10 @@
|
||||||
|
2011-12-08 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix serious scaling bug in `FT_Get_Advances'.
|
||||||
|
|
||||||
|
* src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by
|
||||||
|
`FT_Load_Glyph' must be simply multiplied by 1024.
|
||||||
|
|
||||||
2011-12-08 Werner Lemberg <wl@gnu.org>
|
2011-12-08 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
|
* src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Quick computation of advance widths (body). */
|
/* Quick computation of advance widths (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2008, 2009 by */
|
/* Copyright 2008, 2009, 2011 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
{
|
{
|
||||||
error = func( face, start, count, flags, padvances );
|
error = func( face, start, count, flags, padvances );
|
||||||
if ( !error )
|
if ( !error )
|
||||||
goto Exit;
|
return _ft_face_scale_advances( face, padvances, count, flags );
|
||||||
|
|
||||||
if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) )
|
if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) )
|
||||||
return error;
|
return error;
|
||||||
|
@ -147,16 +147,13 @@
|
||||||
if ( error )
|
if ( error )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* scale from 26.6 to 16.16 */
|
||||||
padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
|
padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
|
||||||
? face->glyph->advance.y
|
? face->glyph->advance.y << 10
|
||||||
: face->glyph->advance.x;
|
: face->glyph->advance.x << 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( error )
|
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
Exit:
|
|
||||||
return _ft_face_scale_advances( face, padvances, count, flags );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue