LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2010, 01:24 AM   #1
xhsoldier
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Rep: Reputation: 0
Question on linux font system


1. How to use the the font in the application? Any code example?
2. How to install the font for linux?
3. How to make the installed font as the system default font?
4. How font/text is rendered in linux? Any inforamation about the font system in linux?

Thanks.
 
Old 06-24-2010, 01:47 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Maybe start from here: http://fontconfig.org/fontconfig-user.html .
 
Old 06-24-2010, 05:25 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Moved to Linux-Newbie (not a programming question)

xh*;
You will have to give us a lot more information: eg what version of Linux, what applications you are using, etc. And please tell us the context---ie what overall problem are you trying to solve?
 
Old 06-24-2010, 09:54 PM   #4
xhsoldier
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
I want to change the font used in my application.
for example, change another font or change the font size, etc.
 
Old 06-24-2010, 10:20 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What application?

For example, in a word processor, you simply click in the menu to change the font.

You really need to give us more information.
 
Old 06-25-2010, 12:14 AM   #6
xhsoldier
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
I am programming my own application. and in my own application, I want to change the font. Is this clear?!
For example, In QT, I can change the font like this:

QFont font( "Times" );
font.setPointSize( 24 );
font.setWeight( QFont::Bold );
font.setUnderline( TRUE );
xxx->setFont( font );

How to do this in linux?

and I think I have give enough information.
 
Old 06-25-2010, 01:11 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I think of Qt as a graphical toolkit to be used with a programming language such as C. By contrast, Linux is an operating system. Thus--saying "If I do XYZ in Qt, then how do I do it in Linux" does not make sense.

So--are you writing an application to run on Linux?

Are you programming in C? (or maybe C++, Python, or some other language?)
 
Old 06-25-2010, 03:47 AM   #8
xhsoldier
LQ Newbie
 
Registered: Jan 2009
Posts: 12

Original Poster
Rep: Reputation: 0
I am writing in C++ for linux.
If you do not know, do reply any more. I think it is quite clear, just you do not understand.

and why move this programming question to this newbie section. it is not suitable.
 
Old 06-25-2010, 08:47 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by xhsoldier View Post
If you do not know, do reply any more. I think it is quite clear, just you do not understand.
Excuse me--you will not get good help from anyone here if you take that attitude.

First, your original post gave NO CLUE that you were writing an application. Now that you have told us that, this thread will go back to Programming.

Second, you need to provide complete information. Allow me to guess what you are doing:
You are writing an application in C++ using the Qt graphics toolkit. If that's correct, then it seems you already have the necessary commands. If you are NOT using Qt, then what graphics toolkit ARE you using?

Put your energy into clear communication, and not into little retorts such as the one quoted above.

AND--How about acknowledging the help offered from Sergei??

Last edited by pixellany; 06-25-2010 at 08:50 AM.
 
Old 06-25-2010, 08:03 PM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Linux itself has no concept of fonts — it doesn't even have a GUI!

The GUI is provided by a separate userspace program, the X Window System (aka "X"). So you're really asking about X fonts, not "linux fonts", which don't even exist.
 
Old 06-25-2010, 08:04 PM   #11
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
There are also console fonts.
 
Old 06-25-2010, 08:16 PM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
But I'm almost certain the OP is talking about a GUI.
 
Old 06-25-2010, 09:48 PM   #13
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
http://qt.nokia.com/developer
 
Old 06-25-2010, 10:00 PM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by MTK358 View Post
But I'm almost certain the OP is talking about a GUI.
Hint for the OP: if people are trying to read your mind like this, then you weren't clear enough.
 
Old 06-26-2010, 02:29 AM   #15
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Another notion to understand is desktop theme and how applications select one - IMO this is the key to fontset per applications.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a Truetype font resembling Windows' System font? newbiesforever Linux - General 12 02-03-2010 11:57 PM
Which font in the Gnome Terminal if not "system fixed width font"? Daantje Linux - Newbie 1 11-09-2008 08:31 AM
Wine font display problems (seems like system font) TuxLives Linux - General 0 11-02-2006 09:35 AM
System terminal font...which font is it? Dabria Linux - Software 1 06-30-2004 11:20 AM
Lilo/kernel question & font question phek Linux - General 9 09-18-2001 12:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration