wvanbergen / chunky_png

Read/write access to PNG images in pure Ruby.
https://chunkypng.com
MIT License
1.05k stars 101 forks source link

Put text to the image #31

Closed pahnin closed 12 years ago

pahnin commented 12 years ago

I want to add text to the image, but I coudnt find any method to do that. Is there any method or its a feature not available in chunky yet?

wvanbergen commented 12 years ago

There currently is no font rendering tool in ChunkyPNG.

My gut feel is that this is way too complex to implement in pure Ruby, so it is unlikely to ever get added to ChunkyPNG. What you could do is pre-render the characters you need as separate png images and copy paste these onto a larger canvas.

pahnin commented 12 years ago

ok, thnx so what you say is there is no easy way to open ttf files in ruby, or else you could have open it and selected the exact letter from ttf file and add it to canvas right?

wvanbergen commented 12 years ago

You can probably do something along those lines with ImageMagick, but that defeats the point of having a pure ruby library.

pahnin commented 12 years ago

ya I know, i mean, I'm looking for a pure ruby implementation too, sad that I cudnt find one