Text Art generator by Anbani.ge
Play around with the derivative project here α» https://anbani.ge/textart
Available as an npx
executable as well!
npx anbani-textart "α°αααα£" "Anbani Block Small"
your text -------^ ^--- optional font key
Play with this fiddle https://jsfiddle.net/georgegach/g96dks5p/58/ or create index.html
file, open in text editor and paste in this code below.
<!DOCTYPE html>
<head>
<script src="https://cdn.jsdelivr.net/gh/Anbani/TextArt@main/dist/TextArt.js"></script>
</head>
<body>
<pre id="art"></pre>
<script>
window.onload = () => {
document.querySelector('#art').textContent = window['anbani-textart'].generate(
'Anbani Block Regular',
'ααααα α―ααα'
)
}
</script>
</body>
</html>
Because <pre/>
tags use font-family: monospace
fonts by default, the textart will be rendered almost correctly. You could further tweak by adding line-height: 1.2em
or even better by using Fira Code
font.
npm i anbani-textart --save
import textArt from 'anbani-textart';
textArt.keys
// [ 'Anbani Block Regular', 'Anbani Block Small', 'Anbani Sample Style' ]
textArt.generate('Anbani Block Regular', 'ααααα α―ααα')
ββββ βββββ ββββββ βββββ βββββββ ββ βββββββ βββ βββββ
ββ ββ ββ ββ ββ ββββββ ββ β ββ ββ ββ
ββββββ ββ ββββββ ββ βββββββ ββββ ββ β ββ ββββββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ β ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββββββ ββββββ ββββββ ββββββ ββ ββ ββββββ ββ ββ ββββββ ββββββ
textArt.generate('Anbani Block Small', 'αααααͺ αααα€α ααααααα')
βββ ββ βββ βββ βββ ββ ββ βββ βββ ββββ βββ βββ βββ βββ ββ βββ ββββ
βββ β β β βββ βββ βββ β ββ βββ ββββ β β βββ βββ β βββ β β ββββ
βββ βββ β β βββ βββ βββ βββ βββ βββ ββββ β β βββ βββ βββ βββ β β ββββ
textArt.fonts['Anbani Block Regular'].author
// Giorgi Gachechiladze
textArt.fonts['Anbani Block Regular'].contact
// https://github.com/georgegach
Alternatively you can import anbani-textart
in CommonJS
enviroment as well:
const textArt = require('anbani-textart')