GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * static/manual.txt: documentation for the Shoes::FONTS constant.
why (author)
Mon Oct 06 09:54:43 -0700 2008
commit  b97cc54ec16589bbe9bda27d394c169908da0d69
tree    49068c81e0eb52d5282603b9b64c84e3edad4ce8
parent  1ef8a0ce54dd0ced7d0450e67a104e9289f40451
...
417
418
419
 
 
420
421
422
...
520
521
522
 
 
 
 
 
 
 
 
 
 
523
524
525
...
417
418
419
420
421
422
423
424
...
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
0
@@ -417,6 +417,8 @@ Shoes also has a handful of built-in constants which may prove useful if you are
0
 
0
 '''Shoes::REVISION''' is the Subversion revision number for this build.
0
 
0
+'''Shoes::FONTS''' is a complete list of fonts available to the app. This list includes any fonts loaded by the [[Built-in.font]] method.
0
+
0
 === alert(message: a string) » nil ===
0
 
0
 Pops up a window containing a short message.
0
@@ -520,6 +522,16 @@ Here's a rough idea of what fonts work on which platforms:
0
 
0
 If the font is properly loaded, you'll get back an array of font names found in the file. Otherwise, `nil` is returned if no fonts were found in the file.
0
 
0
+Also of interest: the `Shoes::FONTS` constant is a complete list of fonts available to you on this platform. You can check for a certain font by using `include?`.
0
+
0
+{{{
0
+ if Shoes::FONTS.include? "Helvetica"
0
+ alert "Helvetica is available on this system."
0
+ else
0
+ alert "You do not have the Helvetica font."
0
+ end
0
+}}}
0
+
0
 === gradient(color1, color2) » Shoes::Pattern ===
0
 
0
 Builds a linear gradient from two colors. For each color, you may pass in a Shoes::Color object or a string describing the color.

Comments

    No one has commented yet.