[jira] [Resolved] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-07-27 Thread Matthias Reischenbacher (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Reischenbacher resolved FOP-2855.
--
Resolution: Fixed

Thanks, [~juani15151]! Committed in 
http://svn.apache.org/viewvc?view=revision&revision=1863872.

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2019-05-20 Thread Dan Caprioara (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16844566#comment-16844566
 ] 

Dan Caprioara commented on FOP-2349:


I get the same problem when using Arial with negative letter spacing.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: FOP
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
>Priority: Major
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16819010#comment-16819010
 ] 

Juan commented on FOP-2855:
---

Found out that [^issue_fix.patch]causes this:

  !issue_after_fix1.png!

 

So added another patch based on the first one.

 

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juan updated FOP-2855:
--
Attachment: (was: issue_fixed.png)

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juan updated FOP-2855:
--
Attachment: issue_fix_2.patch
issue_fixed.png
issue.xml
issue_after_fix1.png

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juan updated FOP-2855:
--
Attachment: (was: issue.xml)

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juan updated FOP-2855:
--
Attachment: (was: issue.png)

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_after_fix1.png, 
> issue_fix.patch, issue_fix_2.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-16 Thread Juan (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juan updated FOP-2855:
--
Attachment: issue.png

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.png, issue.xml, issue_fix.patch, 
> issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-04-08 Thread Juan (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16812725#comment-16812725
 ] 

Juan commented on FOP-2855:
---

[~matthias8283] Done.

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_fix.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-03-31 Thread Matthias Reischenbacher (JIRA)


[ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16806305#comment-16806305
 ] 

Matthias Reischenbacher commented on FOP-2855:
--

[~juani15151]: please sign a CLA, so that I can process your patch. See: 
http://www.apache.org/licenses/#clas

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_fix.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-03-31 Thread Matthias Reischenbacher (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Reischenbacher reassigned FOP-2855:


Assignee: Matthias Reischenbacher

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Assignee: Matthias Reischenbacher
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_fix.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2855) [PATCH] When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-03-31 Thread Matthias Reischenbacher (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Reischenbacher updated FOP-2855:
-
Summary: [PATCH] When using letter-spacing and white-space=pre inline 
elements after multiple spaces are sligthly moved to the right  (was: When 
using letter-spacing and white-space=pre inline elements after multiple spaces 
are sligthly moved to the right)

> [PATCH] When using letter-spacing and white-space=pre inline elements after 
> multiple spaces are sligthly moved to the right
> ---
>
> Key: FOP-2855
> URL: https://issues.apache.org/jira/browse/FOP-2855
> Project: FOP
>  Issue Type: Bug
>  Components: layout/inline
>Affects Versions: trunk
>Reporter: Juan
>Priority: Trivial
> Attachments: issue.png, issue.xml, issue_fix.patch, issue_fixed.png
>
>
> Inline elements inside code elements, that use white-space=pre and 
> letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FOP-2855) When using letter-spacing and white-space=pre inline elements after multiple spaces are sligthly moved to the right

2019-03-28 Thread Juan (JIRA)
Juan created FOP-2855:
-

 Summary: When using letter-spacing and white-space=pre inline 
elements after multiple spaces are sligthly moved to the right
 Key: FOP-2855
 URL: https://issues.apache.org/jira/browse/FOP-2855
 Project: FOP
  Issue Type: Bug
  Components: layout/inline
Affects Versions: trunk
Reporter: Juan
 Attachments: issue.png, issue.xml, issue_fix.patch, issue_fixed.png

Inline elements inside code elements, that use white-space=pre and 
letter-spacing > 0 (e.g. 1pt) are slightly moved to the right.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FOP-2521) Letter-spacing + Arial-font is not always applied

