Skip to content

Commit

Permalink
Commit failing test case for issue prawnpdf#603, based on stayhero/ut…
Browse files Browse the repository at this point in the history
…f8_shrink_to_fit_bug
  • Loading branch information
johnnyshields committed Apr 27, 2014
1 parent e0fe7cf commit 103b75b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/line_wrap_spec.rb
Expand Up @@ -235,6 +235,18 @@
:document => @pdf)
string.should == "Test"
end

it "should process UTF-8 chars in shrink_to_fit", :unresolved, :issue => 603 do

# set UTF-8 font
@pdf.font_families.update("dejavu" => { :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf" })
@pdf.fallback_fonts = ["dejavu"]

@pdf.bounding_box([1, 1], :width => 90, :height => 50) do
broken_text = " Sample Text\nSAMPLE SAMPLE SAMPLEoddělení ZMĚN\nSAMPLE"
@pdf.text broken_text, :overflow => :shrink_to_fit
end
end
end

describe "Core::Text::Formatted::LineWrap#space_count" do
Expand Down

0 comments on commit 103b75b

Please sign in to comment.