1. Steve Losh
  2. clojure-lanterna

Commits

Steve Losh  committed df56703

Fix font docs.

  • Participants
  • Parent commits 6017cdd
  • Branches default

Comments (0)

Files changed (2)

File docs/4-reference.markdown

View file
  • Ignore whitespace
 * `: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!
 * `: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!
 

File src/lanterna/screen.clj

View file
  • Ignore whitespace
   :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!