2015-08-28 Thread Joery Mens (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joery Mens updated FOP-2521:

Attachment: reproduce.fo
pdf2.0.pdf
pdf1.1.pdf
pdf1.0.pdf
arial.ttf

> Letter-spacing + Arial-font is not always applied
> -
>
> Key: FOP-2521
> URL: https://issues.apache.org/jira/browse/FOP-2521
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 1.1, 2.0
>Reporter: Joery Mens
> Attachments: arial.ttf, pdf1.0.pdf, pdf1.1.pdf, pdf2.0.pdf, 
> reproduce.fo
>
>
> The letter-spacing attribute worked correct in FOP 1.0; However in FOP 1.1 
> and FOP 2.0 it is not applied when the text-content contains specific letter 
> combinations. It seems to fail when a capital letter 'V' is used in 
> combination with a small letter.
> In the attachments you see the PDF's generated with FOP1.0, 1.1 and 2.0, the 
> used xslfo and the used font-file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (FOP-2521) Letter-spacing + Arial-font is not always applied

2015-08-28 Thread Joery Mens (JIRA)
Joery Mens created FOP-2521:
---

 Summary: Letter-spacing + Arial-font is not always applied
 Key: FOP-2521
 URL: https://issues.apache.org/jira/browse/FOP-2521
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.0, 1.1
Reporter: Joery Mens


The letter-spacing attribute worked correct in FOP 1.0; However in FOP 1.1 and 
FOP 2.0 it is not applied when the text-content contains specific letter 
combinations. It seems to fail when a capital letter 'V' is used in combination 
with a small letter.

In the attachments you see the PDF's generated with FOP1.0, 1.1 and 2.0, the 
used xslfo and the used font-file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jira] [Comment Edited] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-18 Thread Andreas Delmelle
> On 17 May 2015, at 22:52, Glenn Adams  wrote:

> > On Sun, May 17, 2015 at 1:29 PM, Andreas L. Delmelle (JIRA) 
> >  wrote:
> 
> ... 
> > IIUC, a correct fix would first need to determine how many characters that 
> > "mcs" array leads
> > to in the output, in order to set the number of letter spaces to the 
> > correct value.
> 
> s/characters/characters that map to spacing glyphs/
> 
> though even this does not work in all cases,  e.g., in Indic and related 
> scripts where orthographic syllables are grouped together and letter space 
> would appear between the syllables and not the spacing characters of a 
> syllable.

Interesting... Admittedly, I expressed it rather poorly, but what I was 
actually trying to refer to was the latter you mention, based on what I recall 
from a few introductory lectures on Sanskrit I attended quite a while ago.
IIRC, it was considered almost an art form to combine different base 'letters' 
or 'graphemes' into one 'grapheme cluster' in different ways (if I use those 
terms correctly here).

From an end user perspective, that would count as only one 'character', while a 
programmer would see it coming in as a handful of codepoints.



KR

Andreas

Re: [jira] [Comment Edited] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Glenn Adams
On Sun, May 17, 2015 at 1:29 PM, Andreas L. Delmelle (JIRA)  wrote:

>
> [
> https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547147#comment-14547147
> ]
>
> Andreas L. Delmelle edited comment on FOP-2349 at 5/17/15 7:28 PM:
> ---
>
> Quick and dirty approach is to:
> a) adapt the signature of GlyphMapping.processWordMapping to include
> letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few
> lines up to include it.
> b) in processWordMapping, replace the comment line with two statements:
> {code:language=java}
> nLS = mcs.length() - 1;
> ipd = ipd.plus(letterSpaceIPD.mult(nLS));
> {code}
> Seems to do the job, but needs more refinement to be correct for all cases.
>
> Update:
> As pointed out by Glenn, in a response on fop-dev@, this would not work,
> since the point of the method in question was to deal with "combining
> marks", which can cause multiple glyphs to be combined to one character in
> the output.
>


> IIUC, a correct fix would first need to determine how many characters that
> "mcs" array leads to in the output, in order to set the number of letter
> spaces to the correct value.
>

s/characters/characters that map to spacing glyphs/

though even this does not work in all cases,  e.g., in Indic and related
scripts where orthographic syllables are grouped together and letter space
would appear between the syllables and not the spacing characters of a
syllable.


> For such cases, the quick hack would lead to the opposite of the reported
> issue, namely that the area would be wider than expected.
>
>
> was (Author: adelmelle):
> Quick and dirty approach is to:
> a) adapt the signature of GlyphMapping.processWordMapping to include
> letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few
> lines up to include it.
> b) in processWordMapping, replace the comment line with two statements:
> {code:language=java}
> nLS = mcs.length() - 1;
> ipd = ipd.plus(letterSpaceIPD.mult(nLS));
> {code}
> Seems to do the job, but needs more refinement to be correct for all cases.
>
> > Inline elements with letter-spacing and custom font aren't correctly
> sized
> >
> --
> >
> > Key: FOP-2349
> > URL: https://issues.apache.org/jira/browse/FOP-2349
> > Project: Fop
> >  Issue Type: Bug
> >  Components: layout/unqualified
> >Reporter: Matthias Reischenbacher
> > Attachments: FOP-2349.fo, inline-letter-spacing.pdf,
> inline-letter-spacing.xml
> >
> >
> > If letter-spacing is applied to an inline element, that uses one of the
> base-14 fonts, the width of the inline element is automatically expanded
> with the letter-spacing.
> > However if a custom font is used (e.g. Arial) the inline width isn't
> expanded anymore, which prevents from using background-color or borders for
> the inline element.
> > See attached PDF which illustrates the problem.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>


