[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Minor Type1/Type42 bug in treatment of PaintType/StrokeWidth att
From: |
Galen Wright-Watson |
Subject: |
[Devel] Minor Type1/Type42 bug in treatment of PaintType/StrokeWidth attributes |
Date: |
Wed, 1 Oct 2003 22:48:53 -0700 (PDT) |
It seems Freetype-2.1.5 is inconsisent in its treatment of the PaintType
and StrokeWidth attributes for Type1 and Type42 fonts. At
(e.g.) src/type1/t1tokens.h:70, the paint_type field is defined as an
integer for parsing, but in include/freetype/internal/t1types.h:111 it's
defined as a FT_Byte*. At src/type1/t1objs.c:232, paint_type is freed
(through FT_FREE), which produced a "warning: junk pointer, too low to
make sense" when fc-cache (running under FreeBSD 2.2.6 [yeah, I
know]) processed some fonts that set PaintType to a non-0 value. The
stroke_width field had the same issue. I went with the Type1 spec and:
* redefined paint_type and stroke_width in t1types.h to FT_Int and
FT_Float, respectively,
* removed the FT_FREE calls for paint_type and stroke_width in
src/type1/t1obj.c and src/type42/t42obj.c
See attached patch for the changes. After rebuilding freetype, fc-cache
no longer produced any errors. I've only been playing with freetype for
the last few days, so I need to know if I did the right thing or if I
should play with it more (i.e. change parser's treatment of paint_type &
stroke_width in t1tokens.h).
patch-type1-42
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Devel] Minor Type1/Type42 bug in treatment of PaintType/StrokeWidth attributes,
Galen Wright-Watson <=