Re: Patching with GIT/SVN (Re: Making MinOptMax Immutable)

2009-11-04 Thread Alexander Kiel
Hi Max, One more thing I noticed: Alex, you are introducing deprecated methods and then using them. Please either - don't mark the methods as deprecated, if they are valid helper methods or - don't use the deprecated methods, but rather use whatever you inted to replace it with. I marked

Re: Patching with GIT/SVN (Re: Making MinOptMax Immutable)

2009-10-29 Thread Alexander Kiel
. References: [1] http://wiki.apache.org/general/GitAtApache [2] git://git.apache.org/fop.git [3] http://tomayko.com/writings/the-thing-about-git [4] http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#sharing-your-changes hth Max Alexander Kiel schrieb: Hi

Re: Making MinOptMax Immutable

2009-10-27 Thread Alexander Kiel
Hi, a issued a patch for MinOptMax: https://issues.apache.org/bugzilla/show_bug.cgi?id=48071 Please read my first comment there and consider my patch :-) Best Regards Alex On Sun, 2009-10-25 at 23:45 +0100, Alexander Kiel wrote: Hi, the class MinOptMax has some 800 usages in FOP. It holds

Class comment of org.apache.fop.fo.properties.SpaceProperty misleading

2009-10-25 Thread Alexander Kiel
Hi, The class comment of org.apache.fop.fo.properties.SpaceProperty says: Base class used for handling properties of the fo:space-before and fo:space-after variety. It is extended by org.apache.fop.fo.properties.GenericSpace, which is extended by many other properties. But it isn't extended by

Update qdox-1.6.3.jar to qdox-1.10.jar

2009-10-25 Thread Alexander Kiel
Hi, can we update QDox from 1.6.3 to 1.10? I have an issue with QDox 1.6.3: It can't parse my Fixed16 class (which I have attached to this mail). The problem is in line 35: private static final float DENOMINATOR = (float) (1 14); It can't parse the shift operator. QDox 1.10 works fine.

Problem in PageBreakingAlgorithm Constructor