[jira] [Comment Edited] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547147#comment-14547147
 ] 

Andreas L. Delmelle edited comment on FOP-2349 at 5/17/15 7:28 PM:
---

Quick and dirty approach is to:
a) adapt the signature of GlyphMapping.processWordMapping to include 
letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few 
lines up to include it.
b) in processWordMapping, replace the comment line with two statements:
{code:language=java}
nLS = mcs.length() - 1;
ipd = ipd.plus(letterSpaceIPD.mult(nLS));
{code}
Seems to do the job, but needs more refinement to be correct for all cases.

Update:
As pointed out by Glenn, in a response on fop-dev@, this would not work, since 
the point of the method in question was to deal with "combining marks", which 
can cause multiple glyphs to be combined to one character in the output. 
IIUC, a correct fix would first need to determine how many characters that 
"mcs" array leads to in the output, in order to set the number of letter spaces 
to the correct value.
For such cases, the quick hack would lead to the opposite of the reported 
issue, namely that the area would be wider than expected.


was (Author: adelmelle):
Quick and dirty approach is to:
a) adapt the signature of GlyphMapping.processWordMapping to include 
letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few 
lines up to include it.
b) in processWordMapping, replace the comment line with two statements:
{code:language=java}
nLS = mcs.length() - 1;
ipd = ipd.plus(letterSpaceIPD.mult(nLS));
{code}
Seems to do the job, but needs more refinement to be correct for all cases.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [jira] [Commented] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas Delmelle
Hi Glenn

> On 17 May 2015, at 15:28, Glenn Adams  wrote:
> 
> IIRC, I ran out of time to re-integrate LS support for the complex script 
> path, for which your QD fix will not work. Specifically, mcs.length doesn't 
> equal number of base glyphs, but also includes combining glyphs.

Thanks for the input! That confirms my suspicion. There just *had* to be a good 
reason, otherwise you would have included it in the first place... :)


KR

Andreas



Re: [jira] [Commented] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Glenn Adams
On Sun, May 17, 2015 at 6:07 AM, Andreas L. Delmelle (JIRA)  wrote:

>
> [
> https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547147#comment-14547147
> ]
>
> Andreas L. Delmelle commented on FOP-2349:
> --
>
> Quick and dirty approach is to:
> a) adapt the signature of GlyphMapping.processWordMapping to include
> letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few
> lines up to include it.
> b) in processWordMapping, replace the comment line with two statements:
>
> nLS = mcs.length() - 1;
> ipd = ipd.plus(letterSpaceIPD.mult(nLS));
>
> Seems to do the job, but needs more refinement to be correct for all cases.
>

IIRC, I ran out of time to re-integrate LS support for the complex script
path, for which your QD fix will not work. Specifically, mcs.length doesn't
equal number of base glyphs, but also includes combining glyphs.


>
> > Inline elements with letter-spacing and custom font aren't correctly
> sized
> >
> --
> >
> > Key: FOP-2349
> > URL: https://issues.apache.org/jira/browse/FOP-2349
> > Project: Fop
> >  Issue Type: Bug
> >  Components: layout/unqualified
> >Reporter: Matthias Reischenbacher
> > Attachments: FOP-2349.fo, inline-letter-spacing.pdf,
> inline-letter-spacing.xml
> >
> >
> > If letter-spacing is applied to an inline element, that uses one of the
> base-14 fonts, the width of the inline element is automatically expanded
> with the letter-spacing.
> > However if a custom font is used (e.g. Arial) the inline width isn't
> expanded anymore, which prevents from using background-color or borders for
> the inline element.
> > See attached PDF which illustrates the problem.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>


[jira] [Comment Edited] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547122#comment-14547122
 ] 

Andreas L. Delmelle edited comment on FOP-2349 at 5/17/15 12:23 PM:


Had a first look at this one, and the culprit is hidden in a comment in 
org.apache.fop.fonts.GlyphMapping.
In the private static method processWordMapping(), at line 162, it says 
literally:
{code:language=java}
// [TBD] - handle letter spacing
{code}

At this point, I cannot judge whether this was an oversight, or whether it is 
really such a hard problem that it could not be implemented at that time. I am 
going to have a closer look at that. 
In the meantime, if anyone has any useful hints or background info to add, feel 
free to chime in.


