Results 1 to 22 of 22

Thread: Scaleform Fonts

  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    84

    Default Scaleform Fonts

    Ive been fighting this thing for forever. I cannot get dynamic textfields to render properly in game. They render fine when I test them via FxMediaPlayer but once in game, I see boxes where text should be. I have searched and searched and this has also been a problem for others. I can make a dynamic text field and set text for it. That will display, but once it is changed with code - both using uscript or as2, the boxes appear.

    I have added a font class via the library. I have exported it for actionscript. I have set my textfields to embed and selected All glyphs. I have tried to manually set embedFonts = true via actionscript. Nothing I do helps. I have followed multiple tutorials on embedding fonts in AS2 and Flash.

    Any ideas?

  2. #2
    Iron Guard
    Join Date
    Dec 2009
    Location
    Ontario, Canada
    Posts
    632

    Default

    If you are using Adobe, you need to select the embedded font for the field ( font selection, you should see your embedded font in the list ) not the font itself.
    Mike

  3. #3
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    84

    Default

    example:

    I add a new font titled UDK which links to the Arial font with Identifier UDK. I go to the textbox in my movieclip and set the font to UDK*, the asterisk showing that it is a font from the library. Ive done this and Im still just getting boxes. Thanks for the reply though.

  4. #4
    Iron Guard
    Join Date
    Dec 2009
    Location
    Ontario, Canada
    Posts
    632

    Default

    Unfortunately my Adobe trial expired and I bought SWF Quicker so I can't test, but I do know I made 3 different flash files and they all worked. The first 1 had the exact same problem initially that you're describing. I know whatever I did, it shut up the warnings about having to embed the font when publishing it ( you are probably seeing these ).
    Mike

  5. #5
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    84

    Default

    hmmm...i havent seen one warning about embedded fonts...time to investigate!

  6. #6
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    84

    Default

    alright I figured it out. It has something to do with bold fonts. Once I made all my text fields normal everything worked properly. I knew it was something small, I just couldnt find it. I do know however that you are suppose to embed bold, italic, and normal fonts separately so. Either way...SOLVED

  7. #7
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    Bringing up an old thread here. I also do have problems with bold fonts. I want my font to be bold+italic, but it only works if I set it to regular or black. If I change back and forth in the embed options, things work as soon as I click regular and stop working (as in showing small boxes for all characters) as soon as I click bold and/or italic. I have tried a couple of different fonts with the same outcome.

    Is there any solution to this problem or are we stuck with regular fonts for now?

  8. #8

    Default

    Please watch the Font video tutorial for detailed information on using Fonts in UDK.

  9. #9
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    Quote Originally Posted by Matt Doyle View Post
    Please watch the Font video tutorial for detailed information on using Fonts in UDK.
    Thank you.

    Edit. This one? Clicky
    Last edited by Bankler; 12-22-2010 at 01:44 PM.

  10. #10

    Default

    That's the one.

  11. #11
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    I've watched through the movie and studied the three different kinds of font integration. Unfortunately I'm afraid it didn't really explain why character style such as bold and italic cannot be used (or better yet, what has to be done to make it work). In the third way, the font name was named $BoldFont but you never made it bold (despite it being the elephant font, hehe) in the meaning it had the bold attribute selected.

    This might just be me sitting too long without a coffee break here though? I don't know.

  12. #12

    Default

    Interesting. Well, I'm not sure why it's not working for you. I just did a test to confirm it works.

    I have 3 dynamic text fields.

    • Field 1 is set to Times New Roman - Style: Italic
    • Field 2 is set to Times New Roman - Style: Bold
    • Field 3 is set to Times New Roman - Style: Regular


    All three fields have Basic Latin fonts embedded.

    Works as expected in UDK.
    Last edited by Matt Doyle; 12-22-2010 at 02:42 PM.

  13. #13
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    After some more testing:

    If I put a dynamic text field in there, and write some default text in it (inside Flash), and export it. Reimport in UDK and save package. Voila, the text shows up as it should be, regardless of font or style. (ie recreating your example above)

    However, in my case I make use of the field being a dynamic field. In the code, the field gets updated (it's basically a timer, ticking 00:00, 00:01, 00:02 and so on). I use method 1 in your video and the timer works perfects with any font as long as it's regular (or black.. surprisingly...). But the second I go into "embed" and set the italic or bold property on the embeded font, save, export, reimport, save, run... the textfield shows up as empty boxes.

    Sorry I forgot to mention the field being updated, but I still feel it shouldn't really matter since it works with some styles.

  14. #14

    Default

    Try typing some default text in the field and see what happens. Like type: 00:00 or something in it. It should still update even though you've typed into it in the IDE.

    If it doesn't work, it could be a bug in the integration.
    Last edited by Matt Doyle; 12-22-2010 at 03:04 PM.

  15. #15

    Default

    Try disabling html text on the text field (Render text as HTML). It appears that html text fields do not accept styling when set dynamically from UnrealScript. I'm not sure if this is expected behavior or a bug. I'll have to talk with our UDK developer tomorrow.
    Last edited by Matt Doyle; 12-22-2010 at 03:22 PM.

  16. #16
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    I disabled my script. I tried typing a default value in the field in flash "00:00". It showed up. I changed the font to italic. Still showed up right (in italic). Enabled the script again. Empty squares. Changed to regular. Showed up right again (non-italic of course).

    Then I changed the script to always update the field with the string "hello 123" every frame. Same results. Worked for regular but not italic.

    I was pretty damn sure it was me missing some detail here (it can of course still be me screwing up, I cannot be 100%). But yeah, this looks indeed very strange. If it could be looked into or recreated it would be pretty cool.

    Thanks for your time, Matt. Very appreciated.

    EDIT: Okay, I saw your last post now. I'll test it right away!

  17. #17
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    Hm, I'm pretty new to Flash, so I'm not sure if this is right? Is this the button you mean I should "unclick" when you say that I should disable html in the tetfield?

    <> Render text as HTML

    If so, I'm afraid it has been disabled from the very start.

    EDIT: And enabling it didn't help either.

  18. #18

    Default

    Now that is very strange indeed. I've tested it on my end and that was the problem (html text).

    Ok - try this:

    Ensure you text field is:

    • Dynamic Text
    • Family: Georgia
    • Style: Bold Italic
    • Not using Auto kern
    • Anti-alias for readability
    • Not selectable
    • Not Readable text as HTML
    • With Basic Latin glyphs embedded


    Publish & reimport. Then test in UDK.

  19. #19

    Default

    From my testing, it looks like these two font settings cause problems:

    Auto kern
    Render text as HTML

    Be sure to disable these two options on any text fields you want to set dynamically from UnrealScript that make use of Bold or Italic styles.
    Last edited by Matt Doyle; 12-22-2010 at 04:02 PM.

  20. #20
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    78

    Default

    Auto Kern! That was it. (actually didn't even know what it was until now). Thanks so much for your patience Matt. Now I can leave for christmas with that nice feeling of success. And last bus home from the office goes in like 15 minutes, so pretty nice timing. =)

    I tried html thingy too. Same thing, so you were right there. We can not leave html or kerning on if we want to update the field from the script.

    Thanks again. You're the man, Matt.

    EDIT: Hehe, we wrote at the same time.

  21. #21
    Prisoner 849
    Join Date
    Nov 2007
    Location
    0,0,0
    Posts
    913
    Gamer IDs

    Gamertag: BobGneu

    Default

    I had a similar issue. I was able to address it by checking out the [Fonts] section on in the UDKGame\Localization\INT\GFxUI.int file. It needs to have the font name and the font it's mapped to identical to what you use in your fla.

    Ex.
    [Fonts]
    NormalFont=Bitstream Vera Sans
    BoldFont=Bitstream Vera Sans,Bold
    StencilFont=Bobs Stencil
    TitleFont=Bobs Title
    About Me | My Blog | Solarity

    TechnicalHome | ScaleformTechnicalGuide | UnrealScriptReference | ReplicationHome | MasteringUnrealScriptBaptismByFire

    Kismet makes sense to me when i 'read' it seeming mostly logic based

  22. #22

    Default

    Quote Originally Posted by Matt Doyle View Post
    • With Basic Latin glyphs embedded
    How do I enable Basic Latin glyphs embedded? I am using Adobe Flash Professional CS5.5 and NOT CS4 like you use for demonstration in your video tutorial.

    Thanks for your help.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.