O.P. Returning a numeric value and an image
I'm working on a new image editor for YASS, and I've run into a problem with positioning text. Text is being generated with PHP as an image. The problem I'm facing, is in the actual image text position is based on the baseline of the text, and letters with underhang (jgy etc.) are placed below the vertical position of the text. On the editor, all the different elements are being generated as independent images. When images with the text are generated, the bottom of the image ends up being the vertical alignment, and basically all the text is higher than its supposed to be. What I am trying to do, is somehow send the HTML page embedding the image (and the JavaScript in the page) a numeric value that shows how much the image should be offset by vertically, how much lower it should be moved.
Now I can think of 2 possible ways to do this, the first being a separate XMLHTTPRequest to get the value, or somehow embedding the value in the URL, the PHP script would forward the request to another URL, but really being the same with the added number on the end.
I don't really want to have to do the first method, as it would result in an extra request, and I'm not sure how to go about implementing the second method. If anyone has any suggestions on how to do that, or any other methods of sending the value would be greatly appreciated.
I cannot hear you. There is a banana in my ear.
|