Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › fontloader question

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6369

    Michael

    Hi

    Sorry if this ihas been asked before. Taking the Multilevelmultiscene demo as example, I thought I could put a fontloader in the SceneBase.qml so then the font would be available in higher-level qmls like SelectLevelScene but the font can’t be found. I wonder why, or what is the way to specific the font.family: property in that case? Or it’s no good that way, and I really need to include a FontLoader in each upper qml like SelectLevelScene etc?

    Cheers, Michael.

    #6373

    Alex
    Felgo Team

    Hi Michael,

    did you try putting the FontLoader in your GameWindo like we did e.g. in our ChickenOutbreak demo game?

    FontLoader {
      id: fontHUD
      source: "fonts/pf_tempesta_seven_compressed.ttf"
    }

    and then use it like this:

    Text {
        // ...
        font.family: fontHUD.name
      }

    Cheers,
    Alex

     

     

    #6374

    Alex
    Felgo Team

    Hi again,

    property alias fontHUD: fontHUD
    FontLoader {
      id: fontHUD
      // ...
    }

    If you add an alias to the item then you can also use the FontLoader in the SceneBase.

    Cheers,
    Alex

     

    #6376

    Michael

    Thanks alot Alex. The first tip was appreciated – more straightforward, and its reach more ‘global’!

    Cheers, Michael.

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded