Homec4science

Use PEAR Text_Figlet to render figlet fonts

Authored by epriestley <git@epriestley.com> on Sep 13 2015, 21:31.

Description

Use PEAR Text_Figlet to render figlet fonts

Summary:
Ref T7785. Makes Figlet available without installing the figlet package.

The PEAR Text_Figlet code is really sketchy and includes this API, which is quite marvelous:

function loadFont($filename, $loadgerman = true)

At some point, this should probably be rewritten into a modern style, but it's not trivial since the figlet file format and rendering engine are somewhat complicated. I made some adjustments:

  • Broke the dependency on the PEAR core.
  • Prevented it from doing any wrong HTML escaping.
  • Looked through it for any glaring security or correctness problems.

This code isn't very pretty or modern, but as far as I can tell it's safe and does render Figlet fonts in a reasonable way.

Test Plan: {F803268}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9408, T7785

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

Details

Committed
epriestley <git@epriestley.com>Sep 13 2015, 21:31
Pushed
aubortJan 31 2017, 17:16
Parents
rPH935ced1eddbe: Include "Figlet" and PEAR "Text_Figlet" in externals
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH6bd8ee861ca7: Use PEAR Text_Figlet to render figlet fonts (authored by epriestley <git@epriestley.com>).Sep 13 2015, 21:31