was (Author: adelmelle):
Had a first look at this one, and the culprit is hidden in a comment in 
org.apache.fop.fonts.GlyphMapping.
In the private static method processWordMapping(), at line 162, it says 
literally:
 
// [TBD] - handle letter-spacing

At this point, I cannot judge whether this was an oversight, or whether it is 
really such a hard problem that it could not be implemented at that time. I am 
going to have a closer look at that. 
In the meantime, if anyone has any useful hints or background info to add, feel 
free to chime in.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547147#comment-14547147
 ] 

Andreas L. Delmelle edited comment on FOP-2349 at 5/17/15 12:23 PM:


Quick and dirty approach is to:
a) adapt the signature of GlyphMapping.processWordMapping to include 
letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few 
lines up to include it.
b) in processWordMapping, replace the comment line with two statements:
{code:language=java}
nLS = mcs.length() - 1;
ipd = ipd.plus(letterSpaceIPD.mult(nLS));
{code}
Seems to do the job, but needs more refinement to be correct for all cases.


was (Author: adelmelle):
Quick and dirty approach is to:
a) adapt the signature of GlyphMapping.processWordMapping to include 
letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few 
lines up to include it.
b) in processWordMapping, replace the comment line with two statements:

nLS = mcs.length() - 1;
ipd = ipd.plus(letterSpaceIPD.mult(nLS));

Seems to do the job, but needs more refinement to be correct for all cases.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547147#comment-14547147
 ] 

Andreas L. Delmelle commented on FOP-2349:
--

Quick and dirty approach is to:
a) adapt the signature of GlyphMapping.processWordMapping to include 
letterSpaceIPD as a parameter, and adapt the call from doGlyphMapping a few 
lines up to include it.
b) in processWordMapping, replace the comment line with two statements:

nLS = mcs.length() - 1;
ipd = ipd.plus(letterSpaceIPD.mult(nLS));

Seems to do the job, but needs more refinement to be correct for all cases.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas L. Delmelle updated FOP-2349:
-
Attachment: FOP-2349.fo

Even more simplified example that demonstrates the problem for a sequence of 
only two characters.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: FOP-2349.fo, inline-letter-spacing.pdf, 
> inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2015-05-17 Thread Andreas L. Delmelle (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547122#comment-14547122
 ] 

Andreas L. Delmelle commented on FOP-2349:
--

Had a first look at this one, and the culprit is hidden in a comment in 
org.apache.fop.fonts.GlyphMapping.
In the private static method processWordMapping(), at line 162, it says 
literally:
 
// [TBD] - handle letter-spacing

At this point, I cannot judge whether this was an oversight, or whether it is 
really such a hard problem that it could not be implemented at that time. I am 
going to have a closer look at that. 
In the meantime, if anyone has any useful hints or background info to add, feel 
free to chime in.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: layout/unqualified
>Reporter: Matthias Reischenbacher
> Attachments: inline-letter-spacing.pdf, inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2014-02-25 Thread Matthias Reischenbacher (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Reischenbacher updated FOP-2349:
-

Attachment: inline-letter-spacing.pdf
inline-letter-spacing.xml

Sample FO and PDF file.

> Inline elements with letter-spacing and custom font aren't correctly sized
> --
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: Fop
>  Issue Type: Bug
>  Components: page-master/layout
>Reporter: Matthias Reischenbacher
> Attachments: inline-letter-spacing.pdf, inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the 
> base-14 fonts, the width of the inline element is automatically expanded with 
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded 
> anymore, which prevents from using background-color or borders for the inline 
> element.
> See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Created] (FOP-2349) Inline elements with letter-spacing and custom font aren't correctly sized

2014-02-25 Thread Matthias Reischenbacher (JIRA)
Matthias Reischenbacher created FOP-2349:


 Summary: Inline elements with letter-spacing and custom font 
aren't correctly sized
 Key: FOP-2349
 URL: https://issues.apache.org/jira/browse/FOP-2349
 Project: Fop
  Issue Type: Bug
  Components: page-master/layout
Reporter: Matthias Reischenbacher
 Attachments: inline-letter-spacing.pdf, inline-letter-spacing.xml

If letter-spacing is applied to an inline element, that uses one of the base-14 
fonts, the width of the inline element is automatically expanded with the 
letter-spacing.
However if a custom font is used (e.g. Arial) the inline width isn't expanded 
anymore, which prevents from using background-color or borders for the inline 
element.
See attached PDF which illustrates the problem.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


DO NOT REPLY [Bug 12164] Strange Behaviour using letter-spacing and text-align on

2012-04-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=12164

