License from €75
DE EN FR ES IT CZ

Font issue

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 13 years ago
    In game (narration) text is not showing in Mac Osx export.

    I'm using visionaire 4.1 for windows,
    microsoft sans serif, ttf font.

    Windows export works fine.
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 13 years ago
    (Tested in Yosemite 10.10)
  4. · 13 years ago
    Another font issue (tested in editor, not exported):

    If you try to use 2 png image fonts (e.g. "NarrationFont", "DialogFont"), appears a bug:

    When you change a scene with "fade to new scene", or "flip left / right" effect,
    screen goes black & white and looks like damaged tv signal.

    Sorry for my bad english, hope you understood. smile

    Take a look:
    • Image in post
  5. · 13 years ago
    I'll test TTF when I'm back home. Can you send me the ved that creates the problem above ?
  6. · 13 years ago
    The only way to solve the problem above, is to add a true type font (add also the font file) even if you will not use this font in your game.

    Here is a link with the .ved file. I' ve made an example project in order to test it.
    http://we.tl/0HGMCurloX

    Any news about Mac Osx export?
  7. · 13 years ago
    What a strange bug. Not just mac related as I see the bug occur on my Windows 8.1 machine. That was one bizarre solution you came up with for bypassing it.

    At least Simon should easily be able to replicate the bug to know where to look for squashing it.
  8. · 13 years ago
    Yes, bug occurs also on windows 7.

    The main problem I have, is that the TTF font I used in hole game is not displayed when I build my game for Mac... Pc version works fine...

    And the third strange issue I have noticed, is that when you use a TTF font, (even if you choose your font to be "center aligned"), the ttf is never aligned at center. You have to to write manualy the coordinates for every single narration text you use in your game, in order to place it near center.

    ONLY custom png image fonts are displayed with perfect (center) alignment
  9. · 13 years ago
    Did you try using the lua registerHookFunction for forcing text position?

    & narration text is not linked to your character hence why you have to set the position for each one you create. But if you use the hookFunction then you can leave narration text positions at 0,0 & it will sort it out itself automatically.

    local pos
    
    function adaptedTextPosition(text)
     if text:getLink(VTextOwner):isEmpty() then
      pos = {x = game.ScrollPosition.x + (game.WindowResolution.x / 2), y = game.ScrollPosition.y + (game.WindowResolution.y - 50)}
      text:setValue(VTextPosition, pos)
      return true
     end
     return false
    end
     
    registerHookFunction("setTextPosition", "adaptedTextPosition")
    

    -- it automatically centers text to center of x based on current scroll position & it offsets y by 50 pixels from bottom of viewport based on current scroll position.

    This is automatically applied to all displayed text started with the display narration text action part.

    There is also an hook available for positioning action text too.

    P.S: I almost forgot to mention that the script (above) should be added as a definition script to the script section of the engine. Scripts are definition by default when you create them, so just create a new script & copy/paste the script from the code block above into it.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?