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=27773>. 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=27773 [PATCH] Hyphenation ------- Additional Comments From [EMAIL PROTECTED] 2004-04-09 09:28 ------- Hi Luca, Your patch looks good. It works fine on your test fo, and it also works fine on a test fo I had lying around. There are a few things to note: AreaInfo.bHyphenated is identical to (flags & BreakPoss.HYPHENATED); ai.ipdArea = MinOptMax.add(ai.ipdArea, new MinOptMax(hyphIPD)) is equivalent to bp.setStackingSize(MinOptMax.add(ipd, new MinOptMax(hyphIPD))). In other words, the same information is present in the BreakPoss, which is held by the LineLM. Unfortunately, this information is not accessible in the addAreas method of TextLM. This is so because posIter.next() returns the position member of the BreakPoss, not the BreakPoss itself. I believe that is an error in PositionIterator which eventually needs correction. For now your solution is a good one. Your proposed TextInfo.hypChar is also known as LineLM.hyphProps.hyphenationChar. This information is not passed on to childLMs and thus not known to TextLM. Storing it in TextInfo seems a good idea; perhaps it is not even needed in hyphProps. It is not completely clear that + if (ai.bHyphenated) { + str += foText.textInfo.hyphChar; + ai.ipdArea = MinOptMax.add(ai.ipdArea, new MinOptMax(hyphIPD)); + } is always correct. This happens on the last AI returned by posIter.next(), which is not necessarily the last one in the line. But it is hard to conceive of an AI which is last in its LM and also hyphenated; therefore it will work. Ideally, the LineLM indicates which BP is the one ending the line; perhaps this needs correction at some time. Regards, Simon