Re: FOP and XML Graphics Commons Maven artifacts

2007-12-07 Thread Max Berger
Cameron,


On Fre, 2007-12-07 at 08:14 +1100, Cameron McCormack wrote:
  Letting the maven deploy plugin create the correct directory structure
  and needed files is MUCH easier than trying to do this yourself in ant.
  I would therefore recommend the use of maven to deploy the maven
  artifacts.
 
 Understood.  BTW, I see that
 http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/xmlgraphics/fop/maven-metadata.xml
 doesn’t mention the 0.93 release in the versions element (and the same
 for XML Graphics Commons 1.1).  Is that a problem?

I am not sure, but I've fixed it for both of them.

  For the -jdk1.3 versions, i propose to add -jdk13 to the version, e.g.
  
  groupIdorg.apache.xmlgraphics/groupId
  artifactIdxmlgraphics-commons/artifactId
  version1.2-jdk13/version
  
  and respective for fop. 
 OK.  I will do the same for Batik then.

one slight caveat:
* the -jdk13 artifacts should be submitted first, otherwise the
maven-metadata has to be edited to use the version without -jdk13 as the
latest (and then the checksums have to be updated as well)

The real question is whether 1.3 maven artifacts need to be submitted,
as maven itself requires 1.4 to work?


Max


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


DO NOT REPLY [Bug 40465] - Obtain some OpenType fonts for testing

2007-12-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=40465.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40465





--- Additional Comments From [EMAIL PROTECTED]  2007-12-07 05:41 ---
Stixfonts are now available:

www.stixfonts.org

according to their page the license is liberal enough to be included with OSS
projects, but it may be a good idea to check with apache legal.


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


RE: Custom Fonts in Java2DRenderer Hardcoded ColorModel

2007-12-07 Thread Patrick Jaromin
Jeremias-

Excellent, thanks.

No biggie on the time...figured you had other priorities. In any event,
I'll get the paperwork in. This will allow me to remove the ugly hack
version from my own head branch. I'll check on the CCLA -- I'm
authorized to sign for the company on stuff like this, so it's no
problem.

Thanks!

- Patrick


Patrick K. Jaromin
VP Technology
312.943.1600 * fax 312.640.8100
 
JGSullivan Interactive, Inc.
http://JGSullivan.com

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 07, 2007 5:03 AM
To: fop-dev@xmlgraphics.apache.org
Subject: Re: Custom Fonts in Java2DRenderer  Hardcoded ColorModel 

There were a couple of small problems to fix in the PCLRenderer but it
seems to work fine now, even with custom fonts. So from my POV the patch
is ready to be applied. I'll just have to wait for the ICLA.

On 07.12.2007 11:41:07 Jeremias Maerki wrote:
 Patrick,
 
 sorry for the delay. I've taken a first look at your patch. Looks
good.
 The only thing I have changed is moving FontMetricMapper back to 
 render.java2d since no other class in the fonts package deals with AWT

 fonts, yet. And FontMetricMapper would have been the first.
 
 Since your patch contains new files, would you please fill out and 
 submit an ICLA to the Apache Software Foundation? You can find the 
 form
 here: http://www.apache.org/licenses/#clas
 Please also check if your company might need to submit a CCLA, too.
 As soon as I've received notification from the ASF's secretary, I'll 
 commit your patch.
 
 In the meantime, I'll do some more testing.
 
 More inline below...
 
 On 02.12.2007 22:45:13 Patrick Jaromin wrote:
  Jeremias-
  
  Alright. Between the kid's naps, I've managed to create a patch to 
  allow for user-configured fonts in Java2DRenderers. I've tested it 
  with the PNG and TIFF renderers.
  
  A couple things...
  
  1) I've renamed the original FontMetricMapper to 
  SystemFontMetricMapper and created a new interface 
  org.apache.fop.fonts.FontMetricMapper. Then the new implementation

  is called CustomFontMetricMapper, which represents the fonts *not*

  installed on the system but described in the fop config. I looked at

  maintaining the original naming but just didn't like any of the 
  names I could think of. If this won't fly perhaps someone can 
  suggest an alternative naming strategy.
 
 It's fine IMO.
 
  2) I changed the signature of the FontInfo.setup method (the java2d 
  version of that class). It actually now more closely resembles its 
  counterpart. Since the PCLRenderer uses this same class I changed 
  the call there as well. However, I don't know how to test that 
  renderer properly and am just guessing that it would be fine. If 
  not, it would be simple to overload the setup method with the former

  signature and revert PCLRenderer.
 
 I'll do the testing there.
 
  3) I don't really know how to write tests for these changes and so, 
  consequently, I didn't. I used the fop script to output PNG and TIFF

  images with various combinations of settings in my userconfig.xml 
  and it ultimately worked as expected. I'm a pretty big proponent of 
  test-driven development but it wasn't obvious to me how to add new 
  tests -- I'm not familiar with what's setup here and don't have a 
  ton of free time to research it. Let me know if there's something I 
  could read that would help me resolve that quickly.
 
 I know, renderer testing is tricky to do in a way that testing is 
 stable and useful. Therefore we don't do that, yet. We used to have 
 binary comparison for PDF files but that too unstable and people
