Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added unifont to the report card so that ALL characters will be displ…
…ayed in the Skills section.
  • Loading branch information
Richard Hurt committed Nov 16, 2009
1 parent c4cb4a8 commit ec67ce4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/reports/report_card.rb
Expand Up @@ -97,7 +97,8 @@ def print_data(headers, data)
data = [["No supporting skills"] + [""] * (headers.size-1)] if data.blank?

# Draw the table containing the grade totals and the skill scores
table(
font "#{Prawn::BASEDIR}/data/fonts/unifont.ttf", :size => 7
table(
data,
:headers => headers,
:header_color => "C0C0C0",
Expand Down Expand Up @@ -127,6 +128,8 @@ def new_page

# Build the page header
header margin_box.top_left do
font 'Helvetica', :size => 7

# Insert the school logo
logo = "#{RAILS_ROOT}/public/images/logo.png"
image logo, :at => bounds.top_left, :height => 20
Expand All @@ -145,12 +148,12 @@ def new_page
end

# Build the page footer
footer margin_box.bottom_left do
font "Helvetica", :size => 7
footer margin_box.bottom_left do
font 'Helvetica', :size => 7
orig_fill_color = fill_color
orig_stroke_color = stroke_color
fill_color "555555"
stroke_color "555555"
fill_color '555555'
stroke_color '555555'
stroke_horizontal_rule

move_down(5)
Expand Down Expand Up @@ -281,11 +284,14 @@ def self.print_keys(scales)
# Print the grading scale in columns
column_box [0,cursor],
:width => bounds.width,
:height => (scale.scale_ranges.size * font.height) / 2 do
:height => scale.scale_ranges.size * 7 do
# :height => (scale.scale_ranges.size * font.height) / 2 do
scale.scale_ranges.each do |range|
text " #{range.letter_grade} - #{range.description} (#{range.min_score}% and above)"
end
end
end

move_down 7
end
end # instance_eval
end
Expand Down
Binary file added vendor/plugins/prawn/data/fonts/unifont.ttf
Binary file not shown.

0 comments on commit ec67ce4

Please sign in to comment.