denyncrawford / deno-figlet

A Deno 🦕 Figlet from text generator
MIT License
11 stars 1 forks source link

problem with "doh" font #3

Open 77it opened 3 years ago

77it commented 3 years ago

using the doh font with the code

import filget, { text } from 'https://x.nest.land/deno-figlet@0.0.5/mod.js';

console.log(await text("doh DOH 1234", "doh"));

output the following text

 :::::::::::::#::::::
                                                                                        :::::

LLLLLLLLLLL             WWWWWWWW                           WWWWWWWWPPPPPPPPPPPPPPPPP       1111111    222222222222222     333333333333333          444444444
L:::::::::L             W::::::W                           W::::::WP::::::::::::::::P     1::::::1   2:::::::::::::::22  3:::::::::::::::33       4::::::::4
L:::::::::L             W::::::W                           W::::::WP::::::PPPPPP:::::P   1:::::::1   2::::::222222:::::2 3::::::33333::::::3     4:::::::::4
LL:::::::LL             W::::::W                           W::::::WPP:::::P     P:::::P  111:::::1   2222222     2:::::2 3333333     3:::::3    4::::44::::4
  L:::::L                W:::::W           WWWWW           W:::::W   P::::P     P:::::P     1::::1               2:::::2             3:::::3   4::::4 4::::4
  L:::::L                 W:::::W         W:::::W         W:::::W    P::::P     P:::::P     1::::1               2:::::2             3:::::3  4::::4  4::::4
  L:::::L                  W:::::W       W:::::::W       W:::::W     P::::PPPPPP:::::P      1::::1            2222::::2      33333333:::::3  4::::4   4::::4
  L:::::L                   W:::::W     W:::::::::W     W:::::W      P:::::::::::::PP       1::::l       22222::::::22       3:::::::::::3  4::::444444::::444
  L:::::L                    W:::::W   W:::::W:::::W   W:::::W       P::::PPPPPPPPP         1::::l     22::::::::222         33333333:::::3 4::::::::::::::::4
  L:::::L                     W:::::W W:::::W W:::::W W:::::W        P::::P                 1::::l    2:::::22222                    3:::::34444444444:::::444
  L:::::L                      W:::::W:::::W   W:::::W:::::W         P::::P                 1::::l   2:::::2                         3:::::3          4::::4
  L:::::L         LLLLLL        W:::::::::W     W:::::::::W          P::::P                 1::::l   2:::::2                         3:::::3          4::::4
LL:::::::LLLLLLLLL:::::L         W:::::::W       W:::::::W         PP::::::PP            111::::::1112:::::2       2222223333333     3:::::3          4::::4
L::::::::::::::::::::::L          W:::::W         W:::::W          P::::::::P            1::::::::::12::::::2222222:::::23::::::33333::::::3        44::::::44
L::::::::::::::::::::::L           W:::W           W:::W           P::::::::P            1::::::::::12::::::::::::::::::23:::::::::::::::33         4::::::::4
LLLLLLLLLLLLLLLLLLLLLLLL            WWW             WWW            PPPPPPPPPP            11111111111122222222222222222222 333333333333333           4444444444

intestead of the right text (tested with https://patorjk.com/software/taag/#p=display&f=Doh&t=doh%20DOH%201234 )


            dddddddd                                                                                                                                                                                  
            d::::::d                hhhhhhh                  DDDDDDDDDDDDD             OOOOOOOOO     HHHHHHHHH     HHHHHHHHH       1111111    222222222222222     333333333333333          444444444  
            d::::::d                h:::::h                  D::::::::::::DDD        OO:::::::::OO   H:::::::H     H:::::::H      1::::::1   2:::::::::::::::22  3:::::::::::::::33       4::::::::4  
            d::::::d                h:::::h                  D:::::::::::::::DD    OO:::::::::::::OO H:::::::H     H:::::::H     1:::::::1   2::::::222222:::::2 3::::::33333::::::3     4:::::::::4  
            d:::::d                 h:::::h                  DDD:::::DDDDD:::::D  O:::::::OOO:::::::OHH::::::H     H::::::HH     111:::::1   2222222     2:::::2 3333333     3:::::3    4::::44::::4  
    ddddddddd:::::d    ooooooooooo   h::::h hhhhh              D:::::D    D:::::D O::::::O   O::::::O  H:::::H     H:::::H          1::::1               2:::::2             3:::::3   4::::4 4::::4  
  dd::::::::::::::d  oo:::::::::::oo h::::hh:::::hhh           D:::::D     D:::::DO:::::O     O:::::O  H:::::H     H:::::H          1::::1               2:::::2             3:::::3  4::::4  4::::4  
 d::::::::::::::::d o:::::::::::::::oh::::::::::::::hh         D:::::D     D:::::DO:::::O     O:::::O  H::::::HHHHH::::::H          1::::1            2222::::2      33333333:::::3  4::::4   4::::4  
d:::::::ddddd:::::d o:::::ooooo:::::oh:::::::hhh::::::h        D:::::D     D:::::DO:::::O     O:::::O  H:::::::::::::::::H          1::::l       22222::::::22       3:::::::::::3  4::::444444::::444
d::::::d    d:::::d o::::o     o::::oh::::::h   h::::::h       D:::::D     D:::::DO:::::O     O:::::O  H:::::::::::::::::H          1::::l     22::::::::222         33333333:::::3 4::::::::::::::::4
d:::::d     d:::::d o::::o     o::::oh:::::h     h:::::h       D:::::D     D:::::DO:::::O     O:::::O  H::::::HHHHH::::::H          1::::l    2:::::22222                    3:::::34444444444:::::444
d:::::d     d:::::d o::::o     o::::oh:::::h     h:::::h       D:::::D     D:::::DO:::::O     O:::::O  H:::::H     H:::::H          1::::l   2:::::2                         3:::::3          4::::4  
d:::::d     d:::::d o::::o     o::::oh:::::h     h:::::h       D:::::D    D:::::D O::::::O   O::::::O  H:::::H     H:::::H          1::::l   2:::::2                         3:::::3          4::::4  
d::::::ddddd::::::ddo:::::ooooo:::::oh:::::h     h:::::h     DDD:::::DDDDD:::::D  O:::::::OOO:::::::OHH::::::H     H::::::HH     111::::::1112:::::2       2222223333333     3:::::3          4::::4  
 d:::::::::::::::::do:::::::::::::::oh:::::h     h:::::h     D:::::::::::::::DD    OO:::::::::::::OO H:::::::H     H:::::::H     1::::::::::12::::::2222222:::::23::::::33333::::::3        44::::::44
  d:::::::::ddd::::d oo:::::::::::oo h:::::h     h:::::h     D::::::::::::DDD        OO:::::::::OO   H:::::::H     H:::::::H     1::::::::::12::::::::::::::::::23:::::::::::::::33         4::::::::4
   ddddddddd   ddddd   ooooooooooo   hhhhhhh     hhhhhhh     DDDDDDDDDDDDD             OOOOOOOOO     HHHHHHHHH     HHHHHHHHH     11111111111122222222222222222222 333333333333333           4444444444
denyncrawford commented 3 years ago

Hi @stefano77it, let me check why this is happening.

It probably has to do with the used dictionary and the order of the characters in the font. At the moment I have not checked all the fonts one by one to know if something is wrong, my fault... so if you can fix it with a PR before I do, that would be amazing.

You can always use a custom dictionary but it is not documented, my fault again. I'm currently working more on DnDB but it doesn't mean that figlet is not maintained :D.

I'll leave this open for now while working on it (ASAP), thanks for letting me know.

If you see something wrong with another font, please use this issue.