forked from minhngoc25a/freetype2
* src/autofit/aflatin.c (af_latin_hint_edges),
src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c (af_cjk_hint_edges): Protect against division by zero.
This commit is contained in:
parent
05bf6877a4
commit
b6fa845146
|
@ -1,3 +1,9 @@
|
|||
2008-12-21 Hongbo Ni <hongbo@njstar.com>
|
||||
|
||||
* src/autofit/aflatin.c (af_latin_hint_edges),
|
||||
src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
|
||||
(af_cjk_hint_edges): Protect against division by zero.
|
||||
|
||||
2008-12-18 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* docs/CHANGES: Updated.
|
||||
|
|
|
@ -1253,10 +1253,15 @@
|
|||
else if ( after >= edge_limit )
|
||||
af_cjk_align_serif_edge( hints, before, edge );
|
||||
else
|
||||
edge->pos = before->pos +
|
||||
FT_MulDiv( edge->fpos - before->fpos,
|
||||
after->pos - before->pos,
|
||||
after->fpos - before->fpos );
|
||||
{
|
||||
if ( after->fpos == before->fpos )
|
||||
edge->pos = before->pos;
|
||||
else
|
||||
edge->pos = before->pos +
|
||||
FT_MulDiv( edge->fpos - before->fpos,
|
||||
after->pos - before->pos,
|
||||
after->fpos - before->fpos );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2008,7 +2008,10 @@
|
|||
if ( before >= edges && before < edge &&
|
||||
after < edge_limit && after > edge )
|
||||
{
|
||||
edge->pos = before->pos +
|
||||
if ( after->opos == before->opos )
|
||||
edge->pos = before->pos;
|
||||
else
|
||||
edge->pos = before->pos +
|
||||
FT_MulDiv( edge->opos - before->opos,
|
||||
after->pos - before->pos,
|
||||
after->opos - before->opos );
|
||||
|
|
|
@ -2153,7 +2153,10 @@
|
|||
if ( before >= edges && before < edge &&
|
||||
after < edge_limit && after > edge )
|
||||
{
|
||||
edge->pos = before->pos +
|
||||
if ( after->opos == before->opos )
|
||||
edge->pos = before->pos;
|
||||
else
|
||||
edge->pos = before->pos +
|
||||
FT_MulDiv( edge->opos - before->opos,
|
||||
after->pos - before->pos,
|
||||
after->opos - before->opos );
|
||||
|
|
Loading…
Reference in New Issue