From: "Ray(:bies, :mundo)" Date: 2006-08-18T13:55:09+09:00 Subject: pdf-writer Postscript Type 1 font handling problems Folks/Admin, apologies for this cross post. I posted to the wrong group previously. Hi, I am trying to get pdf-writer to load up Postscript Type 1 fonts but am encountering a problem. Using the gettysburg.rb example as a base for my tests I have implented the following code changes: PDF::Writer::FONT_PATH.unshift(File.expand_path("Fonts")) p PDF::Writer::FONT_PATH PDF::Writer::FontMetrics::METRICS_PATH.unshift(File.expand_path("Fonts")) p PDF::Writer::FontMetrics::METRICS_PATH pdf.select_font("GillSan", :encoding => nil) pdf.text "The Gettysburg Address\n\n", :font_size => 12, :justification => :center When I run the program, my ruby session sends back the following error message: /opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:1102:in `font_height': undefined method `[]' for nil:NilClass (NoMethodError) from /opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:2436:in `text' from gettysburg.rb:58 Line 58 is "pdf.text "The Gettysburg Address\n\n","... Any idea what's going on? I am runnng the following: Mac: OSX 10.4.7 Ruby: 1.8.4 pdf-writer: 1.1.3 color-tools: 1.3.0 transaction-simple: 1.3.0 Thanks, Ray