Glenn Adams  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #3 from Glenn Adams  2012-04-01 13:53:47 UTC ---
batch transition to closed remaining pre-FOP1.0 resolved bugs

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 36007] letter-spacing property causes ClassCastException

2012-03-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36007

Glenn Adams  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #3 from Glenn Adams  2012-04-01 06:44:59 UTC ---
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 12300] letter-spacing problem on sequencing pages

2012-03-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=12300

Glenn Adams  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #2 from Glenn Adams  2012-04-01 06:42:39 UTC ---
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 36008] [PATCH] letter-spacing testcases

2012-03-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36008

Glenn Adams  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Glenn Adams  2012-04-01 06:37:45 UTC ---
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 12300] - letter-spacing problem on sequencing pages

2007-10-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=12300


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-10-23 07:32 ---
Bug fixed in latest Trunk (rev 584703), and probably in FOP 0.94

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


Re: letter-spacing

2006-03-03 Thread Jeremias Maerki
I think I've just found another bug in the spec. The "Alphabetic"
classification does not include characters like "-" or "/" (our current break
characters). So, assume a text that includes a string like "XSL-FO" and
allow for letter-spacing. Between "S" and "L", you get two half
letter-spaces (together 1 letter-space). Between "L" and "-", you get
only one half letter-space if you strictly follow the spec. Not quite
what I would expect and not what other layouters do (two commercial FO
implementations I checked, OpenOffice 2.0 and Word 2003). Grmbl.

On 01.03.2006 11:21:36 Jeremias Maerki wrote:

> FO on the other side applies half the
> letter-spacing value on the start and end side of the glyph, and only
> for the characters that are classified as "Alphabetic" by Unicode.


Jeremias Maerki



Re: letter-spacing

2006-03-01 Thread Jeremias Maerki

On 01.03.2006 16:44:39 Luca Furini wrote:
> Jeremias Maerki wrote:
> 
> > > The recommendation states that "The algorithm for resolving the adjusted 
> > > values between word spacing and letter spacing is User Agent dependent." 
> > > (7.17.2 in the candidate recommendation), so I think this is not a wrong 
> > > behaviour: it just assumes that word spaces have a higher precedence than 
> > > letter spaces.
> > 
> > No, actually in both cases the precedence is "force" so all spaces
> > survive the resolution process.
> 
> So, just to check I understood:
> 
> - according to the pdf specifications between two words there is
>1 word space + 2 letter spaces

1 ls + 1 ws + 1 ls, yes.

> - according to the xsl recommendation there is
>1 word space + 1 letter space (or better, two half letter spaces)

yes, more or less. Even the word space is separated into two halves.

> - fop currently puts just a word space

yes

> Is this correct?
> 
> But I still don't understand what the words concerning "adjusted values 
> between word spacing and letter spacing" are supposed to mean ...

I've been wondering about that, too. The user agent has some freedom
about choosing default letter and word spacing. The letter- and
word-spacing properties specify spaces in addition to the default spaces.
Maybe this applies to the default spacing. If you just take the space
traits generated by the spacing properties, then it's clear that the
normal space-resolution rules apply. Hmm.

> > However, while I was out for a few hours I was thinking about this and I 
> > came to the conclusion that it may make sense to keep an array of 
> > character offsets as an attribute of a WordArea in the area tree.
> 
> It would probably be the best way to deal with kerning too.

That's one of my next topics. It's actually another reason why I thought
about this. Just forgot to list it.

> My only concern is about the resulting pdf size: if we specify an offset 
> for each character, wouldn't it become (at least) twice as big as before?

I don't think it gets twice as big, but yes, we could not use the more
space-efficient commands anymore in that case. But it's only plain text
which is easily compressed with the Flate algorithm.

Jeremias Maerki



Re: letter-spacing

2006-03-01 Thread Luca Furini

Jeremias Maerki wrote:

> The recommendation states that "The algorithm for resolving the adjusted 
> values between word spacing and letter spacing is User Agent dependent." 
> (7.17.2 in the candidate recommendation), so I think this is not a wrong 
> behaviour: it just assumes that word spaces have a higher precedence than 
> letter spaces.


No, actually in both cases the precedence is "force" so all spaces
survive the resolution process.


So, just to check I understood:

- according to the pdf specifications between two words there is
  1 word space + 2 letter spaces

- according to the xsl recommendation there is
  1 word space + 1 letter space (or better, two half letter spaces)

- fop currently puts just a word space

Is this correct?

But I still don't understand what the words concerning "adjusted values 
between word spacing and letter spacing" are supposed to mean ...


