Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Eduardo
Level II

Displaying ASCII art on a window

Hello all,

 

I usually post more serious :-) stuff. But I was wondering how do I get ascii art to display properly in a window. My simple code is below. It looks ok on the script editor but it gets messed up after execution. Any help welcome! Thanks!

 

Eduardo.

New window("Force",<<modal,
Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	"),
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
cwillden
Super User

Re: Displaying ASCII art on a window

Just change the font to "Consolas" to match the editor. I also bumped the text size up to 11:

New window("Force", << Modal,
t1 = Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	", << Font("Consolas", 11)),
);

 Result:

The force is strong with "Consolas" fontThe force is strong with "Consolas" font

-- Cameron Willden

View solution in original post

4 REPLIES 4
Highlighted
cwillden
Super User

Re: Displaying ASCII art on a window

Just change the font to "Consolas" to match the editor. I also bumped the text size up to 11:

New window("Force", << Modal,
t1 = Text Box("         
                    ____
                 _.' :  `._
             .-.'`.  ;   .'`.-.
    __      / : ___\ ;  /___ ; \      __
  ,'_ ##--.:__;#.-.#;: :#.-.#:__;.--## _`,
  :' `.t##--.. '<@.`;_  ',@>` ..--##j.' `;
       `:-.._J '-.-'L__ `-- ' L_..-;'
         #-.__ ;  .-#  #-.  : __.-#
             L ' /.------.\ ' J
              #-.   #--#   .-#
             __.l#-:_JL_;-#;.__
          .-j/'.;  ;####  / .'\#-.
        .' /:`. #-.:     .-# .';  `.
     .-#  / ;  #-. #-..-# .-#  :    #-.
  .+#-.  : :      #-.__.-#      ;-._   \
  ; \  `.; ;                    : : #+. ;
  :  ;   ; ;                    : ;  : \:
 : `.#-; ;  ;                  :  ;   ,/;
  ;    -: ;  :                ;  : .-#'  :
  :\     \  : ;             : \.-#      :
   ;`.    \  ; :            ;.'_..--  / ;
   :  #-.  #-:  ;          :/.#      .'  :
     \       .-`.\        /t-##  #:-+.   :
      `.  .-#    `l    __/ /`. :  ; ; \  ;
        \   .-# .-#-.-#  .' .'j \  /   ;/
         \ / .-#   /.     .'.' ;_:'    ;
          :-##-.`./-.'     /    `.___.'
                \ `t  ._  /  bug :F_P:
                 #-.t-._:'


	", << Font("Consolas", 11)),
);

 Result:

The force is strong with "Consolas" fontThe force is strong with "Consolas" font

-- Cameron Willden

View solution in original post

Highlighted
Byron_JMP
Staff

Re: Displaying ASCII art on a window

I think you all need to seriously upgrade your Yoda game

 

 

 

 

https://community.jmp.com/t5/Uncharted/Can-I-make-ASCII-Art-with-JMP/ba-p/31157

Yoda ASCII.png

JMP Systems Engineer, Pharm and BioPharm Sciences
Highlighted
Eduardo
Level II

Re: Displaying ASCII art on a window

:-) Many thanks!

Highlighted
pmroz
Super User

Re: Displaying ASCII art on a window

May the Fourth be with you.  And have a great Cinco de Mayo as well...

Article Labels

    There are no labels assigned to this post.