[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread Andreas L. Delmelle (JIRA)

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

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


I assume, by "wrapper", you refer to the inner block, and yes, I admit it does 
not automatically take care of the case where you have lines of varying width, 
where some are larger and others do fit.

As to your question, the answer is: it depends... :)

If that is the appropriate thing to do, then yes, but it is definitely not 
always that way. While a fo:block-container is _similar to_ a div, it is not 
really the same.

Simple example of where the behaviour differs is the "margin-left", or the 
XSL-FO correlate "start-indent".
Without actually rendering, try to take a stab at what the following should 
look like:

{code:language=xml}
  


  
{code}

Now, try to render it with FOP to see if that matches your expectation...

However unexpected the result, be sure that we double-checked this with the 
XSL-FO WG, and the result produced by FOP is exactly as intended. All other FO 
processors at that time rendered it more as expected, but were actually 
non-compliant in their implementation.

As to this particular case, it is possible that FOP 2.1 is wrong, but this 
seems like a question for the XSL-FO WG rather than something we just want to 
copy from existing HTML renderers.

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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


[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread JIRA

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

Đorđe Zeljić commented on FOP-2574:
---

Yes, CSS/HTML works that way. Your solution looks fine, except when size of 
"wrapper" is smaller than textbox.
One question, does FOP want to fit html/css behavior? If yes I think there is 
no regression in 1.1 and this is probably bug in 2.1.

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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


[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread Andreas L. Delmelle (JIRA)

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

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


Seems like somehow, I cannot edit my own reply, so to amend my previous answer: 
the nested fo:block-container is actually not even needed, and you can just do:

{code:language=xml}
  
AAA
Lorem ipsum oposum!
  
{code}

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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


[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread Andreas L. Delmelle (JIRA)

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

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


*scratches head* 
After looking at the sample rendered in HTML, I must admit that that does looks 
a bit unexpected... 
Still, all browsers I tried, rendered it exactly the same way. The CSS spec -- 
and by extension also XSL-FO -- does state that the alignment is not with 
respect to the viewport, though, so not sure if that means we are implementing 
it wrongly ( ? )

That said, suppose one adds one line above that just contains the string 'AAA', 
you would end up with a right-aligned first line and a second line that 
_appears_ to be left-aligned ( ? )

Example in HTML:
{code:language=html}
  AAALorem ipsum 
oposum!
{code}

If that is the intended rendering, it can be obtained via FOP by means of a 
nested fo:block-container. Note that "text-align" is an inherited property, so 
can be set at the level of the outer fo:block-container, and then overridden on 
an inner fo:block-container.

Example rendering similarly in XSL-FO:
{code:language=xml}
  
AAA
Lorem ipsum 
oposum!
  
{code}

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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


[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread Pascal Sancho (JIRA)

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

Pascal Sancho commented on FOP-2574:


Hi,

This can be done by using IF intermediate format (Cf. [1]):
Setting text/@x attribute to 0 where it's negative.

[1] http://xmlgraphics.apache.org/fop/2.1/intermediate.html

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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


[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly

2016-02-11 Thread JIRA

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

Đorđe Zeljić commented on FOP-2574:
---

Is there option to FOP fit behavior from this simple HTML example?
https://gist.github.com/zeljic/9b9edcf12b7d231ae724

> Right alignment doesn't work correctly
> --
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
>Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.



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