GithubHelp home page GithubHelp logo

anbani / textart Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 172 KB

Georgian Text Art Generator

Home Page: https://anbani.ge/textart

License: GNU General Public License v3.0

JavaScript 100.00%
art generator georgian text anbani

textart's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.