On Sun, May 17, 2015 at 1:29 PM, Andreas L. Delmelle (JIRA) <[email protected] > 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) >
