@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Enable figlet to render text using custom fonts

Summary:
Figlet with more fonts will make Phabricator
```
_/ _/ _/ _/_/ _/
_/_/ _/ _/ _/ _/ _/_/ _/
_/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/ _/_/

_/_/_/ _/_/ _/_/ _/ _/_/ _/_/
_/ _/ _/ _/ _/ _/_/ _/_/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/ _/ _/_/_/

_/
_/_/_/ _/_/ _/ _/_/ _/_/ _/ _/ _/_/_/
_/_/ _/_/_/_/ _/_/ _/ _/ _/ _/ _/ _/_/
_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/
_/_/_/ _/_/_/ _/ _/ _/_/ _/_/_/ _/_/_/
```

Test Plan:
Use figlet in comment with no font/various fonts as argument (e.g. lean, script)
and see preview with no errors.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: epriestley

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D7815

authored by

Erik Fercak and committed by
epriestley
a70de394 e27bbb9a

+3 -1
+3 -1
src/infrastructure/markup/interpreter/PhabricatorRemarkupBlockInterpreterFiglet.php
··· 13 13 pht('Unable to locate the `figlet` binary. Install figlet.')); 14 14 } 15 15 16 - $future = id(new ExecFuture('figlet')) 16 + $font = idx($argv, 'font', 'standard'); 17 + $safe_font = preg_replace('/[^0-9a-zA-Z-_.]/', '', $font); 18 + $future = id(new ExecFuture('figlet -f %s', $safe_font)) 17 19 ->setTimeout(15) 18 20 ->write(trim($content, "\n")); 19 21