• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

InlineGraphicElement positioning issue/question

New Here ,
May 23, 2010 May 23, 2010

Copy link to clipboard

Copied

I haven't spent any time digging into this, but I'm wondering, is there a valid reason that inline graphic elements seem to get positioned differently than text.

The example below (image of results and markup) was created using the online TLF Demo and is simply a bunch of '0's and 'g's  with the Google logo inserting between some of the lines.  In this particular example the only setting of note is that I set Leading too 100% to help illustrate the positioning "issue".

As you can see the image overlaps with the bottom of the previous line.  I highlighted the image and the highlight actually shows where it thinks the image should be (and I agree).

Is this a bug (I have a hard time believing it's not), and if so is there some setting / attribute that could be applied to correct this, or is there some quick fix to put in place for quick positioning.

Thanks!

Bryon

Image capturing results:

http://content.screencast.com/users/blmarks/folders/Jing/media/8af7ece6-51d3-4d77-84b1-0695482ac964/00000140.png

Markup:

<?xml version="1.0" encoding="utf-8"?>

<flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow="http://ns.adobe.com/textLayout/2008"><flow:p><flow:span fontSize="100" lineHeight="100%">0g0g0g</flow:span></flow:p><flow:p><flow:span fontSize="100" lineHeight="100%">g0g0g0</flow:span></flow:p><flow:p><flow:span fontSize="100" lineHeight="100%">0g0g0g</flow:span></flow:p><flow:p><flow:span fontSize="100" lineHeight="100%">g0g0g0</flow:span></flow:p><flow:p><flow:img fontSize="100" lineHeight="100%" height="auto" width="auto" source="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png"/><flow:span fontSize="100" lineHeight="100%"></flow:span></flow:p><flow:p><flow:span fontSize="100" lineHeight="100%">0g0g0g</flow:span></flow:p><flow:p><flow:span fontSize="100" lineHeight="100%">g0g0g0</flow:span></flow:p><flow:p><flow:span fontSize="100"></flow:span></flow:p></flow:TextFlow>

TOPICS
Text layout framework

Views

908

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jun 14, 2010 Jun 14, 2010

This is as designed. TLF uses baseline to baseline leading (typographic leading), and does not adjust the leading to avoid collisions.  This model is the same as used in InDesign or Illustrator. When you set the lineHeight, that controls the space TLF will leave from one baseline to the next. The good part of this is that it gives very predictable line locations, so that using a superscript or subscript, for example, does not result in odd linespacing. But it does mean that you may have to incre

...

Votes

Translate

Translate
Adobe Employee ,
May 24, 2010 May 24, 2010

Copy link to clipboard

Copied

Change all the fontSizes to a smaller value and you'll see that the size is applied.  The issue is that unlike characters which extend below the baseline the ILG is positioned on the baseline and so is a bit taller.  Add a baselineShiftt to push it lower.

Richard

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2010 Jun 13, 2010

Copy link to clipboard

Copied

So, this is actually working worse than I thought.  Previously I thought that the IGEs were the only thing not properly accounting for the descent of the previous line, but now I realize that this is the case for text as well.

Here is some example text showing a 40pt font below a 200pt font.

Screen shot 2010-06-13 at 8.16.56 PM.png

Markup:

<?xml version="1.0" encoding="utf-8"?>

<flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow="http://ns.adobe.com/textLayout/2008"><flow:p><flow:span fontSize="200">gOgOgO</flow:span></flow:p><flow:p><flow:span fontSize="40">gOgOgO</flow:span></flow:p></flow:TextFlow>

I haven't stepped through everything yet, but it would seem that something like _lastLineDescent in BaseCompose would be used to keep track of the descent of the previously line in order to offset the next line so that there is no overlap.  It doesn't, however, appear that this is happening, or at least happening properly.


Is the way this is currently working a bug or is this behavior intentional?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 14, 2010 Jun 14, 2010

Copy link to clipboard

Copied

This is as designed. TLF uses baseline to baseline leading (typographic leading), and does not adjust the leading to avoid collisions.  This model is the same as used in InDesign or Illustrator. When you set the lineHeight, that controls the space TLF will leave from one baseline to the next. The good part of this is that it gives very predictable line locations, so that using a superscript or subscript, for example, does not result in odd linespacing. But it does mean that you may have to increase line leading in some situations such as what you've posted.

- robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 14, 2010 Jun 14, 2010

Copy link to clipboard

Copied

LATEST

That helps clarify things.  Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines