Skip to content

Anbani/TextArt

Repository files navigation

TextArt

Text Art generator by Anbani.ge

Demo

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

npx demo

EZ Quickstart

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.

Proper Installation

npm i anbani-textart --save

Usage

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')