You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Eric Bloch <bl...@laszlosystems.com> on 2003/08/25 22:45:04 UTC

bug fix for ttf parsing code in 1.5

(I sent a copy of this note to david@steadystate.co.uk, and filed bug 22713 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22713)

The ttf file that shows the bug is attached to the bug


------------------------------------

I've been using your totally excellent java ttf parsing code and found a small 
bug in GlyfCompositeDescript.java that showed up recently.  Here's the fix 
(pardon my emailer for wrapping 79 cols)


diff GlyfCompositeDescript.java /c/downloads/GlyfCompositeDescript.java
35,39c35,36
<             GlyfDescript desc =
parentTable.getDescription(comp.getGlyphIndex(
));
<             if (desc != null) {
<                 firstIndex += desc.getPointCount();
<                 firstContour += desc.getContourCount();
<             }
---
 >             firstIndex += 
parentTable.getDescription(comp.getGlyphIndex()).getPointCount();
 >             firstContour += 
parentTable.getDescription(comp.getGlyphIndex()).getContourCount();


I've attached a ttf file that required this fix to your parser.

Much thanks and let me know if there's some easy way for me to get this 
intrgrated into a batik release.



-Eric


-- 

Eric Bloch
Laszlo Systems, Inc.
1040 Mariposa Street, SF, CA 94107

voice: 415.241.2721
fax:   415.865.2914
email: bloch@lzlo.com

---

Laszlo allows Behr to deliver a breakthrough experience with ColorSmart by
BEHR application.

http://www.behr.com


-- 
Eric Bloch
Laszlo Systems, Inc.
1040 Mariposa Street, SF, CA 94107

voice: 415.241.2721
fax:   415.865.2914
email: bloch@lzlo.com

---

Laszlo allows Behr to deliver a breakthrough experience with ColorSmart by
BEHR application.

http://www.behr.com





---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Re: bug fix for ttf parsing code in 1.5

Posted by Thomas DeWeese <Th...@Kodak.com>.
Eric Bloch wrote:
> (I sent a copy of this note to david@steadystate.co.uk, and filed bug 
> 22713 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22713)
> 
> The ttf file that shows the bug is attached to the bug
> 
> 
> ------------------------------------
> 
> I've been using your totally excellent java ttf parsing code and found a 
> small bug in GlyfCompositeDescript.java that showed up recently.  Here's 
> the fix (pardon my emailer for wrapping 79 cols)
> 
> 
> diff GlyfCompositeDescript.java /c/downloads/GlyfCompositeDescript.java
> 35,39c35,36
> <             GlyfDescript desc =
> parentTable.getDescription(comp.getGlyphIndex(
> ));
> <             if (desc != null) {
> <                 firstIndex += desc.getPointCount();
> <                 firstContour += desc.getContourCount();
> <             }
> ---
>  >             firstIndex += 
> parentTable.getDescription(comp.getGlyphIndex()).getPointCount();
>  >             firstContour += 
> parentTable.getDescription(comp.getGlyphIndex()).getContourCount();
> 
> 
> I've attached a ttf file that required this fix to your parser.
> 
> Much thanks and let me know if there's some easy way for me to get this 
> intrgrated into a batik release.

    Consider it done,  however looking at the code it would appear that
lots of other stuff will fail if any real work is done with the generated
GlyfCompositeDescript.  Do you have any idea why this doesn't die later?
Does the ttf2svg not translate ligatures perhaps?

    Anyway thanks for forwarding the patch.




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org