ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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:
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?)
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??
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.