However, while I was out for a few hours I was thinking about this and I 
came to the conclusion that it may make sense to keep an array of 
character offsets as an attribute of a WordArea in the area tree.


It would probably be the best way to deal with kerning too.

My only concern is about the resulting pdf size: if we specify an offset 
for each character, wouldn't it become (at least) twice as big as before?


Regards
Luca


Re: letter-spacing

2006-03-01 Thread Jeremias Maerki

On 01.03.2006 15:30:09 Luca Furini wrote:
> Jeremias Maerki wrote:
> 
> > Still trying to fix my problem with letter-spacing and fixed width
> > spaces. Do I understand that correctly that XSL-FO's view of
> > letter-spacing is different than, say, PDF's? PDF's character spacing 
> > (PDF 1.4, 5.2.1) is designed so it advances the cursor for each (!)
> > character by the Tc value.
> 
> Yes, I remember that when I was working on letter spacing it took me a 
> while to understand what was wrong with the resulting pdf! :-)
> 
> > letter-spacing="1pt":
> > 
> > |_t__e__x__t_  _t__e__x__t_  _t__e__x__t_|

Hey, I'm again making a complete fool of myself. Mr. Space-Resolution
doesn't get the simplest of rules right. Of course, the first and the
last space is removed due to conditionality="discard" (starts/ends a
reference area). So it must actually be:

|t__e__x__t_   _t__e__x__t_   _t__e__x__t|

Grrr.

> At the moment, fop has
> 
>|t__e__x__t  t__e__x__t  t__e__x__t|
> 
> in other words there are letter spaces only between letters, and not 
> between a letter and a space.

Yes, so even correcting my example we have a difference left to what the
spec says.

> The recommendation states that "The algorithm for resolving the adjusted 
> values between word spacing and letter spacing is User Agent dependent." 
> (7.17.2 in the candidate recommendation), so I think this is not a wrong 
> behaviour: it just assumes that word spaces have a higher precedence than 
> letter spaces.

No, actually in both cases the precedence is "force" so all spaces
survive the resolution process.

> Another little difference: each letter space depends on the preceding 
> letter size, instead of depending on both the preceding and following 
> letters sizes; but this has some visible effect only when a word is 
> composed of letters having different sizes.

Right.

> > PDF's character spacing would work like this, I think (although the last
> > character space needs to be eliminated by the layout manager [1]):
> > 
> > |t__e__x__t__  __t__e__x__t__  t__e__x__t|(__) <-- [1]
> 
> This is why the word spacing adjustment stored in the textAreas is not the 
> computed one, but is specifically modified in order to counterbalance the 
> 2 letter spaces that the pdf will add.
> 
> > If I'm right here (not really sure, that's why I'm asking), it would
> > mean that we should probably stop using the Tc feature from PDF and
> > instead control the glyph positioning ourselves like we already do in
> > PostScript.
> > 
> > WDYT?
> 
> As long as we have just two character categories (letter / spaces) the two 
> pdf operators were enough.
> 
> Now, with fixed width spaces too, which should be unaffected by the both 
> word spacing (such being different from spaces) and letter spacing 
> (differing from normal letters), two operators are too few.
> 
> I don't think we need to set the horizontal positioning of each character 
> or word, but just fix the placement of a character sequence following a 
> fixed width space, removing the letter spaces wrongly added by the Tc 
> operator, alternating character sequences and horizontal adjustments in 
> the TJ array.
> 
> HTH

It does. Thanks. Means I'm not on the wrong track. However, while I was
out for a few hours I was thinking about this and I came to the
conclusion that it may make sense to keep an array of character offsets
as an attribute of a WordArea in the area tree. Different reasons:
- The layout manager already knows exactly where each character should
go. At the moment we're somewhat mapping that knowledge into generic
properties and the renderer has to reproduce the effect. There's a
potential source for errors here.
- When at one point we go into details of letter-spacing and
word-spacing, this will get more important and most of all more
complicated.
- The renderer code for text becomes simpler if it simply can use the
relative offsets from the area tree.
This change doesn't have to happen right now, but it may be worth
keeping in mind for later. I think we can still live with a few
simplifications for now.

Jeremias Maerki



Re: letter-spacing

2006-03-01 Thread Luca Furini

Jeremias Maerki wrote:


Still trying to fix my problem with letter-spacing and fixed width
spaces. Do I understand that correctly that XSL-FO's view of
letter-spacing is different than, say, PDF's? PDF's character spacing 
(PDF 1.4, 5.2.1) is designed so it advances the cursor for each (!)

