February 18, 2012

pratik041 pratik041
Lab Rat
346 posts

how can we get the list of available font in the system?

 

I have tried

  1. QFontDatabase::families (QFontDatabase::Any);
in linux but i am getting different list including some of the fontlist.
I am not getting the list of all the avaiable font.

 Signature 

Pratik Agrawal

4 replies

February 20, 2012

Deleted Member # 1d173 Deleted Member # 1d173
Lab Rat
41 posts

can u explain it little more

February 21, 2012

pratik041 pratik041
Lab Rat
346 posts
cdeepak wrote:
can u explain it little more

Before setting any font i want to know the list of font available in the system. I have tried the above specified code to check the “calibri” font is available in the list or not. but it was not available in the list but when i set the calibri font through code the font was set that means the font is available but it is not showing in the list.

 Signature 

Pratik Agrawal

February 21, 2012

Anticross Anticross
Hobby Entomologist
248 posts

http://developer.qt.nokia.com/doc/qt-4.8/qfontdatabase.html.
bq. The most common uses of this class are to query the database for the list of font families() and for the pointSizes() and styles() that are available for each family. An alternative to pointSizes() is smoothSizes() which returns the sizes at which a given family and style will look attractive.

February 21, 2012

Deleted Member # 1d173 Deleted Member # 1d173
Lab Rat
41 posts

Hi,

u can use the QFontDialog to set the font ref this

  1. http://developer.qt.nokia.com/doc/qt-4.8/qfontdialog.html

 
  ‹‹ QTableView & QSqlQueryModel :when query changes      problem with Qmetaobject::invokeMethod ››

You must log in to post a reply. Not a member yet? Register here!