didn't use it.
 For PDF, PS and Java2D (and related) I can create bitmaps which I can 
 compare visually by hand. For the other formats, this is much more 
 tedious. There just isn't a one solution that fits all cases.
 
  4) A minor thing...I had originally implemented 
  CustomFontMetricsMapper.mapChar() method to simply return the 
  character provided (as the original FontMetricsMapper did). However,

  there is a side-effect in the underlying Typeface implementation 
  delegate - MultiByteFont - of calling it's mapChar() method. If you
  *don'* call it, then embeded fonts (which these are considered 
  since they pass the test (MultiBytFont.isEmbedable()) ) won't 
  work...NPE on getWidth(). I didn't spend much time looking for a 
  solution to this -- I simply delegated the mapChar method to the 
  internal typeface, which solved the problem. I don't think this is 
  wrong, just don't like to leave these side-effect. I could see 
  somehow re-working the definition of embeded font and come up with

  some way to make it so that these fonts aren't classed 
  embeded...though it's probably far more trouble than it's
worth...but thought I'd mention it.
 
 I'll look into it.
 
  I've attached the patch to this message...I apologize if this is 
  problematic but I wanted to check primarily on the FontMetricMapper 
  rename before 

DO NOT REPLY [Bug 44037] - .ClassCastException in FlowLayoutManager

2007-12-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=44037.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44037





--- Additional Comments From [EMAIL PROTECTED]  2007-12-07 04:12 ---
Created an attachment (id=21241)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=21241action=view)
.fo file that fop dies on


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


DO NOT REPLY [Bug 44037] New: - .ClassCastException in FlowLayoutManager

2007-12-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=44037.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44037

   Summary: .ClassCastException in FlowLayoutManager
   Product: Fop
   Version: 0.94
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: fo tree
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: [EMAIL PROTECTED]


I'm trying to process some docbook content to pdf and the fop process is dying
with the below stacktrace.  I'm running fop without any options, just fop
test.fo test.pdf

java.lang.ClassCastException: 
org.apache.fop.layoutmgr.inline.WrapperLayoutManager
at
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:76)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:272)
at
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:554)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:264)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:157)
at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:385)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)

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


Re: svn commit: r602125 - in /xmlgraphics/fop/trunk: lib/ src/java/org/apache/fop/render/ test/resources/META-INF/ test/resources/fonts/

2007-12-07 Thread Jeremias Maerki
Oh, it turns out that I've already checked with the VP legal in May 2006
and it was confirmed that the license is to be considered in the
Category A list. We're ok in that case.

