Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed demo_sfont.rb, since SFont is deprecated.

  • Loading branch information...
commit 774bef8e3c5bb42a8f7c7b2f2491e0927b22836f 1 parent db6b657
@jacius jacius authored
Showing with 0 additions and 52 deletions.
  1. +0 −52 samples/demo_sfont.rb
View
52 samples/demo_sfont.rb
@@ -1,52 +0,0 @@
-#!/usr/bin/env ruby
-
-# This program is PUBLIC DOMAIN.
-# It is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-require "rubygame"
-require "rubygame/sfont"
-include Rubygame
-
-def main(*args)
- font_name = ""
-
- if args.length < 1
- font_name = "term16.png"
- puts <<EOF
-You can pass the filename of a SFont-compatible font as the
-first argument to try it, e.g.: ./demo_sfont.rb my_font.png
-
-There are many sample fonts available online:
-http://user.cs.tu-berlin.de/~karlb/sfont/fonts.html
-EOF
- else
- font_name = args[0]
- end
-
- screen = Screen.open([700,400])
- queue = EventQueue.new()
- queue.ignore = [ActiveEvent,MouseMotionEvent,MouseUpEvent,MouseDownEvent]
-
-
- screen.title = "SFont Test (%s)"%font_name
- font = SFont.new(font_name)
- renders = []
- renders << font.render("This font is: %s"%font_name)
- renders << font.render("I say, \"I love pie!\"")
- renders << font.render("I could eat #{Math::PI} pies.")
- renders << font.render("0 1 2 3 4 5 6 7 8 9")
- renders << font.render("!@\#$%^&*()[]{}<>;:/\\+=-_'`\"")
- renders << font.render("abcdefghijklmnopqrstuvwxyz")
- renders << font.render("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
-
- (renders.length).times do |i|
- renders[i].blit(screen,[10,10+font.height*i])
- end
- screen.update()
-
- queue.wait()
-end
-
-main(*ARGV)
Please sign in to comment.
Something went wrong with that request. Please try again.