truetype: Truncate the deltas of composite glyph at 16-bit values.
This commit is contained in:
parent
1b6f1d20b5
commit
9206eba291
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
|
truetype: Truncate the deltas of composite glyph at 16-bit values.
|
||||||
|
|
||||||
|
* src/truetype/ttgload.c (load_truetype_glyph):
|
||||||
|
Insert cast from FT_Long (deltas[i].{x,y}) to
|
||||||
|
FT_Int16 in the summation of deltas[] for composite
|
||||||
|
glyphs. Because deltas[i] is typed as FT_Pos,
|
||||||
|
its component x, y are typed as FT_Long, but
|
||||||
|
their sources are always FT_Int16 when they are
|
||||||
|
loaded by ft_var_readpackeddeltas(). However,
|
||||||
|
the limitation about the summed deltas is unclear.
|
||||||
|
|
||||||
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
truetype: Truncate the instructions upto 16-bit per a glyph.
|
truetype: Truncate the instructions upto 16-bit per a glyph.
|
||||||
|
|
|
@ -1400,8 +1400,11 @@
|
||||||
{
|
{
|
||||||
if ( subglyph->flags & ARGS_ARE_XY_VALUES )
|
if ( subglyph->flags & ARGS_ARE_XY_VALUES )
|
||||||
{
|
{
|
||||||
subglyph->arg1 += deltas[i].x;
|
/* XXX: overflow check for subglyph->{arg1,arg2}. */
|
||||||
subglyph->arg2 += deltas[i].y;
|
/* deltas[i].{x,y} must be within signed 16-bit, */
|
||||||
|
/* but the restriction of summed delta is not clear */
|
||||||
|
subglyph->arg1 += (FT_Int16)deltas[i].x;
|
||||||
|
subglyph->arg2 += (FT_Int16)deltas[i].y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue