Permalink
Browse files

Merge branch 'master' of git@github.com:sandal/prawn

  • Loading branch information...
2 parents a5cfaff + dcddfab commit 339e51393a14de172ffcb4a98e547bdf538200de @practicingruby practicingruby committed Jan 23, 2009
Showing with 5 additions and 2 deletions.
  1. +4 −1 lib/prawn/font/ttf.rb
  2. +1 −1 vendor/ttfunk
@@ -229,7 +229,10 @@ def embed(reference, subset)
# subset. Perhaps this could be done by querying the subset,
# rather than by parsing the font that the subset produces?
font = TTFunk::File.new(font_content)
- basename = font.name.postscript_name
+
+ # empirically, it looks like Adobe Reader will not display fonts
+ # if their font name is more than 33 bytes long. Strange. But true.
+ basename = font.name.postscript_name[0, 33]
raise "Can't detect a postscript name for #{file}" if basename.nil?

0 comments on commit 339e513

Please sign in to comment.