Hi all,
I continue to love this module! It makes my clients think I am VERY fancy.

One of the features I love in Signwriter is that it can dynamically change the font size in order to make text fit in a particular space. I notice that over in #375086: Automatic text wrapping there is a patch to set a text width. I was thinking of making a little hacky-mashup for myself that combined that text-width patch with the auto-font-shrinky code from Signwriter.

Are there any things I need to look out for with this approach? (Or has someone already written something like this??)

Thanks for any guidance -
Eileen

Comments

dman’s picture

Well I'm actually working (slowly in the background) on a rewrite of the text rendering process. As in that issue, I'd like to be able to see signwriter and imagecacheactions using the same code.
However I looked at the signwriter code and decided it wasn't ripe for abstracting, so busted out
imageapi_text and signwriter2

So I'm saying that imageapi_text+textrender is where imagecache_actions is going, code-wise. If you'd like to try out imageapi_text, that would be really cool. I've not published it yet, only because I wanted to complete the use-case examples, and show how it could be used as a base api for menuwriter too...

... Still, I have not looked at text wrapping or scaling though. Wrapping can be through the attribute 'white-space' I think. I'm not sure about scale-to-fit...
In my experience, re-scaling text produced irregular results. They were correct ... but side-by-side it made the results look cheap. So I've not got to doing that.

fietserwin’s picture

Version: 6.x-1.6 » 7.x-1.x-dev
Component: Text Actions Module » Code

The text effect in D7 does not yet wrapping or shrinking to a given width or size. Even user defined line endings are not supported (but probably working in GD). But it is on the wish list.

Feel free to try it yourself. Post a patch and it will be looked at by us (and not again ignored for another few years).

fietserwin’s picture

Component: Code » Text Effects Module