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 bu...@apache.org on 2009/11/11 22:39:51 UTC

DO NOT REPLY [Bug 48182] New: NPE when resolving subsitutions for arabic script

https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

           Summary: NPE when resolving subsitutions for arabic script
           Product: Batik
           Version: 1.8
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Utilities
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: torarnv@gmail.com


Created an attachment (id=24520)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24520)
Quick fix, dunno if it's safe to proceed if only one or two of the tree
subsitutions were found, so I opted for the tripple-check, feel free to change.

ttf2svg crashes with NPE when processing DejaVuSans-Oblique from
http://dejavu.sourceforge.net/

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48182] [PATCH] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

--- Comment #8 from Tor Arne Vestbø <to...@gmail.com> 2010-09-06 07:05:16 EDT ---
(In reply to comment #7)
> (In reply to comment #1)
> > Actually the SVG produced seems to be broken, or at least missing tons of
> > glyphs [...]
> 
> The miss of many glyphs probably has to do with not specifying the "-autorange"
> parameter (shown in command line but currently undocumented in the previous
> stated link [1], I'm working on it). Adding that to the command line makes
> Batik to try determining the glyphs in the font instead of using defaults
> (which seem range 32 to 128), which would explain the missing characters. :-)
> 
> Again, try it as well and report back. ;-)
> 
> [1] http://xmlgraphics.apache.org/batik/tools/font-converter.html

Your updated patch + '-autorange' seems to work fine here. Thanks!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24520|0                           |1
        is obsolete|                            |

--- Comment #5 from Helder Magalhães <he...@gmail.com> 2010-09-04 08:01:25 EDT ---
Created an attachment (id=25987)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25987)
Proposed fix v2

(In reply to comment #0)
> Quick fix, dunno if it's safe to proceed if only one or two of the tree
> subsitutions were found, so I opted for the tripple-check, feel free to change.

Yes, I've checked that the code later invoked in getGlyphAsSVG verifies each of
them independently, so I've updated your patch proposal so that the checks are
also independently made. :-)

I've verified that, with the patch applied, the issue no longer occurs,
although I'd like you to confirm it as well before committing it.

@Keith Grennan
Please confirm that the patch fixes the issue with your problematic font,
otherwise please attach it as requested in comment 3. ;-)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

--- Comment #1 from Tor Arne Vestbø <to...@gmail.com> 2009-11-11 14:06:48 UTC ---
Actually the SVG produced seems to be broken, or at least missing tons of
glyphs, so the fix fix might not be correct (it only fixes the NPE).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

Keith Grennan <ke...@nearlyfree.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keith@nearlyfree.org

--- Comment #2 from Keith Grennan <ke...@nearlyfree.org> 2010-09-03 19:00:16 EDT ---
I hit this exact same bug, NPE.  Only for me it was on a font which I had
processed with a subsetting tool (font-optimizer). I ended up applying the
exact same patch to my local batik. Would be great to see this fix released.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

--- Comment #3 from Helder Magalhães <he...@gmail.com> 2010-09-04 06:33:55 EDT ---
(In reply to comment #2)
> I hit this exact same bug, NPE.  Only for me it was on a font which I had
> processed with a subsetting tool (font-optimizer).

Are you able to attach the problematic font for further testing?


> I ended up applying the
> exact same patch to my local batik. Would be great to see this fix released.

Thanks for confirming that the patch works around the issue. Currently, I was
mostly trying to figure out if checking/setting each of the three variables
would help avoiding too much information lost whenever only of them is missing.
;-)


Thanks,
 Helder

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

Tor Arne Vestbø <to...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24520|application/octet-stream    |text/plain
          mime type|                            |
  Attachment #24520|0                           |1
           is patch|                            |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

--- Comment #4 from Helder Magalhães <he...@gmail.com> 2010-09-04 06:37:38 EDT ---
(In reply to comment #0)
> ttf2svg crashes with NPE when processing DejaVuSans-Oblique from
> http://dejavu.sourceforge.net/

(In reply to comment #1)
> Actually the SVG produced seems to be broken, or at least missing tons of
> glyphs, so the fix fix might not be correct (it only fixes the NPE).

Thanks for the report. Are you able to provide the particular command line used
in the conversion, including parameters [1], in order to help reproducing the
issue?

Thanks,
 Helder


[1] http://xmlgraphics.apache.org/batik/tools/font-converter.html

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] [PATCH] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

--- Comment #7 from Helder Magalhães <he...@gmail.com> 2010-09-06 06:49:13 EDT ---
(In reply to comment #1)
> Actually the SVG produced seems to be broken, or at least missing tons of
> glyphs [...]

The miss of many glyphs probably has to do with not specifying the "-autorange"
parameter (shown in command line but currently undocumented in the previous
stated link [1], I'm working on it). Adding that to the command line makes
Batik to try determining the glyphs in the font instead of using defaults
(which seem range 32 to 128), which would explain the missing characters. :-)

Again, try it as well and report back. ;-)

[1] http://xmlgraphics.apache.org/batik/tools/font-converter.html

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] [PATCH] NPE when resolving subsitutions for arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable
            Summary|NPE when resolving          |[PATCH] NPE when resolving
                   |subsitutions for arabic     |subsitutions for arabic
                   |script                      |script
         OS/Version|Mac OS X 10.4               |All

--- Comment #6 from Helder Magalhães <he...@gmail.com> 2010-09-04 08:06:08 EDT ---
(In reply to comment #5)
> I've verified that, with the patch applied, the issue no longer occurs [...]

By the way, the command line during testing was:
  build ttf2svg DejaVuSans-Oblique.ttf -testcard

I'm also adjusting the bug's title/metadata to reflect a patch being available,
as well as assuming operating system as "All", as I was able to reproduce in
Windows as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 48182] [PATCH] NPE when resolving substitutions for Arabic script

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48182

Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Summary|[PATCH] NPE when resolving  |[PATCH] NPE when resolving
                   |subsitutions for arabic     |substitutions for Arabic
                   |script                      |script

--- Comment #9 from Helder Magalhães <he...@gmail.com> 2010-09-12 17:11:28 EDT ---
Committed in revision 996358 [1].

Thanks, everyone, for the help. :-)

[1] http://svn.eu.apache.org/viewvc?view=revision&revision=996358

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org