Hey Chris,
I was able to get custom fonts to work with Gruff by stuffing them in
lib/fonts and doing this:
g.font = "#{RAILS_ROOT}/lib/fonts/Thursdoo.ttf"
Here's an example of the final result: http://gruff.heroku.com/
What's the version of Gruff you're using?
/M.
On May 6, 9:03 am, chris <[EMAIL PROTECTED]> wrote:
> Like Pietj and Milan here, I've been messing withGruffand running
> into the font problem.
>
> Did either of you have any luck figuring out how to do this?
>
> I can get Magick to look at the local font file I point to via:
>
> gc = Magick::Draw.new
>
> gc.font = "#{RAILS_ROOT}/lib/fonts/ChalkboardBold.ttf"
>
> But I can't getGruffto do it.
>
> It looks like we need to tweak base.rb inGruffmaybe? Here's a
> snippet of that file:
>
> # Font used for titles, labels, etc. Works best if you provide the
> full
> # path to the TTF font file. RMagick must be built with the
> Freetype
> # libraries for this to work properly.
> #
> # Tries to find Bitstream Vera (Vera.ttf) in the location
> specified by
> # ENV['MAGICK_FONT_PATH']. Uses default RMagick font otherwise.
> #
> # The font= method below fulfills the role of the writer, so we
> only need
> # a reader here.
> attr_reader :font
>
> I'm not up on that lower level attr_reader stuff. Any ideas how to
> override it?
>
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---