Closed (won't fix)
Project:
ImageCache Actions
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2009 at 03:13 UTC
Updated:
7 Jan 2011 at 20:38 UTC
Hi there,
Great module - am using it to dynamically add captions using the text action, however there is one issue. The positioning of the text is based (as far as I can tell) on the base of the text, rather than the baseline, and therefore has a different position if there are y,g,p,q,| charachters etc. (anything with tails). Is there anyway to make all text justified the same so that my captions are all in the same place?
Thanks,
Adam
Comments
Comment #1
dman commentedThat's a problem I've seen in tests, but don't have an answer for.
The current method is - draw the text, find its bounding box, align that. I treat the rendered text as a graphic element.
So yeah, you get variable results with descenders!
The real way - using GD and its baseline-positioning dimensions meant that I needed to juggle a lot more numbers. See, supporting ROTATION in the mix, along with borders and shadows meant it was all-but-impossible to figure out how to really align something bottom so it would always clear correctly.
I think the only way will be to allow a position:absolute sort of override - though that was only going to work with fixed-size images and my alignment effects would be ignored. You can get that by using top+400 instead of bottom-10. Probably.
Comment #2
dman commentedImage rendering library is being revamped in 6.x-2.x-dev
I expect to put a line-height into that, as it's now got word-wrapping and more to do
Comment #3
dman commentedMeaning, I'll retire this issue from here maybe revisit it on imageapi_text
Comment #4
bkosborneHmm any word on this? Proving to be quite a problem on my site now...