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

Forums

OverviewFelgo 1 Support › Problem with Text on iOS

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #4528

    Christian
    Felgo Team

    Hi, we now tested our game (Blockoban) on iOS devices, and it seems that there is still a problem with texts.

    We use a custom font (spathasans.ttf) for all texts in our game. Texts are sometimes drawn above sprites, sometimes directly above the background image.

    In some cases, the texts work, in some they don’t, and it doesn’t seem to be influenced by what’s underneath them.

    For example, here’s a text that is NOT shown on iOS but it IS on Android:

    Text {
                id: text1
                color: "white"
                font.family: window.fontName
                font.pixelSize: hud.height / 3
            }
    

    This one should be shown directly above the background image.

    Another text, that DOES appear on iOS AND Android, is this one:

        Text {
            z: 1000
            id: levelT
            text: speechBubble.text[textState]
            x: 30
            y: 10
    
            font.pixelSize: 17
            font.family: window.fontName
        }

     

    You can see both of them in this image, the first one should appear where the red rectangle is, the second one is visible in the speech bubble:

    Screenshot

    Could it be because the first one has a size that’s not an integer? This would be my only guess of what is different.

    (We built the game yesterday so it should use Felgo 1.3)

    Cheers, Chrisu

    #4530

    Christian
    Felgo Team

    Hi Chrisu,

    could you try your game with a fixed integer font pixelSize first? My first guess would be a hardcoded version – if that works please use Math.round(). If it isnt shown still, please send us an email with the font and the qml file containing the text element with the text content that isnt shown and we’ll have  a look at it.

    Cheers, Chris

    #4531

    Christian
    Felgo Team

    Hey Chris,

    my first try would have been Math.round(), but it didn’t help, trying a fixed size now.

    But there seems to be a new problem, this time on Android, because multi-lined text is now cut off after one line, this is what the first level now looks like on Android:

    Screenshot

     

    (This is only since the newest version 1.3, it looks fine when I start it on desktop from QtCreator)

    #4545

    Alex
    Felgo Team

    Hi Chrisu,

    I guess we found the problem, it’s related with the calculation of correct line heights on multi-line texts with certain fonts (Spatha is unfortunately one of them). I’ll come back to you later today…

    Cheers,

    Alex

    #4546

    Alex
    Felgo Team

    Hey, I think we got it, both on Android and iOS, the Spatha font is missing some font metric settings that made it really hard to calculate the right positions.

    Please be so kind and give your game another build on our Build Server, looking forward to your feedback! 🙂

    Cheers,

    Alex

    #4547

    Christian
    Felgo Team

    It’s working!
    Thank you very much for the fix 🙂
    Now Blockoban will soon be available on iOS!

    #4556

    Christian
    Felgo Team

    Can’t wait for the announcement! 😉

    #4583

    Heini

    Hi,

    i am facing a similar problem with a custom font (pintip.ttf) on Android. Some pixel lines on the top of the font are not getting drawed, so that a “T” looks like a “I”.

     

    Greetings

    Heini

    #4584

    Alex
    Felgo Team

    Hi Heini,

    is pintip.ttf a free (downloadable) font so that we can download it and debug it locally in our team?

    Thanks,

    Alex

    #4586

    Heini

    Hi Alex,

    i will send you the font tomorrow by email.

     

    Greetings

    Heini

Viewing 10 posts - 1 through 10 (of 10 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