Permalink
Browse files

Fix font docs.

  • Loading branch information...
1 parent 5ae4ba2 commit 9ebc390c14eb55e289d8e9a90643f22b22e19a73 @sjl committed Sep 7, 2012
Showing with 12 additions and 2 deletions.
  1. +8 −1 docs/4-reference.markdown
  2. +4 −1 src/lanterna/screen.clj
View
9 docs/4-reference.markdown
@@ -147,7 +147,10 @@ The `options` map can contain any of the following mappings:
* `:resize-listener` - A function to call when the terminal is resized. This
function should take two parameters: the new number of columns, and the new
number of rows.
-*
+* `:font` - A single [font name](#font-names) or sequence of [font
+ names](#font-names). If a sequence is given, the first font that exists on
+ the system will be used (much like a CSS `font-family` declaration).
+ Will fall back to a monospaced default font if none of the given ones exist.
The `:rows`, `:cols`, `:font`, `:font-size`, `:palette` and `:charset` options
are really just a suggestion!
@@ -377,6 +380,10 @@ The `options` map can contain any of the following mappings:
* `:resize-listener` - A function to call when the screen is resized. This
function should take two parameters: the new number of columns, and the new
number of rows.
+* `:font` - A single [font name](#font-names) or sequence of [font
+ names](#font-names). If a sequence is given, the first font that exists on
+ the system will be used (much like a CSS `font-family` declaration).
+ Will fall back to a monospaced default font if none of the given ones exist.
The `:rows`, `:cols`, and `:charset` options are really just a suggestion!
View
5 src/lanterna/screen.clj
@@ -48,7 +48,10 @@
:resize-listener - A function to call when the screen is resized. This
function should take two parameters: the new number of
columns, and the new number of rows.
- :font - A string containing the name of the font to use.
+ :font - Font to use. String or sequence of strings.
+ Use (lanterna.terminal/get-available-fonts) to see your options.
+ Will fall back to a basic monospaced font if none of the given
+ names are available.
:font-size - An int of the size of the font to use.
NOTE: The options are really just a suggestion!

0 comments on commit 9ebc390

Please sign in to comment.