2009-10-25 Thread Alexander Kiel
Hi, the constructor of the class PageBreakingAlgorithm looks like this: public PageBreakingAlgorithm(LayoutManager topLevelLM, PageProvider pageProvider, PageBreakingLayoutListener layoutListener,

Making MinOptMax Immutable

2009-10-25 Thread Alexander Kiel
Hi, the class MinOptMax has some 800 usages in FOP. It holds a triple of values (min, opt, max) of length quantities. It's heavily used during local computations and passing around. It's fields are public (whereas the class comment says they are only package visible). The public fields (and

Re: NPE when using non-base14 font via IF XML

2009-10-07 Thread Alexander Kiel
Hi Vincent, To reproduce: put the config file at the root of a FOP local copy, then run the following: fop -c config.xconf test.fo -if if.xml fop -c config.xconf -ifin if.xml test.pdf I would like to run your example this way, but there is no fop.sh. Is there such a thing for the

Re: NPE when using non-base14 font via IF XML

2009-10-07 Thread Alexander Kiel
Hi Vincent, The script is called just fop. Look at the root of the project, it’s actually a shell script. http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop?view=log oh I was just blind. Thanks. Alex signature.asc Description: This is a digitally signed message part

Re: NPE when using non-base14 font via IF XML

2009-10-07 Thread Alexander Kiel
Regards Alex On 07.10.2009 14:42:52 Alexander Kiel wrote: Hi Vincent, I get a completely different error. If I ran fop -c config.xconf test.fo -if if.xml There is no output - so it seems to run fine. If I run fop -c config.xconf -ifin if.xml test.pdf afterwards

Re: Checkstyle RedundantThrowsCheck

2009-10-02 Thread Alexander Kiel
Hi Max, DISCLAIMER: These comments are to be seen as purely academic, and may be complete overkill. For practical purposes, your code is just fine. No, its ok, I like code reviews. - value is a very generic name, and could be reconsidered. What does the value actually specify? Looking at

Re: Writing PDF Documents and other source code parts

2009-10-02 Thread Alexander Kiel
to embed a TrueType CID font. TrueType tables needed for embedded CID fonts are: head, hhea, loca, maxp, cvt , prep, glyf, hmtx and fpgm. BTW, have you submitted your ICLA? 155 new classes... We’re gonna need one :-) No not yet. Best Regards Alex Alexander Kiel wrote: Hi, I

Re: Checkstyle RedundantThrowsCheck

2009-10-01 Thread Alexander Kiel
Hi Max, The same variable name should ALWAYS refer to the same variable / value. I think, I can second this. For setters and constructors this makes sense - after all, in each of these you have a simple assignment, and both variables will carry the same value. In my attachment Tag.java,

Re: Confused about checkstyle use

2009-10-01 Thread Alexander Kiel
: Hi Alexander, Alexander Kiel wrote: Hi Vincent, Should the rule be disabled because of that? Having proper javadoc on at least public methods is very important. OTOH, this is actually not something Checkstyle can verify. How many methods in the code base have totally useless comments

Javadoc Codestyle

2009-10-01 Thread Alexander Kiel
Hi, do we use code, tt or {...@code}? I found all three version. Is there a Checkstyle for that? Do we introduce a newline between the Javadoc body and the @param, @return or @throws clause? Again I see both: /** * create the /Font object * * @param fontname the internal name

Re: Javadoc Codestyle

2009-10-01 Thread Alexander Kiel
of {...@code} instead of tt and code to the conventions page? Best Regards Alex On Thu, 2009-10-01 at 15:37 +0200, Jeremias Maerki wrote: On 01.10.2009 15:08:55 Vincent Hennebert wrote: Hi Alexander, Alexander Kiel wrote: Hi, do we use code, tt or {...@code}? I found all three version

Re: Javadoc Codestyle

2009-10-01 Thread Alexander Kiel
Hi Jeremias, there is a JavadocStyleCheck. I have it includes in my checkstyle-5.0.xml for testing. I use the standard settings. It tests for empty JavaDoc and missing points in the first line. Yes, but it can't check for that mandatory line between the body and the parameters, right?

Re: Javadoc Codestyle

2009-10-01 Thread Alexander Kiel
Hi Jeremias, While researching I found that I seem to have used @code accidentally in some places but with the actual intention of using @link (see IFDocumentHandler, for example). What a mess. :-( I'll fix that. I've already fixed the obvious mistakes. There are only 23 other

Writing PDF Documents and other source code parts

2009-10-01 Thread Alexander Kiel
Hi, I know my goal is to implement basic OpenType support for FOP. But from font subsetting/embedding my eyes touched the actual PDF output routines. I think, that this module needs refactoring. If you have a look at the PDFWritable interface, there is a really ugly method. The method

Re: Best Interface for reading OpenType Files

2009-09-30 Thread Alexander Kiel
Hi Vincent, I see. I had in mind to use OpenTypeDataInputStream as the common interface. It actually makes sense to use ImageInputStream instead. Simpler and just as flexible. That will add a direct dependency on a class in the javax.imageio package, but this is not a problem as it is part

Re: Confused about checkstyle use

2009-09-30 Thread Alexander Kiel
Hi Max, First, I will respect every code style of FOP. Its just a matter of discussion. Really? That means commenting every public method even simple Getters and Setters? Yes. Simple Getter and Setters are the only place where you can publicly document private variables. (in most cases,

Re: Checkstyle RedundantThrowsCheck

2009-09-30 Thread Alexander Kiel
Hi Vincent, Speaking of that, there’s a rule that I would suggest to disable: the HiddenFieldCheck. I don’t really see its benefit. It forces to find somewhat artificial names for variables, where the field name is exactly what I want. Sometimes a method doesn’t have a name following the

Re: Checkstyle RedundantThrowsCheck

2009-09-30 Thread Alexander Kiel
Hi Max, Speaking of that, there’s a rule that I would suggest to disable: the HiddenFieldCheck. I don’t really see its benefit. It forces to find somewhat artificial names for variables, where the field name is exactly what I want. Sometimes a method doesn’t have a name following the

Re: Confused about checkstyle use

2009-09-30 Thread Alexander Kiel
Hi Vincent, Should the rule be disabled because of that? Having proper javadoc on at least public methods is very important. OTOH, this is actually not something Checkstyle can verify. How many methods in the code base have totally useless comments that are there just to avoid a Checkstyle

Re: Confused about checkstyle use

2009-09-28 Thread Alexander Kiel
Hi Vincent, However, new committed code is not supposed to break any rule, neither warnings nor errors. Really? That means commenting every public method even simple Getters and Setters? Commenting equals(), hashCode() and toString()? I think, this would be only clutter. Best Regards Alex

RE: Confused about checkstyle use

2009-09-28 Thread Alexander Kiel
Regards Alex -Original Message- From: Alexander Kiel [mailto:alexanderk...@gmx.net] Sent: Sunday, September 27, 2009 4:55 PM To: fop-dev@xmlgraphics.apache.org Subject: Re: Confused about checkstyle use Hi Jonathan, did you use the checkstyle-5.0.xml from FOP or the default SUN

Re: Best Interface for reading OpenType Files

2009-09-28 Thread Alexander Kiel
Hi Vincent, Here are my two cents: if you make use of classes in javax.imagio at only one place in your font library, then there’s no need to worry about creating a more neutral layer. If OTOH you need to use those classes everywhere, then it makes sense to use a simplified abstraction

Re: Checkstyle RedundantThrowsCheck

2009-09-27 Thread Alexander Kiel
style important for such a big and shared project like FOP. What's about severities? Did you commit code with checkstyle errors? Best Regards Alex On 26.09.2009 14:41:37 Alexander Kiel wrote: Hi, why didn't our code style allow unchecked exceptions or subclasses of thrown exceptions

Re: Unit Tests in Intellij Idea

2009-09-27 Thread Alexander Kiel
its compiled Java classes. If they are not available through the classpath, no plug-ins are registered and the PDF renderer is basically just a dynamically loaded plug-in. Not sure about the hyphenation problem. It's not happening here. On 25.09.2009 19:27:36 Alexander Kiel wrote: Hi, I

Re: Checkstyle RedundantThrowsCheck

2009-09-27 Thread Alexander Kiel
Hi Jeremias, Makes sense. I stumbled over that myself from time to time but it didn't really bother me so much to take action. Okay. Can you please modify the checkstyle XML files to reflect that? Sure, but only after a period of at least 72 hours to allow the other committers to

Re: Confused about checkstyle use

2009-09-27 Thread Alexander Kiel
Hi Jonathan, did you use the checkstyle-5.0.xml from FOP or the default SUN profile? I'm currently not able to start IDEA, but two days ago as I downloaded the plugin, I noticed that the SUn profile was active and I had to define the FOP profile. And if you define the FOP profile, you will

Checkstyle RedundantThrowsCheck

2009-09-26 Thread Alexander Kiel
Hi, why didn't our code style allow unchecked exceptions or subclasses of thrown exceptions in Javadoc? From checkstyle-5.0.xml: module name=RedundantThrowsCheck property name=allowSubclasses value=false/ property name=allowUnchecked value=false/ property name=severity

Re: Best Interface for reading OpenType Files

2009-09-25 Thread Alexander Kiel
Hi Jeremias, On Fri, 2009-09-25 at 08:37 +0200, Jeremias Maerki wrote: I don't think that relying directly on the ImageIO API is a problem since it's been part of the core Java class library since Java 1.4. It's available in all JVMs that claim to be at least Java 1.4 compliant. I don't

Re: Best Interface for reading OpenType Files

2009-09-25 Thread Alexander Kiel
Hi Vincent, I had a look at SeekableStream and I can imagine how the needs resulted in the ImageInputStream interface. I haven't decided yet if I should use ImageInputStream directly. Maybe someone else can throw it's two cents in here. Here are my two cents: if you make use of classes

Unit Tests in Intellij Idea

2009-09-25 Thread Alexander Kiel
Hi, I search for a possibility to run the unit tests just inside idea. If I let idea compile all the classes, coping the fo files and letting ant generate the source files, it runs 2110 test, but fails 1737 of them. Some of the errors: No IF document handler for the requested format available:

Best Interface for reading OpenType Files

2009-09-24 Thread Alexander Kiel
Hi, I currently thinking about the interface to use for reading OpenType files. There are two possibilities: - reading on top of an InputStream or - reading on top of a RandomAccessFile or FileChannel. Currently the implementation in FOP uses the class FontFileReader which expects an

Re: Best Interface for reading OpenType Files

2009-09-24 Thread Alexander Kiel
Hi Jeremias, On Thu, 2009-09-24 at 21:06 +0200, Jeremias Maerki wrote: Right, and that accounts for a pretty large portion of FOP's memory consumption problem nowadays. With the use of OpenType fonts, this gets worse as they can be quite big. I'm glad you noticed that. Yes, but currently I

Re: ambiguity of grammar for font shorthand?

2009-09-22 Thread Alexander Kiel
Hi, Also, in your message you said we could ignore a value for font of caption, icon, etc., as the standard tells us to do, but the standard discusses these values and their relation to system fonts. Was this an oversight on your part or am I mis-reading the spec? [1] [1]

Re: ambiguity of grammar for font shorthand?

2009-09-22 Thread Alexander Kiel
Hi, I think it is probably the case that in the context of the font short hand – the font properties cannot take the value of inherit, since this renders the grammar irreducibly ambiguous. While such an exclusion is not mentioned in the spec, it makes sense that inherit must be excluded

Re: PDFFontDescriptor Ascent Descent and FontBBox

2009-09-22 Thread Alexander Kiel
defining ascent and descent, but I don't have a reference for it. We would probably need some fonts to test and check. Max 2009/9/21 Alexander Kiel alexanderk...@gmx.net: Hi, as I'm currently on the way to redesign the TrueType/OpenType file reading, from time to time I stumble over some

PDFFontDescriptor Ascent Descent and FontBBox

2009-09-21 Thread Alexander Kiel
Hi, as I'm currently on the way to redesign the TrueType/OpenType file reading, from time to time I stumble over some odd things. But instead of blindly refactoring, I think its better to ask you before. Fonts have among other things the properties ascent, descent and fontBBox which are defined

Re: Volunteering to work on FOP development

2009-09-16 Thread Alexander Kiel
Hi, One area in which FOP needs more work is the compliance with the FO spec, versions 1.0 and 1.1, see http://xmlgraphics.apache.org/fop/compliance.html. For one example: Recently I needed text-align=outside and I would still be happy to have this. Such rather small feature enhancements

Re: State of OpenType Font Implementation

2009-09-15 Thread Alexander Kiel
today, but many OTF fonts have CFF glyph data. So that would be the first priority IMO. On 15.09.2009 09:23:39 Alexander Kiel wrote: Hi, I'm new to the fop-dev list but use FOP for some years already. Recently I tried to use OpenType fonts. As documented FOP doesn't support

Re: State of OpenType Font Implementation

2009-09-15 Thread Alexander Kiel
on Java 1.4. - ensure all junit tests still pass - create a bug report with [patch] in the subject line and attach your patch. Max Alexander Kiel schrieb: Hi Jeremias, ok I think the first step would be to add CFF support into org.apache.fop.fonts.truetype.TTFFile or to split