Jeff Kelm wrote: > That fix solves the problem as described for sure. I've just noticed > though that com.lowagie.text.Phrase#add(int, Object) would have to be > updated with a similar fix.
OK. > The only potential issue I can see is that a Phrase (or subclass) no > longer guarantees that all its contained Chunk elements have a > HYPHENATION attribute that matches the Phrase's. If you have a phrase with mixed languages, you need to be able to add one chunk with different hyphenation rules. The whole Phrase can be in English, except for one Chunk in French (for instance). I've read the scenario's, but if they cause a problem, it can be solved by redesigning the application. > What if the problem was examined from a different angle? What if the > definition of 'empty' in a Chunk is too strict? Is it necessary that a > Chunk's attributes field be null for a Chunk to be 'empty', or is empty > content all that's required? If this is the case, you'd only have to > update Chunk#isEmpty() (and potentially Phrase#setHyphenation() as per > Scenario 2 above). The attributes are also used for some specific types of Chunks that don't have content, but that aren't empty. For instance: chunks that cause a page break, "glue" chunks, etc... But the idea is good. Maybe we can add some "fake" content in these cases; so that we only have to check the content. I've applied the fix to the other add() method, but I'll put your other idea on my TODO list. br, Bruno ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