character by the Tc value.


Yes, I remember that when I was working on letter spacing it took me a 
while to understand what was wrong with the resulting pdf! :-)



letter-spacing="1pt":

|_t__e__x__t_  _t__e__x__t_  _t__e__x__t_|


At the moment, fop has

  |t__e__x__t  t__e__x__t  t__e__x__t|

in other words there are letter spaces only between letters, and not 
between a letter and a space.


The recommendation states that "The algorithm for resolving the adjusted 
values between word spacing and letter spacing is User Agent dependent." 
(7.17.2 in the candidate recommendation), so I think this is not a wrong 
behaviour: it just assumes that word spaces have a higher precedence than 
letter spaces.


Another little difference: each letter space depends on the preceding 
letter size, instead of depending on both the preceding and following 
letters sizes; but this has some visible effect only when a word is 
composed of letters having different sizes.



PDF's character spacing would work like this, I think (although the last
character space needs to be eliminated by the layout manager [1]):

|t__e__x__t__  __t__e__x__t__  t__e__x__t|(__) <-- [1]


This is why the word spacing adjustment stored in the textAreas is not the 
computed one, but is specifically modified in order to counterbalance the 
2 letter spaces that the pdf will add.



If I'm right here (not really sure, that's why I'm asking), it would
mean that we should probably stop using the Tc feature from PDF and
instead control the glyph positioning ourselves like we already do in
PostScript.

WDYT?


As long as we have just two character categories (letter / spaces) the two 
pdf operators were enough.


Now, with fixed width spaces too, which should be unaffected by the both 
word spacing (such being different from spaces) and letter spacing 
(differing from normal letters), two operators are too few.


I don't think we need to set the horizontal positioning of each character 
or word, but just fix the placement of a character sequence following a 
fixed width space, removing the letter spaces wrongly added by the Tc 
operator, alternating character sequences and horizontal adjustments in 
the TJ array.


HTH

Regards
Luca



letter-spacing

2006-03-01 Thread Jeremias Maerki
Still trying to fix my problem with letter-spacing and fixed width
spaces. Do I understand that correctly that XSL-FO's view of
letter-spacing is different than, say, PDF's? PDF's character spacing 
(PDF 1.4, 5.2.1) is designed so it advances the cursor for each (!)
character by the Tc value. FO on the other side applies half the
letter-spacing value on the start and end side of the glyph, and only
for the characters that are classified as "Alphabetic" by Unicode. And I
don't even say anything about setting precendence and conditionality to
anything else than the default.

The weird thing about this definition in FO is that these spaces are
added (by default) in every case, i.e. even at the beginning of a line:

("|"=line boundaries, "_"=spaces generated by letter-spacing)
(The text "text text text" is used with text-align-last="justify" here)

letter-spacing="normal":

|text  text  text|

(Note: FOP does have the "permission" by the FO spec to increase the
inter-character gap here but we don't right now.)

letter-spacing="1pt":

|_t__e__x__t_  _t__e__x__t_  _t__e__x__t_|


PDF's character spacing would work like this, I think (although the last
character space needs to be eliminated by the layout manager [1]):

|t__e__x__t__  __t__e__x__t__  t__e__x__t|(__) <-- [1]


If I'm right here (not really sure, that's why I'm asking), it would
mean that we should probably stop using the Tc feature from PDF and
instead control the glyph positioning ourselves like we already do in
PostScript.

WDYT?

Jeremias Maerki



DO NOT REPLY [Bug 36007] - letter-spacing property causes ClassCastException

2005-08-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36007


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36007] - letter-spacing property causes ClassCastException

2005-08-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36007





--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 12:33 ---
I was not completely right, the bug was in the LineLayoutManager ... anyway it 
should be fixed now! :-)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


Re: DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread Chris Bowditch

Christian Geisert wrote:


Chris Bowditch schrieb:


[EMAIL PROTECTED] wrote:

Christian: It appears we both went for this one at the same time! Its
now been applied :-) Sorry for any confusion.



No problem, noticed it just before committing (need now to find out how
to take back a svn add ;-)
Will you commit the other testcases too or should I take over some?


I don't mind either way; I'll hold off for now and commit them later 
today if you don't get there first :-)


Chris




Re: DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread Jeremias Maerki
Sorry, make that "svn revert . -R".

