Forums

OverviewV-Play 1 Support › Problem with Text on iOS

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

    Christian
    V-Play 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 V-Play 1.3)

    Cheers, Chrisu

    #4530

    Christian
    V-Play 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
    V-Play 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
    V-Play 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
    V-Play 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
    V-Play Team

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

    #4556

    Christian
    V-Play 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support