paragraph spacing effected by image baselineShift ONLY if add a subsequent paragraph
my problem:
i add paragraph inline images set -50% baselineshift appear centered in line. looks fine, spacing appropriate shift appears between 2 lines when text covers 2 lines within container (each line ended 1 image).
this text in it's own container.
then, add paragraph textflow, set such appearing in it's own container it's own controller. doing because need able track y values formatting in future (inserting images next specific text containers).
when add second paragraph , container, 2 huge spaces appears, 1 before first line of , 1 between 2 lines of text in paragraph before newly added paragraph.
how subsequent paragraph affecting spacing between lines not share container with... thing share textflow.
note: in xml below, span same baseline shift image added tlf, not me. have tried testing scenario add span after image without baseline shift , automatically added span not appear. this, however, not fix issue.
also, funky symbols in spans result of passing strings <b> , <i> tags create spans. planning on parsing them out , replacing them formatting in form acceptable tlf, first want work out issue.
i think i'm missing how makes sense?
textflow traced via exporter before adding next paragraph:
<textflow columncount="inherit" columngap="inherit" columnwidth="inherit" linebreak="inherit" paddingbottom="inherit" paddingleft="inherit" paddingright="inherit" paddingtop="inherit" verticalalign="inherit" whitespacecollapse="preserve" xmlns="http://ns.adobe.com/textlayout/2008">
<p>
<span>ham-burg-er [or] ham-burg</span>
</p>
<p>
<span>sounds like: <b>haem</b> <i><b>buhr</b></i> g@r</span>
<img baselineshift="-50%" height="21.65" width="27.55" source="[object audiobutton]"/>
<span>[or] <b>haem</b> <i><b>buhrg</b></i></span>
<img baselineshift="-50%" height="21.65" width="27.55" source="[object audiobutton]"/>
<span baselineshift="-50%"></span>
</p>
</textflow>
textflow traced via exporter after adding next paragraph<textflow columncount="inherit" columngap="inherit" columnwidth="inherit" linebreak="inherit" paddingbottom="inherit" paddingleft="inherit" paddingright="inherit" paddingtop="inherit" verticalalign="inherit" whitespacecollapse="preserve" xmlns="http://ns.adobe.com/textlayout/2008">
<p>
<span>ham-burg-er [or] ham-burg</span>
</p>
<p>
<span>sounds like: <b>haem</b> <i><b>buhr</b></i> g@r</span>
<img baselineshift="-50%" height="21.65" width="27.55" source="[object audiobutton]"/>
<span>[or] <b>haem</b> <i><b>buhrg</b></i></span>
<img baselineshift="-50%" height="21.65" width="27.55" source="[object audiobutton]"/>
<span baselineshift="-50%"></span>
</p>
<p baselineshift="50%">
<span>part of speech: noun</span>
</p>
</textflow>
it looks paragraphs have newlines in them, , since have whitespacecollapse set "preserve" these coming out part of paragraph content causing spacing. expect content this:
<p><span>hello</span></p>
instead of this:
<p>
<span>hello</span>
</p>
the latter how database program might choose prettyprint xml, result in whitespace undesired.
the baselineshift being applied following text trickier, , (i think) result of tlf applying character format previous paragraph next paragraph when created. work around adding space after graphic no baselineshift applied.
does explain you're seeing?
- robin
More discussions in Text Layout Framework
adobe
Comments
Post a Comment