Sponsored Content
Top Forums Shell Programming and Scripting Specifying font type and color in a shell script Post 302175094 by nua7 on Thursday 13th of March 2008 05:11:24 AM
Old 03-13-2008
Following can be used:

###################
## "style sheet" ##

my $ss_header = $mw -> fontCreate( -family => "Courier", -size => "14", -weight => "bold" );
my $ss_results_body = $mw->fontCreate(
-family => "screen",
-size => 12,
-weight => "normal"
);

Hope this is helpful!
Thanks!
nua7
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing font and color in log file of Script

Hi, We have process log with user defined error messages and information echos. I wanted to highlight error messgaes in that log file while writing in it. Is there any option with either echo or any other command which enables making text bold or we can change the font of body text of echo. ... (4 Replies)
Discussion started by: satgo
4 Replies

2. Shell Programming and Scripting

Font Color Change Using .profile

Does anyone know how can I change font color, background color etc for a particular user using .profile? Any help is appreciated. (0 Replies)
Discussion started by: fifo_vs_lifo23
0 Replies

3. UNIX for Dummies Questions & Answers

How to change the font or color of text

Hi Gurus, I have a small requirement where i want to change the color & font of some text in a file. i have a file error.txt which will be created in the script using egrep. After that iam adding these lines at head & tail to that file using the following code awk 'BEGIN{print"Please... (4 Replies)
Discussion started by: pssandeep
4 Replies

4. UNIX for Advanced & Expert Users

how to modify font size and type from script

I need to print different lines in different font types and sizes to the terminal window from csh script. I can easily change font color and print characters in bold or underline, but cannot figure out a way to change font. Any help is greatly appreciated.:confused: (3 Replies)
Discussion started by: helido
3 Replies

5. 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

6. Shell Programming and Scripting

Change color or font when executing a script

I'm writing a simple menu script and I would like to output the whole script using background color: black AND foreground color:white. Meaning if the ssh terminal of a user is set to green for example, it will change to my desired color when menu script is executed. Once the script is exited, it... (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. Shell Programming and Scripting

font color in script

i am using ubuntu 11.04 and i just finished writing a shell script but i was wanting to know if their is a way to change the font color of just one sentence? (2 Replies)
Discussion started by: hotshot247
2 Replies

8. UNIX for Advanced & Expert Users

How to set font color for STDIN,STDOUT and STDERR?

I want to differentiate the STDOUT and STDERR messages in my terminal . If a script or command is printing a message in terminal I want to differentiate by colors, Is it possible ? Example: $date Wed Jul 27 12:36:50 IST 2011 $datee bash: datee: command not found $alias ls alias... (2 Replies)
Discussion started by: ungalnanban
2 Replies

9. 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

10. Shell Programming and Scripting

Send mail with font color change

Hi All, I have a file that contains following entries. I want to highlight the line that has word as "FAILURE" while sending the email. File ------------------------------------------------------------ Job Name: ABC Start Time: 07/20/2019 07:32:39 End Time: 07/20/2019... (4 Replies)
Discussion started by: sdosanjh
4 Replies
QFontInfo(3qt)															    QFontInfo(3qt)

NAME
QFontInfo - General information about fonts SYNOPSIS
#include <qfontinfo.h> Public Members QFontInfo ( const QFont & font ) QFontInfo ( const QFont & font, QFont::Script script ) QFontInfo ( const QFontInfo & fi ) ~QFontInfo () QFontInfo & operator= ( const QFontInfo & fi ) QString family () const int pixelSize () const int pointSize () const bool italic () const int weight () const bool bold () const bool fixedPitch () const QFont::StyleHint styleHint () const bool rawMode () const bool exactMatch () const DESCRIPTION
The QFontInfo class provides general information about fonts. The QFontInfo class provides the same access functions as QFont, e.g. family(), pointSize(), italic(), weight(), fixedPitch(), styleHint() etc. But whilst the QFont access functions return the values that were set, a QFontInfo object returns the values that apply to the font that will actually be used to draw the text. For example, when the program asks for a 25pt Courier font on a machine that has a non-scalable 24pt Courier font, QFont will (normally) use the 24pt Courier for rendering. In this case, QFont::pointSize() returns 25 and QFontInfo::pointSize() returns 24. There are three ways to create a QFontInfo object. <ol type=1> 1 Calling the QFontInfo constructor with a QFont creates a font info object for a screen-compatible font, i.e. the font cannot be a printer font<sup>*</sup>. If the font is changed later, the font info object is not updated. 2 QWidget::fontInfo() returns the font info for a widget's font. This is equivalent to calling QFontInfo(widget->font()). If the widget's font is changed later, the font info object is not updated. 3 QPainter::fontInfo() returns the font info for a painter's current font. If the painter's font is changed later, the font info object is not updated. <sup>*</sup> If you use a printer font the values returned may be inaccurate. Printer fonts are not always accessible so the nearest screen font is used if a printer font is supplied. See also QFont, QFontMetrics, QFontDatabase, Graphics Classes, and Implicitly and Explicitly Shared Classes. MEMBER FUNCTION DOCUMENTATION
QFontInfo::QFontInfo ( const QFont & font ) Constructs a font info object for font. The font must be screen-compatible, i.e. a font you use when drawing text in widgets or pixmaps, not QPicture or QPrinter. The font info object holds the information for the font that is passed in the constructor at the time it is created, and is not updated if the font's attributes are changed later. Use QPainter::fontInfo() to get the font info when painting. This will give correct results also when painting on paint device that is not screen-compatible. QFontInfo::QFontInfo ( const QFont & font, QFont::Script script ) Constructs a font info object for font using the specified script. QFontInfo::QFontInfo ( const QFontInfo & fi ) Constructs a copy of fi. QFontInfo::~QFontInfo () Destroys the font info object. bool QFontInfo::bold () const Returns TRUE if weight() would return a value greater than QFont::Normal; otherwise returns FALSE. See also weight() and QFont::bold(). Example: qfd/fontdisplayer.cpp. bool QFontInfo::exactMatch () const Returns TRUE if the matched window system font is exactly the same as the one specified by the font; otherwise returns FALSE. See also QFont::exactMatch(). QString QFontInfo::family () const Returns the family name of the matched window system font. See also QFont::family(). Examples: bool QFontInfo::fixedPitch () const Returns the fixed pitch value of the matched window system font. See also QFont::fixedPitch(). bool QFontInfo::italic () const Returns the italic value of the matched window system font. See also QFont::italic(). Example: qfd/fontdisplayer.cpp. QFontInfo &; QFontInfo::operator= ( const QFontInfo & fi ) Assigns the font info in fi. int QFontInfo::pixelSize () const Returns the pixel size of the matched window system font. See also QFont::pointSize(). int QFontInfo::pointSize () const Returns the point size of the matched window system font. See also QFont::pointSize(). Examples: bool QFontInfo::rawMode () const Returns TRUE if the font is a raw mode font; otherwise returns FALSE. If it is a raw mode font, all other functions in QFontInfo will return the same values set in the QFont, regardless of the font actually used. See also QFont::rawMode(). QFont::StyleHint QFontInfo::styleHint () const Returns the style of the matched window system font. Currently only returns the style hint set in QFont. See also QFont::styleHint() and QFont::StyleHint. int QFontInfo::weight () const Returns the weight of the matched window system font. See also QFont::weight() and bold(). SEE ALSO
http://doc.trolltech.com/qfontinfo.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qfontinfo.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QFontInfo(3qt)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy