1. Change font
- Posted by Bhupen1277 Feb 24, 2019
- 1374 views
I run ascii.ex and see the chars. I wanna change font to see other fonts. How I do that? Thanx.
2. Re: Change font
- Posted by ghaberek (admin) Feb 25, 2019
- 1356 views
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
3. Re: Change font
- Posted by irv Feb 25, 2019
- 1333 views
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.
4. Re: Change font
- Posted by irv Feb 25, 2019
- 1320 views
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()
5. Re: Change font
- Posted by Bhupen1277 Feb 25, 2019
- 1336 views
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.
6. Re: Change font
- Posted by irv Feb 25, 2019
- 1324 views
- Last edited Feb 26, 2019
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.