Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can we get the list of available font in the system?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pratik041
    wrote on last edited by
    #1

    I have tried @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.

    Pratik Agrawal

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      can u explain it little more

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pratik041
        wrote on last edited by
        #3

        [quote author="cdeepak" date="1329721649"]can u explain it little more[/quote]

        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.

        Pratik Agrawal

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anticross
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            Hi,

            u can use the QFontDialog to set the font ref this @http://developer.qt.nokia.com/doc/qt-4.8/qfontdialog.html@

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved