Summary: | [PATCH] Errors in the calculation of adjustment factors | ||
---|---|---|---|
Product: | Fop - Now in Jira | Reporter: | Luca Furini <lfurini> |
Component: | page-master/layout | Assignee: | fop-dev |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | trunk | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: |
only a block of justified text to see the calculated adjustments
a few println in the old code to show the calculated adjustments proposed changes to the formulas and some println patch to pdf renderer, so that it uses the adjustment factor |
Description
Luca Furini
2004-04-01 15:55:22 UTC
Created attachment 11083 [details]
only a block of justified text to see the calculated adjustments
Created attachment 11084 [details]
a few println in the old code to show the calculated adjustments
Created attachment 11085 [details]
proposed changes to the formulas and some println
Excellent work. Text justification is one of FOP development priorities. Priorities for layout work are defined here: http://xml.apache.org/fop/design/layout.html#status-todo I went through a similar thought process to you when I analysed the code in Text and Line LMs. I'm taking a closer look at your patch now. I believe the reason why justification still doesnt work after correcting the issues you've found is because TextLM.addAreas doesnt create separate areas for each word - it creates one big area in some cases for whole line, so there is no opportunity to add space adjust for justification. Your patch looks like it is the first piece of the puzzle to get Justification working Patch applied, many thanks. Hi again I have tried to make PDFRenderer use the adjustment factor without splitting the text in different areas, and it seems it now works (except when hyphenation is done, but that's another bug). Only a quick note: as the pdf operator controlling space adjust (Tw) can take a float, space adjustment could be stored as double instead of casting it into an int. I am going to attach the suggested patch. Bye Luca Created attachment 11134 [details]
patch to pdf renderer, so that it uses the adjustment factor
Hi Luca, thanks for your new suggested patch. Since this bug is closed I have created a new bug for your new patch. http://issues.apache.org/bugzilla/show_bug.cgi?id=28208 batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed |