ClosestStorm / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

image.string and fontfiles #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
to draw a text by using an fontfile have to do so:

image.string(Image.trueColor(255,128,0), './fontfile.ttf', 30, 0, 30, 45,
'some text'); 

the "./" confused me, cos the oder image-functions load and save files in
the actual directory without the folder locator. I spent some hours with
trying different things. the function don't throw normal errors: strangely
it handles failures with a returned string that contains the error message. 

in this case I think the server should throw a warning and continue
compiling the code. are there plans for warning-functionllity?

Original issue reported on code.google.com by bienmano...@googlemail.com on 30 Oct 2009 at 11:35

GoogleCodeExporter commented 9 years ago
Good point. The current behavior mimics the original code, see
http://www.libgd.org/Font#char_.2AgdImageStringFT.28gdImagePtr_im.2C_int_.2Abrec
t.2C_int_fg.2C_char_.2Afontname.2C_double_ptsize.2C_double_angle.2C_int_x.2C_int
_y.2C_char_.2Astring.29_.28FUNCTION.29
for more detail.

I will change this so an exception will be thrown in case the font is not found.

Original comment by ondrej.zara on 31 Oct 2009 at 9:48

GoogleCodeExporter commented 9 years ago
Fixed in rev. 630.

Original comment by ondrej.zara on 31 Oct 2009 at 9:50