Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to modify font size and type from script Post 302165601 by adderek on Friday 8th of February 2008 09:19:40 AM
Old 02-08-2008
Actually you should read about ANSI colors.
To make a bold/standout/invert/underline/blink/... text you could use 'tput'.
The terminals could support different number of colors (I use PuTTY with 256 colors support). Support for bold/standout/blink/etc. depends on the terminal capabilities as well.
This is possible to switch to "alternative font". You should google for the characters sequence.
This is possible as well to display "upper half" and "lower half" of a letter (so you could get characters that are 2x larger).
All the time remember that it require terminal caps and you should not use it when you don't have that caps supported.
As for the colors: If the terminal can handle 16 colors then you should be able to use: <ESC>[XX;YY;ZZm sequence (<ESC> is \033 is 27 is \e and it is the escape character/sequence). Correct numbers could tell to use some color/caps. Ex. \033[48;5;187m is (possibly I mixed up this oneSmilie blue color bolded text on gray-yellow background on 256-colors terminal.
Some examples:
Forecolor Red: \033[31m
Forecolor Blue: \033[34m
Backcolor Yellow: \033[43m
Blink: $(tput blink)
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Font size

Hello all I am a new linux user (Redhat 7) and I am trying to learn how to operate the system. I have a couple problems one the font size for all windows withing the OS are too small and even though I found a couple places to configure font size I can't find where to change the font size for the... (2 Replies)
Discussion started by: elhefe
2 Replies

2. Solaris

font size printing

hi all , i was just wondering if i can specify the font size when i am printing from solaris . i am using solaris 9 and hp laserjet 1230 . i dont want to change the global variable for the printer driver . i just want to print a file with small font and the others with normal fonts . ... (1 Reply)
Discussion started by: ppass
1 Replies

3. AIX

Modify Print Orientation, Font and Pitch

I need to be able to change the font, pitch, and orientation when printing a text flat file. Any suggestions appreciated. (2 Replies)
Discussion started by: mad_dog
2 Replies

4. UNIX for Dummies Questions & Answers

set font size

can any one tell me how to set the font size in unix? (14 Replies)
Discussion started by: sachin.gangadha
14 Replies

5. Shell Programming and Scripting

Specifying font type and color in a shell script

Hi, I am new to shell script. Can you please tell me, whether can we specify font type and color in a shell script? If so, how to do this? Thanks in advance. (4 Replies)
Discussion started by: Vani_Govind
4 Replies

6. Solaris

True Type Font in Solaris

Hello, It is not related to scripting or unix command but it is related to Solaris environment setup. I'm a web developer, in my web application (J2EE using WebLogic 8.1) currently it's running in Windows. We are planning to have Disaster Server in Solaris host. In my application, we are... (1 Reply)
Discussion started by: luckybalaji
1 Replies

7. Shell Programming and Scripting

Font Size

Hi All, Please can someone advise on how to change the font size of the output of a shell script. Best Regards, Shazin (2 Replies)
Discussion started by: Shazin
2 Replies

8. UNIX for Dummies Questions & Answers

Increase Font size for text to type in CYGWIN

Please mention "How to increase font size for text to type commands in CYGWIN " ? (2 Replies)
Discussion started by: adirajup
2 Replies

9. Red Hat

Increase Font size

Hi friends I want increase font size in linux can anybody help me plese Example:this is my in put Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 18G 2.5G 14G 15% / /dev/sda2 ... (1 Reply)
Discussion started by: vasuibm
1 Replies
mfontset_modify_entry(3m17n)					 The m17n Library				      mfontset_modify_entry(3m17n)

NAME
mfontset_modify_entry - Modify the contents of a fontset. SYNOPSIS
int mfontset_modify_entry (MFontset * fontset, MSymbol script, MSymbol language, MSymbol charset, MFont * spec, MSymbol layouter_name, int how) DESCRIPTION
Modify the contents of a fontset. The mfontset_modify_entry() function associates, in fontset fontset, a copy of font with the script / language pair or with charset. Each font in a fontset is associated with a particular script/language pair, with a particular charset, or with the symbol Mnil. The fonts that are associated with the same item make a group. If script is not Mnil, it must be a symbol identifying a script. In this case, language is either a symbol identifying a language or Mnil, and font is associated with the script / language pair. If charset is not Mnil, it must be a symbol representing a charset object. In this case, font is associated with that charset. If both script and charset are not Mnil, two copies of font are created. Then one is associated with the script / language pair and the other with that charset. If both script and charset are Mnil, font is associated with Mnil. This kind of fonts are called fallback fonts. The argument how specifies the priority of font. If how is positive, font has the highest priority in the group of fonts that are associated with the same item. If how is negative, font has the lowest priority. If how is zero, font becomes the only available font for the associated item; all the other fonts are removed from the group. If layouter_name is not Mnil, it must be a symbol representing a mdbFLT (font layout table). In that case, if font is selected for drawing an M-text, that font layout table is used to generate a glyph code sequence from a character sequence. RETURN VALUE
If the operation was successful, mfontset_modify_entry() returns 0. Otherwise it returns -1 and assigns an error code to the external variable merror_code. ERRORS
MERROR_SYMBOL COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mfontset_modify_entry(3m17n)
All times are GMT -4. The time now is 02:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy