font = GD::Font.new('Giant') im.string(font, 20, 20, "Giant", blue) im.string(GD::Font::GiantFont, 100, 20, "Giant", red) font = GD::Font.new('Large') im.string(font, 20, 40, "Large", blue) im.string(GD::Font::LargeFont, 100, 40, "Large", red) font = GD::Font.new('Medium') im.string(font, 20, 60, "Medium", blue) im.string(GD::Font::MediumBoldFont, 100, 60, "Medium", red) font = GD::Font.new('Small') im.string(font, 20, 80, "Small", blue) im.string(GD::Font::SmallFont, 100, 80, "Small", red) font = GD::Font.new('Tiny') im.string(font, 20, 100, "Tiny", blue) im.string(GD::Font::TinyFont, 100, 100, "Tiny", red)
font = GD::Font.new('Giant') im.string(font, 20, 20, "でかい", blue) im.string(GD::Font::GiantFont, 100, 20, "でかい", red)
font = GD::Font.new('Giant') STDERR.print font.nchars, "\n" font = GD::Font.new('Small') STDERR.print font.nchars, "\n" font = GD::Font.new('Large') STDERR.print font.nchars, "\n" font = GD::Font.new('Medium') STDERR.print font.nchars, "\n" font = GD::Font.new('Tiny') STDERR.print font.nchars, "\n"
128 96 96 128 128
font = GD::Font.new('Giant') STDERR.print font.offset, "\n" font = GD::Font.new('Small') STDERR.print font.offset, "\n" font = GD::Font.new('Large') STDERR.print font.offset, "\n" font = GD::Font.new('Medium') STDERR.print font.offset, "\n" font = GD::Font.new('Tiny') STDERR.print font.offset, "\n"
0 32 32 0 0
font = GD::Font.new('Giant') STDERR.print font.width, "\n" font = GD::Font.new('Large') STDERR.print font.width, "\n" font = GD::Font.new('Medium') STDERR.print font.width, "\n" font = GD::Font.new('Small') STDERR.print font.width, "\n" font = GD::Font.new('Tiny') STDERR.print font.width, "\n"
9 8 7 6 5
font = GD::Font.new('Giant') STDERR.print font.height, "\n" font = GD::Font.new('Large') STDERR.print font.height, "\n" font = GD::Font.new('Medium') STDERR.print font.height, "\n" font = GD::Font.new('Small') STDERR.print font.height, "\n" font = GD::Font.new('Tiny') STDERR.print font.height, "\n"
15 16 13 12 8