On 04.08.2005 11:03:13 Jeremias Maerki wrote:
> Try "svn revert -R".
> 
> Thanks for all the helping hands!
> 
> On 04.08.2005 10:58:52 Christian Geisert wrote:
> > Chris Bowditch schrieb:
> > > [EMAIL PROTECTED] wrote:
> > > 
> > > Christian: It appears we both went for this one at the same time! Its
> > > now been applied :-) Sorry for any confusion.
> > 
> > No problem, noticed it just before committing (need now to find out how
> > to take back a svn add ;-)
> > Will you commit the other testcases too or should I take over some?
> > --
> > Christian
> 
> 
> 
> Jeremias Maerki



Jeremias Maerki



Re: DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread Jeremias Maerki
Try "svn revert -R".

Thanks for all the helping hands!

On 04.08.2005 10:58:52 Christian Geisert wrote:
> Chris Bowditch schrieb:
> > [EMAIL PROTECTED] wrote:
> > 
> > Christian: It appears we both went for this one at the same time! Its
> > now been applied :-) Sorry for any confusion.
> 
> No problem, noticed it just before committing (need now to find out how
> to take back a svn add ;-)
> Will you commit the other testcases too or should I take over some?
> --
> Christian



Jeremias Maerki



Re: DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread Christian Geisert
Chris Bowditch schrieb:
> [EMAIL PROTECTED] wrote:
> 
> Christian: It appears we both went for this one at the same time! Its
> now been applied :-) Sorry for any confusion.

No problem, noticed it just before committing (need now to find out how
to take back a svn add ;-)
Will you commit the other testcases too or should I take over some?
--
Christian


Re: DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread Chris Bowditch

[EMAIL PROTECTED] wrote:

Christian: It appears we both went for this one at the same time! Its 
now been applied :-) Sorry for any confusion.



DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36008


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||fop-dev@xml.apache.org
 Status|NEW |ASSIGNED










DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36008


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 10:46 ---
Patch Applied. Thanks

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.
You are on the CC list for the bug, or are watching someone who is.


DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36008


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||fop-dev@xml.apache.org
 Status|NEW |ASSIGNED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.
You are on the CC list for the bug, or are watching someone who is.


DO NOT REPLY [Bug 36007] - letter-spacing property causes ClassCastException

2005-08-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36007


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 10:06 ---
Thanks for signalling this.

Your precise description makes me think that the bug should affect an 
implementation of the method addALetterSpaceTo(). I'll have a closer look and 
try to quickly find a fix.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-03 Thread bugzilla
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=36008>.
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=36008





--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 04:18 ---
Created an attachment (id=15874)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=15874&action=view)
letter-spacing3.xml - Third set of tests for the letter-spacing property

This set of tests currently fail with a Class Cast Exception

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-03 Thread bugzilla
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=36008>.
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=36008





--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 04:16 ---
Created an attachment (id=15873)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=15873&action=view)
letter-spacing2.xml - Second set of tests for the letter-spacing property


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36008] - [PATCH] letter-spacing testcases

2005-08-03 Thread bugzilla
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=36008>.
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=36008





--- Additional Comments From [EMAIL PROTECTED]  2005-08-04 04:16 ---
Created an attachment (id=15872)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=15872&action=view)
letter-spacing1.xml - First set of tests for the letter-spacing property


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36008] New: - [PATCH] letter-spacing testcases

2005-08-03 Thread bugzilla
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=36008>.
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=36008

   Summary: [PATCH] letter-spacing testcases
   Product: Fop
   Version: 1.0dev
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: general
AssignedTo: fop-dev@xml.apache.org
ReportedBy: [EMAIL PROTECTED]


I'll attach 3 test cases for the letter spacing property. The test
letter-spacing3.xml currently fails as reported in Bug #36007.

I am unsure if the last test in letter-spacing1.xml and letter-spacing2.xml
produces the correct result as I don't fully grasp how the .optimum, .minimum,
.maximum settings are suppose to interact.

These files should go into test/layoutengine/testcases.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 36007] New: - letter-spacing property causes ClassCastException

2005-08-03 Thread bugzilla
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=36007>.
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=36007

   Summary: letter-spacing property causes ClassCastException
   Product: Fop
   Version: 1.0dev
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: general
AssignedTo: fop-dev@xml.apache.org
ReportedBy: [EMAIL PROTECTED]


The following fo:

http://www.w3.org/1999/XSL/Format";
xmlns:svg="http://www.w3.org/2000/svg";>
  

  

  
  

  Default

  


causes a java.lang.ClassCastException: org.apache.fop.layoutmgr.KnuthPenalty
Exception.

It only happens if the fo:inline with the letter-spacing property is the first
element in the block. It also only happens for the letter-spacing property set
as  as shown above, that is something like:
Default
is not causing an exception.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.