On 07.12.2007 17:41:18 Jeremias Maerki wrote:
 Max,
 
 I think there's something even more important missing: a documentation
 update. :-) Otherwise only those with intimate knowledge of the code
 will be able to use this rather useful feature.
 
 Concerning the font you uploaded: The license is probably (!) ok but
 it's not explicitely on the approved license list:
 http://www.apache.org/legal/3party.html
 (the page is still a draft but represents today's policy)
 
 I'm just saying that because we need to be careful what kind of licenses
 we use in the project. I'm going to write a note to the legal corner of
 the ASF to give them a chance to object in case I've overlooked anything
 in the license. After all, IANAL.
 
 On 07.12.2007 17:33:50 Max Berger wrote:
  Dear Fop-Devs,
  
  this is my first commit, feel free to take it apart :)
  One thing that is missing is the actual testcase - I think it belongs  
  into test/config/test_fonts_autodetect.xconf, but I have no idea what  
  the correct syntax is - DejaVu LGC Serif should be available if  
  everything worked fine.
  
  Max Berger
  e-mail: [EMAIL PROTECTED]
  
  --
  PGP/GnuPG ID: E81592BC   Print: F489F8759D4132923EC4  
  BC7E072AB73AE81592BC
  For information about me or my projects please see http://max.berger.name
  
  
  Am 07.12.2007 um 16:36 schrieb [EMAIL PROTECTED]:
  
   Author: maxberger
   Date: Fri Dec  7 07:36:53 2007
   New Revision: 602125
  
   URL: http://svn.apache.org/viewvc?rev=602125view=rev
   Log:
   Updated xmlgraphics from SVN
   Added autodetection of fonts in jar files (x-font and x-font-truetype)
   Added files needed for testcase
   Please note: Actual testcase is still missing!
 
 snip/
 
 
 Jeremias Maerki
 




Jeremias Maerki



Re: svn commit: r602125 - in /xmlgraphics/fop/trunk: lib/ src/java/org/apache/fop/render/ test/resources/META-INF/ test/resources/fonts/

2007-12-07 Thread Max Berger

Dear Fop-Devs,

this is my first commit, feel free to take it apart :)
One thing that is missing is the actual testcase - I think it belongs  
into test/config/test_fonts_autodetect.xconf, but I have no idea what  
the correct syntax is - DejaVu LGC Serif should be available if  
everything worked fine.


Max Berger
e-mail: [EMAIL PROTECTED]

--
PGP/GnuPG ID: E81592BC   Print: F489F8759D4132923EC4  
BC7E072AB73AE81592BC

For information about me or my projects please see http://max.berger.name


Am 07.12.2007 um 16:36 schrieb [EMAIL PROTECTED]:


Author: maxberger
Date: Fri Dec  7 07:36:53 2007
New Revision: 602125

URL: http://svn.apache.org/viewvc?rev=602125view=rev
Log:
Updated xmlgraphics from SVN
Added autodetection of fonts in jar files (x-font and x-font-truetype)
Added files needed for testcase
Please note: Actual testcase is still missing!


Added:
   xmlgraphics/fop/trunk/test/resources/META-INF/
   xmlgraphics/fop/trunk/test/resources/META-INF/MANIFEST.MF
   xmlgraphics/fop/trunk/test/resources/fonts/DejaVuLGCSerif.LICENSE
   xmlgraphics/fop/trunk/test/resources/fonts/DejaVuLGCSerif.ttf
(with props)

Modified:
   xmlgraphics/fop/trunk/lib/xmlgraphics-commons-1.3svn.jar
   xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ 
PrintRendererConfigurator.java


Modified: xmlgraphics/fop/trunk/lib/xmlgraphics-commons-1.3svn.jar
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/lib/xmlgraphics-commons-1.3svn.jar?rev=602125r1=602124r2=602125view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==

Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ 
PrintRendererConfigurator.java

URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java?rev=602125r1=602124r2=602125view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ 
PrintRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ 
PrintRendererConfigurator.java Fri Dec  7 07:36:53 2007

@@ -50,6 +50,7 @@
import org.apache.fop.fonts.autodetect.FontFileFinder;
import org.apache.fop.fonts.autodetect.FontInfoFinder;
import org.apache.fop.util.LogUtil;
+import org.apache.xmlgraphics.util.ClasspathResource;

