Liking cljdoc? Tell your friends :D
Clojure only.

clj-figlet.font

FIGfont Version 2 file parsing and loading.

A FIGfont file (.flf) is a plain text file containing the graphical arrangements of sub-characters that compose each FIGcharacter. This namespace handles every stage of reading one into a Clojure map: header parsing, layout parameter interpretation, comment skipping, endmark stripping, and extraction of both the 102 required FIGcharacters (ASCII 32-126 plus 7 Deutsch) and any code-tagged extras.

The font map returned by load-font is a plain Clojure map — no custom types or protocols — so fonts compose naturally with the rest of the language: they can be merged, filtered, assoc'd with overrides, serialized, or passed through any data pipeline.

See figfont.txt §CREATING FIGFONTS for the full specification.

FIGfont Version 2 file parsing and loading.

A FIGfont file (.flf) is a plain text file containing the graphical
arrangements of sub-characters that compose each FIGcharacter.  This
namespace handles every stage of reading one into a Clojure map:
header parsing, layout parameter interpretation, comment skipping,
endmark stripping, and extraction of both the 102 required
FIGcharacters (ASCII 32-126 plus 7 Deutsch) and any code-tagged
extras.

The font map returned by `load-font` is a plain Clojure map — no
custom types or protocols — so fonts compose naturally with the rest
of the language: they can be merged, filtered, assoc'd with overrides,
serialized, or passed through any data pipeline.

See figfont.txt §CREATING FIGFONTS for the full specification.
raw docstring

load-fontclj

(load-font source)

Loads a FIGfont file and returns a font map. source may be a classpath resource path (e.g. "fonts/standard.flf"), a filesystem path string, a java.io.File, or a java.io.Reader. Classpath resources are tried first when given a string.

The returned map contains the following keys:

:hardblank Character used as the hardblank sub-character. :height Number of rows in every FIGcharacter. :baseline Rows from the top to the baseline (for alignment). :max-length Maximum line width in the font file. :old-layout Legacy layout parameter (Old_Layout, -1 to 63). :full-layout Full layout parameter (Full_Layout, 0 to 32767), or nil. :comment-lines Number of comment lines in the font file. :print-direction Default print direction (0 = left-to-right). :codetag-count Number of code-tagged characters, or nil. :h-layout Horizontal layout mode (:full, :fitting, or :smushing). :h-smush-rules Set of active horizontal smushing rule numbers (1-6). :v-layout Vertical layout mode (:full, :fitting, or :smushing). :v-smush-rules Set of active vertical smushing rule numbers (1-5). :chars Map of character code (long) to FIGcharacter data, where each FIGcharacter is a vector of strings (one per row).

Loads a FIGfont file and returns a font map.  `source` may be a classpath
resource path (e.g. "fonts/standard.flf"), a filesystem path string, a
java.io.File, or a java.io.Reader.  Classpath resources are tried first
when given a string.

The returned map contains the following keys:

  :hardblank       Character used as the hardblank sub-character.
  :height          Number of rows in every FIGcharacter.
  :baseline        Rows from the top to the baseline (for alignment).
  :max-length      Maximum line width in the font file.
  :old-layout      Legacy layout parameter (Old_Layout, -1 to 63).
  :full-layout     Full layout parameter (Full_Layout, 0 to 32767), or nil.
  :comment-lines   Number of comment lines in the font file.
  :print-direction Default print direction (0 = left-to-right).
  :codetag-count   Number of code-tagged characters, or nil.
  :h-layout        Horizontal layout mode (:full, :fitting, or :smushing).
  :h-smush-rules   Set of active horizontal smushing rule numbers (1-6).
  :v-layout        Vertical layout mode (:full, :fitting, or :smushing).
  :v-smush-rules   Set of active vertical smushing rule numbers (1-5).
  :chars           Map of character code (long) to FIGcharacter data, where
                   each FIGcharacter is a vector of strings (one per row).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close