Skip to main content
Participating Frequently
August 2, 2010
Question

TLF bugs (or missing features) to be fixed in TLF 2.0?

  • August 2, 2010
  • 1 reply
  • 1029 views

Hey, I am currently developing a TLF based HTML/CSS renderer, which is working quite okay already. But there is a list of shortcomings (or bugs) which drive me nuts...

  1. Column-support: although there are column properties such as columnCount or columnWidth, which can be set for single FlowGroupElements, the settings do not change anything. It seems that column properties can only be successfully set for whole TextFlows. Am I right?
  2. Buggy InlineGraphicElement alignment: Some InlineGraphicElements, overlap preceding paragraphs, especially if they are larger than the TextFlow container. Sometimes, if I scale down the image after loading, the Image will be aligned correctly, but not in every case. I see no system behind that, it's absolutely arbitrary.
  3. What's the difference between e.g. paragraphSpaceBefore and paddingTop? I just don't get it. It would be great if it actually would be possible to just set paddings on all non-inline containers! most containers don't want paddings at all at the moment.

Altogether it would be great if much more CSS3-settings would be supported out of the box, such as percentual font size or "em"-setting, display property (inline/block/none), percentual paddings/margins/height/width, absolute placement of block elements, fixed container height/width. This list could be easily extended, but most issues can be circumvented somehow.

Thank you for your help.

This topic has been closed for replies.

1 reply

Adobe Employee
August 2, 2010

Column properties only take effect for TextFlow and ContainerController.This means there is no way to have a <div> with its own column settings, unfortunately. But you can have two containers, with two different column settings, and flow text from one container to the next.

Lines are placed according to the values set in the lineHeight, so if you have set an absolute value there, it will set the line there even if it causes it to overlap an inline graphic on another line. If you have the lineHeight set proportionally, then the height of the inline graphic is taken into account as part of the height of the line. Where I have noticed issues is if you have applied a baselineShift to the inline graphic, or for example if you have the inline centered vertically within the line. Are your problems caused by one of these cases? If not, could you send us a short markup example to illustrate?

The difference between paragraphSpaceBefore/After and paddingTop/Bottom is that the first will inherit, and the second does not. If you have a TextFlow, and you want 15 pixels between each paragraph, you can set on the TextFlow paragraphSpaceBefore="15", and each paragraph will have 15 pixels before it. If you set on the TextFlow paddingTop="15", this is applied to the whole TextFlow, so you get 15 pixels before the first paragraph only. If you want to use paddingTop on the paragraph level, you can do this in TLF 2.0, but you have to add the paddingTop setting to each paragraph (it doesn't inherit).  Yet another difference is how they are treated at the top and bottom of the container. Paragraph space before is not added in at the top of the container, but paddingTop is.

You say:

     Altogether it would be great if much more CSS3-settings would be  supported out of the box, such as percentual font size or "em"-setting,  display      property (inline/block/none), percentual  paddings/margins/height/width, absolute placement of block elements,  fixed container height/width.

I agree. All of these are on our list of things to do, but we are unlikely to get to them in this release cycle. Feedback like this is very helpful, especially if you can prioritize them so we know which ones are most important to you.

Thanks very much,

- robin

Participating Frequently
August 3, 2010

First of all, thank you Robin for your quick response! I know it's all quite a lot of stuff that's missing in TLF in order to be able to support most CSS3 features, but since float will be supported in TLF 2.0, which is awesome, at least it would be great if different column-counts could be set for different block-containers in a textflow. This could be used as a workaround, until full table support is available. I will try to make a list of missing features and shortcomings in the current release (1.1) and open a new discussion thread.

Great to hear that paddings seem to be supported in TLF 2.0, since settings on paddingTop etc. do not change anything on the containers to which they are applied to in TLF 1.1. Regarding the paragraphSpaceBefore etc settings, is it comparable to "inheriting margins" rather than paddings? Or did I get it wrong? So are settings such as margin-top etc. not supported at all or are they just called differently in TLF?

If I could send you a pm/email with the address to the respective html/tlf-document on our development-server (in combination with the TLF markup and applied CSS), you can see the inline image issue. I already played around with different line-height settings, but none of these really made a difference. I really don't know what to do to fix it.

Known Participant
August 6, 2010

Hi - Can you let us know if you found out how to use margintop parameter? We basically want to set leading value for each line. Lineheight somehow does not seem to work for us. We use it like textLayoutFormat.lineHeight = "120%";

but when I change the % to any value or remove it as well, it behaves the same way. So we wanted to try out MarginTop but we are not sure how to use it. Can you guide us plz. We are using TLF that comes in with Flex4. Let me know if you need more details. Thanks.