/**
 * Base Print renderer configurator (mostly handles font  
configuration)

@@ -159,6 +160,16 @@
} catch (IOException e) {
LogUtil.handleException(log, e, strict);
}
+
+// load fonts from classpath
+ 
addFontInfoListFromFileList(ClasspathResource.getInstance()
+.listResourcesOfMimeType(application/x- 
font),

+fontInfoList, fontResolver, fontCache);
+addFontInfoListFromFileList(
+ClasspathResource.getInstance()
+.listResourcesOfMimeType(
+application/x-font- 
truetype),

+fontInfoList, fontResolver, fontCache);
}

// directory (multiple font) configuration

Added: xmlgraphics/fop/trunk/test/resources/META-INF/MANIFEST.MF
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/resources/META-INF/MANIFEST.MF?rev=602125view=auto
= 
= 
= 
= 
= 
= 
= 
= 
==

--- xmlgraphics/fop/trunk/test/resources/META-INF/MANIFEST.MF (added)
+++ xmlgraphics/fop/trunk/test/resources/META-INF/MANIFEST.MF Fri  
Dec  7 07:36:53 2007

@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+
+Name: fonts/DejaVuLGCSerif.ttf
+Content-Type: application/x-font
+

Added: xmlgraphics/fop/trunk/test/resources/fonts/ 
DejaVuLGCSerif.LICENSE

URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/resources/fonts/DejaVuLGCSerif.LICENSE?rev=602125view=auto
= 
= 
= 
= 
= 
= 
= 
= 
==
--- xmlgraphics/fop/trunk/test/resources/fonts/ 
DejaVuLGCSerif.LICENSE (added)
+++ xmlgraphics/fop/trunk/test/resources/fonts/ 
DejaVuLGCSerif.LICENSE Fri Dec  7 07:36:53 2007

@@ -0,0 +1,98 @@
+Fonts are (c) Bitstream (see below). DejaVu changes are in public  
domain. Glyphs imported from Arev fonts are (c) Tavmjung Bah (see  
below)

+
+Bitstream Vera Fonts Copyright
+--
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.  
Bitstream Vera is

+a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person  
obtaining a copy

+of the fonts accompanying this license (Fonts) and associated
+documentation files (the Font Software), to reproduce and  
distribute the
+Font Software, including without limitation the rights to use,  
copy, merge,
+publish, distribute, and/or sell copies of the Font Software, and  
to 

Re: svn commit: r602125 - in /xmlgraphics/fop/trunk: lib/ src/java/org/apache/fop/render/ test/resources/META-INF/ test/resources/fonts/

2007-12-07 Thread Jeremias Maerki
Max,

I think there's something even more important missing: a documentation
update. :-) Otherwise only those with intimate knowledge of the code
will be able to use this rather useful feature.

Concerning the font you uploaded: The license is probably (!) ok but
it's not explicitely on the approved license list:
http://www.apache.org/legal/3party.html
(the page is still a draft but represents today's policy)

I'm just saying that because we need to be careful what kind of licenses
we use in the project. I'm going to write a note to the legal corner of
the ASF to give them a chance to object in case I've overlooked anything
in the license. After all, IANAL.

On 07.12.2007 17:33:50 Max Berger wrote:
 Dear Fop-Devs,
 
 this is my first commit, feel free to take it apart :)
 One thing that is missing is the actual testcase - I think it belongs  
 into test/config/test_fonts_autodetect.xconf, but I have no idea what  
 the correct syntax is - DejaVu LGC Serif should be available if  
 everything worked fine.
 
 Max Berger
 e-mail: [EMAIL PROTECTED]
 
 --
 PGP/GnuPG ID: E81592BC   Print: F489F8759D4132923EC4  
 BC7E072AB73AE81592BC
 For information about me or my projects please see http://max.berger.name
 
 
 Am 07.12.2007 um 16:36 schrieb [EMAIL PROTECTED]:
 
  Author: maxberger
  Date: Fri Dec  7 07:36:53 2007
  New Revision: 602125
 
  URL: http://svn.apache.org/viewvc?rev=602125view=rev
  Log:
  Updated xmlgraphics from SVN
  Added autodetection of fonts in jar files (x-font and x-font-truetype)
  Added files needed for testcase
  Please note: Actual testcase is still missing!

snip/


Jeremias Maerki



Re: svn commit: r602125 - in /xmlgraphics/fop/trunk: lib/ src/java/org/apache/fop/render/ test/resources/META-INF/ test/resources/fonts/

2007-12-07 Thread Andreas L Delmelle

On Dec 7, 2007, at 18:12, Max Berger wrote:

Hi Max


snip /
Would this go onto the fonts page:
http://xmlgraphics.apache.org/fop/0.94/fonts.html


Yes, but... it would be xmlgraphics.apache.org/fop/trunk/fonts.html

if so, where is the source for this page? Also, I would like to  
test this some more before broadcasting its availability too widely.


You can find the sources under src/documentation/content/xdocs/trunk/ 
fonts.xml


To test the result before committing, you will need to setup Apache  
Forrest, and generate the page/website locally.



HTH!

Andreas