1. Change font

I run ascii.ex and see the chars. I wanna change font to see other fonts. How I do that? Thanx.

new topic     » topic index » view message » categorize

2. Re: Change font

Bhupen1277 said...

I run ascii.ex and see the chars. I wanna change font to see other fonts. How I do that? Thanx.

The font displayed on the console is a function of the application itself. I cannot be change programmatically.

  • On Windows, you can right-click the title bar of the window and click Properties, then select the Font tab. (This works for Command Prompt and PowerShell.)

  • On Linux, it's going to vary wildly, but generally it's under Edit > Preferences or Profiles. (There are at least a dozen terminal emulators for Linux.)

  • You can even change the font of the terminal, at least on Ubuntu: https://www.tecmint.com/change-console-fonts-in-ubuntu-server/

To answer your question in a round-about way, if you want to compare the table of characters in different fonts, perhaps what you need is a Character Map application.

  • On Windows, this is under Start > Windows Accessories > Character Map.

  • On Linux, there's gucharmap for GNOME (or Cinnamon, MATE, etc.) or kcharselect for KDE.

Hope this helps.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Change font

For other than the standard ASCII, you'll have to look up the UTF-8 value for the character(s) you want.

Let's say you want the Cherokee characters TSU and YA:

TSU is #E1,#8F,#A7 according to Character Map

And YA is #E1,#8F,#AF

puts(1,{#E1,#8F,#A7,#E1,#8F,#AF}) 

That will display the characters ᏧᏯ on your terminal.

This is on Linux, can't test on Windows right now.

If you're just wanting to change the font and size of the characters on the terminal, Linux terminals usually have a menu option, such as "Profile Preferences" where you can do that, as well as change number of lines and characters per line.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Change font

If you are using the WEE editor, or Geany you can paste characters directly into your source code, without having to use the UTF-8 hex numbers:

include GtkEngine.e 
 
constant  
 win = create(GtkWindow,"size=150x100,border=10,$destroy=Quit"), 
 lbl = create(GtkLabel,"font=Monospace Regular 36,text=ᏧᏯ") 
 
 add(win,lbl) 
 
 show_all(win) 
 main() 

https://sites.google.com/site/euphoriagtk/Screenshot%20from%202019-02-25%2009-59-55.png

new topic     » goto parent     » topic index » view message » categorize

5. Re: Change font

It seem to me, all answers are outside Euphoria. I look for Euphoria instruction or function or procedure like

 
sequence xyz = "myfont.ttf" 
newfont (xyz)  -- Change font to myfont.ttf  
 

I was hope that there would be something in Euphoria to do that.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Change font

Bhupen1277 said...

It seem to me, all answers are outside Euphoria. I look for Euphoria instruction or function or procedure like

 
sequence xyz = "myfont.ttf" 
newfont (xyz)  -- Change font to myfont.ttf  
 

I was hope that there would be something in Euphoria to do that.

The post above showed one way:

lbl = create(GtkLabel,"font=Monospace Regular 36") -- change font to 36 point monospace regular 

AFAIK, there is no way for a program to change the font in a terminal once that terminal is open, and certainly no way to mix font sizes or styles inside a single terminal.

That's why most people who use computer prefer to use a GUI (Graphic User Interface). It makes those sorts of things easy.

Really old (no longer used) computers which had just a DOS interface could use graphics to display custom characters, which you usually had to design yourself, but those were awkward to program, nobody would want to use something like that now, when there are much easier ways to do things.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu