This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
21 lines
552 B
Ruby
21 lines
552 B
Ruby
class TestLayout < Test::Unit::TestCase
|
|||
include PangoTestUtils
|
|||
|
|||
def setup
|
|||
@context = Pango::Context.new
|
|||
@layout = Pango::Layout.new(@context)
|
|||
end
|
|||
|
|||
def test_set_font_description
|
|||
assert_nil(@layout.font_description)
|
|||
|
|||
@layout.font_description = "sans 14"
|
|||
assert_equal("sans 14", @layout.font_description.to_s)
|
|||
|
|||
description = Pango::FontDescription.new("monospace")
|
|||
description.size = 10 * Pango::SCALE
|
|||
@layout.font_description = description
|
|||
assert_equal("monospace 10", @layout.font_description.to_s)
|
|||
end
|
|||
end
|