Thanks for replying
The data in my XML is shown as below. I opened the xml in a notepad and I set the font to Times New Roman (TNR) of size 10, then I aligned the text as shown below. The vertical alignment is important.
HBCH HBCH HBCH HBCH
HBCH HBCH HBCH HBCH
abcd bbcd bbcd bbcd
But when I render the PDF (the font is same as it was in notepad which is TNR of size 10), then I noticed that the alignment has changes it’s not properly aligned like the input data, which shows below.
In the notepad for the identical font (used the same font matrix file for PDF rendering). The three rows was properly aligned. But in the PDF the last row was shifted. What cause this different if the same matrix file was used.
From: Glenn Adams [mailto:glenn <at> skynav.com]
Sent: Friday, June 15, 2012 12:06 PM
To: fop-users <at> xmlgraphics.apache.org
Subject: Re: How does FOP prints text lines and spaces between words
In general, different fonts, different line measures (available space to set a line), different properties (e.g., whether to use letter or word spacing), all contribute to the setting of glyphs in a line. Usually, if no letter spacing and no kerning applies, then a word is set on a glyph by glyph basis according to the applicable font's glyph advancement per glyph (a.k.a. character width per character in some contexts).
However, usually kerning is enabled by default, so one will also get variation within a word, even with no letter spacing.
For line breaking and nominal word space calculation (when using justified alignment mode), FOP uses a line breaking algorithm based on Knuth's optimal paragraph breaking found in TeX.
What do you think is a problem?
On Thu, Jun 14, 2012 at 10:12 PM, Harshini Madurapperuma <harshini.madurapperuma <at> ifsworld.com> wrote:
When FOP renders the PDF, how does it prints the line of text? Does it print letter by letter separately or just prints the whole sentence. And how does it creates the spaces between words? Because I noticed that it has different spaces of different font types and Also when the sentence is mixture of simple and Capital letter of the font Verdana (for an example), the spaces itself has a difference with in the sentence. Has anyone notice this issue and have any idea?
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and for use only by
the intended recipient. If you are not the intended recipient, please notify
us immediately and delete this e-mail from your system. Any use or disclosure
of the information contained herein is strictly prohibited. As internet
communications are not secure, we do not accept legal responsibility for the
contents of this message nor responsibility for any change made to this
message after it was sent by the original sender. We advise you to carry out
your own virus check as we cannot accept liability for damage resulting from