Hi everyone,

I would like to get a title in a fixed space width. I was thinking that a solution would be to apply dynamic variable spacing, as in editorial scope (i.e., television subtitles). So if the title is long, the padding is compressed, but if it is short, is enlarged, so as to occupy the same space. How could we do? Php code in this module could help?

Thanks a lot for your help.

Comments

dman’s picture

What you are asking for is a rendering/theme issue.
This module helps with content/text.
It should not be (and will not) insert formatting padding into your theme for you. Don't mix content and display tasks.

There may be a CSS solution for you, but even that may have mixed results over a number of browsers.
I can imagine you could insert something into your theme that would count the characters, estimate the width, and insert an appropriate letter-spacing. However, the server does not know exactly how much space the font and font-size will take up on the users device ... so it could have issues.

Maybe you should consider something like Cufon instead.

alex72rm’s picture

Project: Automatic Nodetitles » Formatter Selector
Version: 6.x-1.2 » 6.x-1.3

Thanks a lot for your really rapid support.

Maybe a solution would imply the "formatter selector" module, that helps to define multiple themes (and, subsequently, different style sheets). That implies a manual selection, instead of an automatic one.