Font issue

  • #1, by dramaminiSunday, 02. November 2014, 11:44 6 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.

    Newbie

    44 Posts


  • #2, by dramaminiSunday, 02. November 2014, 14:51 6 years ago
    (Tested in Yosemite 10.10)

    Newbie

    44 Posts

  • #3, by dramaminiSunday, 02. November 2014, 20:47 6 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:

    Newbie

    44 Posts

  • #4, by SimonSMonday, 03. November 2014, 10:43 6 years ago
    I'll test TTF when I'm back home. Can you send me the ved that creates the problem above ?

    Thread Captain

    1368 Posts

  • #5, by dramaminiWednesday, 05. November 2014, 01:29 6 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?

    Newbie

    44 Posts

  • #6, by afrlmeWednesday, 05. November 2014, 02:58 6 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.

    Imperator

    6842 Posts

  • #7, by dramaminiWednesday, 05. November 2014, 03:15 6 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

    Newbie

    44 Posts

  • #8, by afrlmeWednesday, 05. November 2014, 04:10 6 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")
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

    -- 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.

    Imperator

    6842 Posts

Write post