Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. HTML font family with QTextCursor on Android

HTML font family with QTextCursor on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 672 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.
  • CharlieGC Offline
    CharlieGC Offline
    CharlieG
    wrote on last edited by
    #1

    Hi,

    My program run on Mac OS X and Android. I use an HTML model and a CSS stylesheet to create a document with QTextCursor.
    In my stylesheet I use this line :

    td {
        font: 12px "Comic Sans MS";
    }
    

    With Mac OS X, I don’t have problem with font family (i.e : Comic sans MS, Verdana, …). But with Android, this attribute doesn’t work.

    Too, I try with only

    td {
        font-family: "Comic Sans MS";
    }
    

    But here, the font-family doesn’t work on Mac OS X and Android.

    Do you notice this problem too ?

    Bye,

    Charlie

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should check the QFontDatabase class. With it you should be able to enumerate the fonts from a given platform.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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