Coder Social home page Coder Social logo

figlet's Issues

Option to mirror the leading spaces of -c after the output

Dear developers,

I pipe centered figlet into "no more secrets" with spaces flag,

figlet -c "please" | nms -sa

which "encrypts" all characters and then de scrambles them. That is a nice effect, especially when using the figlet center function which puts spaces in front, which get scrambled as well so you can't see even the outline of the word in the beginning.

However, it would be nice if the spaces would not only be in front of the figlet chars but also tailing until the current column size of the terminal. This way you get a symmetric scrambled output.

Could you please do that? Thank you!

Invalid memory access on smushing

Valgrind reports invalid memory access at smushing code:

==5623== Command: ./figlet blah
==5623== 
==5623== Invalid read of size 1
==5623==    at 0x804B3D8: addchar (figlet.c:1451)
==5623==    by 0x804C2AA: main (figlet.c:1985)
==5623==  Address 0x41d638f is 1 bytes before a block of size 80 alloc'd
==5623==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==5623==    by 0x8048B1C: myalloc (figlet.c:257)
==5623==    by 0x804AAFC: linealloc (figlet.c:1235)
==5623==    by 0x804C0C8: main (figlet.c:1931)
==5623== 
==5623== Invalid write of size 1
==5623==    at 0x804B3EA: addchar (figlet.c:1450)
==5623==    by 0x804C2AA: main (figlet.c:1985)
==5623==  Address 0x41d638f is 1 bytes before a block of size 80 alloc'd
==5623==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==5623==    by 0x8048B1C: myalloc (figlet.c:257)
==5623==    by 0x804AAFC: linealloc (figlet.c:1235)
==5623==    by 0x804C0C8: main (figlet.c:1931)
==5623== 

This is caused by a smushamount of -1.

Unable to locate E:

I'm running kali 2018, when i try to install figlet via thi command
"apt-get install figlet"
"it says
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package figlet"
PLEASE HELP

Test issue

We're not sure if the github issue tracker is usable or not. Someone must test it.

TTTTTTTTTTTTTTTTTTTTTTT                                          tttt  
T:::::::::::::::::::::T                                       ttt:::t  
T:::::::::::::::::::::T                                       t:::::t  
T:::::TT:::::::TT:::::T                                       t:::::t  
TTTTTT  T:::::T  TTTTTTeeeeeeeeeeee        ssssssssss   ttttttt:::::ttttttt  
        T:::::T      ee::::::::::::ee    ss::::::::::s  t:::::::::::::::::t  
        T:::::T     e::::::eeeee:::::eess:::::::::::::s t:::::::::::::::::t  
        T:::::T    e::::::e     e:::::es::::::ssss:::::stttttt:::::::tttttt  
        T:::::T    e:::::::eeeee::::::e s:::::s  ssssss       t:::::t  
        T:::::T    e:::::::::::::::::e    s::::::s            t:::::t  
        T:::::T    e::::::eeeeeeeeeee        s::::::s         t:::::t  
        T:::::T    e:::::::e           ssssss   s:::::s       t:::::t    tttttt
      TT:::::::TT  e::::::::e          s:::::ssss::::::s      t::::::tttt:::::t
      T:::::::::T   e::::::::eeeeeeee  s::::::::::::::s       tt::::::::::::::t
      T:::::::::T    ee:::::::::::::e   s:::::::::::ss          tt:::::::::::tt
      TTTTTTTTTTT      eeeeeeeeeeeeee    sssssssssss              ttttttttttt  
<./pre>

Buffer overrun

When layout is right to left (-R) and input is long enough, with certain fonts (many in the "figletfonts40" JavE collection at http://www.jave.de/figlet/fonts.html and maybe others) the STRCAT call in addchar() writes past the end of the templine buffer.

Noticed on Windows 7, gcc 4.8.2, with both char and wchar_t variants.

Example test case:

figlet -f flowerpower.flf -R -x -S -p -w 80 abcdefghijklmnopqrstuvwxyz

I don't have time to prepare a patch at the moment, but I'll investigate further.

next is not a function

So... I was using figlet and it crashes every time...


Uncaught Exception:  TypeError: next is not a function
    at ./node_modules/figlet/lib/figlet.js:707:24
    at ReadFileContext.callback (./node_modules/figlet/lib/node-figlet.js:25:20)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:257:13)

I was using:

const figlet = require('figlet')
   console.log( figlet.text('Dust!', {
                 font: 'Font Fire-k',
                 horizontalLayout: 'full',
                 verticalLayout: 'full'
    }))

Unable to open font file

I'm trying to compose figlet in android (Termux with Ubuntu installed) and it composed without any error.But when I run figlet it shows

figlet: standard: Unable to open font file

Screenshot below

Font error in figlet

Unlimited console width support

It would be great for "oneliner" scrollers.
Something like:
figlet -w 0 SomeVeryLongTextHere..
(pyfiglet / figlet.js works this way by default)

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.