[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-dev
Subject:    [jira] [Updated] (FOP-2438) Non-breaking space causes alignment problems with text-align-last="justi
From:       "Martin Doucha (JIRA)" <jira () apache ! org>
Date:       2015-01-09 23:23:36
Message-ID: JIRA.12765856.1420749588000.51822.1420845816003 () Atlassian ! JIRA
[Download RAW message or body]


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

Martin Doucha updated FOP-2438:
-------------------------------
    Attachment: nbsp.patch

This patch fixes the problem.

> Non-breaking space causes alignment problems with text-align-last="justify"
> ---------------------------------------------------------------------------
> 
> Key: FOP-2438
> URL: https://issues.apache.org/jira/browse/FOP-2438
> Project: Fop
> Issue Type: Bug
> Affects Versions: 1.1, trunk
> Reporter: Martin Doucha
> Attachments: nbsp.patch, test.fo
> 
> 
> Non-breaking spaces are not included in stretch factor calculation under special \
> circumstances but they are stretched by the resulting (oversized) stretch factor, \
>                 leading to text overflowing out of block. Those special \
>                 circumstances are:
> - text-align-last="justify"
> - text-align="start" (or anything else other than justify)
> - the non-breaking space has to get positioned on the last line of the block
> Here's Knuth sequence for block "Test Test&nbsp;Test" with the above alignment \
> settings: <KnuthSequence [box w=17220, glue w=2500 stretch=1250 shrink=0, box \
> w=17220, aux. box w=2500, box w=17220, penalty p=-INFINITE w=0 (forced break, ??? \
> (-1))]> Notice that the second space is represented as box instead of glue with \
> penalty. Here's Knuth sequence for the same block but this time with alignment \
> justify/justify: <KnuthSequence [box w=17220, glue w=2500 stretch=1250 shrink=833, \
> box w=17220, aux. box w=0, aux. penalty p=INFINITE w=0, glue w=2500 stretch=1250 \
> shrink=833, box w=17220, penalty p=-INFINITE w=0 (forced break, ??? (-1))]> This \
> gets rendered correctly.



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic