Liking cljdoc? Tell your friends :D
Clojure only.

clj-figlet.smushing

Horizontal smushing rules for FIGlet rendering.

The FIGfont spec defines six controlled smushing rules, each governing how a specific class of sub-character pair collapses when two FIGcharacters overlap by one column. A font's layout parameter selects which subset of these rules is active — so the rules must be individually addressable.

Each rule is implemented as a pure function of (left, right, hardblank) returning the smushed character or nil, and the six functions are collected in a dispatch map keyed by rule number. This mirrors the spec's enumerated structure directly: rule 1 has code value 1, rule 2 has code value 2, and so on. The public entry point h-try-smush walks only the rules active for the current font and returns the first match, or falls back to universal smushing when no controlled rules are configured.

See figfont.txt §Smushing Rules.

Horizontal smushing rules for FIGlet rendering.

The FIGfont spec defines six controlled smushing rules, each governing
how a specific class of sub-character pair collapses when two
FIGcharacters overlap by one column.  A font's layout parameter
selects which subset of these rules is active — so the rules must be
individually addressable.

Each rule is implemented as a pure function of (left, right, hardblank)
returning the smushed character or nil, and the six functions are
collected in a dispatch map keyed by rule number.  This mirrors the
spec's enumerated structure directly: rule 1 has code value 1, rule 2
has code value 2, and so on.  The public entry point `h-try-smush`
walks only the rules active for the current font and returns the first
match, or falls back to universal smushing when no controlled rules
are configured.

See figfont.txt §Smushing Rules.
raw docstring

h-try-smushclj

(h-try-smush left right hardblank rules)

Attempts to smush two sub-characters using the given smushing rules. Returns the resulting character, or nil if no rule applies.

When rules is empty, universal smushing is used: the later character overrides the earlier, except blanks and hardblanks are always overridden by visible characters. See figfont.txt §Hardblanks.

Attempts to smush two sub-characters using the given smushing rules.
Returns the resulting character, or nil if no rule applies.

When `rules` is empty, universal smushing is used: the later character
overrides the earlier, except blanks and hardblanks are always overridden
by visible characters.  See figfont.txt §Hardblanks.
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