Fonts on Ejecta

0 favourites
  • 8 posts
From the Asset Store
Horror Halloween Pixel Art Sprite Font Space Data included
  • Is there a way to load a ttf or any other font file and use the font in an Ejecta built app or is spritefont the only option?

  • HI KFC,

    I'm sorry for poor English, but i think that i found a dirty workaround for fonts+ejecta

    As said Construct2's docs "The Text plugin's 'Set web font' action is not supported." but there is a way to set your font

    I need to get this

    Instead this

    Step by step.

    1. Including your font to xcode project (gotham_pro_black in my case)

    1.1 Put font file to Resources folder and add it to target in modal window - http://joxi.ru/HvbiU_3JTJDiB2Nnw50

    1.2 Check that your font are included as Resources in your bundle - http://joxi.ru/rffiU4wyTJASQEVhdlc

    1.3 Include your font in your application plist - open plist and add a new row called “Fonts provided by application” as array and add name of you font in list. like this - http://joxi.ru/ivjiU4wyTJDeXA-DgEU

    1.4 Now you need to find PostScript name of the font. I used this script to find it in font check.

    http://joxi.ru/C_riU4wyTJDMAjztq9I

    Run the project and find PostScript name in debug window

    http://joxi.ru/vvriU_3JTJA9CHzLsqM

    In my case it is "GothamPro-Black"

    script here:

    for (id familyName in [UIFont familyNames]) {

    NSLog(@"%@", familyName);

    for (id fontName in [UIFont fontNamesForFamilyName:familyName]) NSLog(@" %@", fontName);

    }

    I beilive that there are more easy ways to find it =)

    This script is useless at this point - so delete it.

    2. Now we need to export the project for ejecta and replace name of the font.

    2.1 Go to Win platform to you Construct project and export it for ejecta - http://joxi.ru/svziU4wyTJDEAslCONM

    2.2 Open index.js (i use Notepad++) and replace font name that provided Construct on PostScript name from 1.4 like this - http://joxi.ru/svziU4wyTJDEAslCONM

    In my case i set "Gotham Pro Black" font for all text objects in my capx for easy finding - http://joxi.ru/3v3iU_3JTJBkZMMLGhQ

    Result - http://joxi.ru/Gv7iU4wyTJDQAhPbpmE

    Upload export file to the dropbox.

    3. Check the result. Go to Mac

    3.1 Replace files in you App folder - http://joxi.ru/CgDjU_3JTJAzCN6G7NM

    3.2 Run the project. Now text objects should be set to you font-face =)

    Result:

    One more thing. You can use a multiple fonts. Just add your fonts into Resource folder and add new rows to “Fonts provided by application” array in plist.

    Once again sorry for bad English and i hope this will be usefull for you and C2 developers =)

    Cheers

  • Thanks mikeOstaff it worked like a charm.

    Have you considered posting this as a tutorial so that others could easily find it?

    Oh, and you can easily check the postscript name if you installed the font on your mac by checking the font info (cmd + i) in Font Book.

  • mikeOstaff

    Good documentation mate. You should put it as a tutorial.

    I haven't used it yet, but will do in a bit and let you know if it worked for me.

  • Worked

    I had different fonts, so had some issues at first.

    Some of the fonts are moving away a bit to left... which is not a problem, but it looks weird when font moves off from its holder at the scoreNote

    As far as this tutorial goes, it works as written

    If you have multiple fonts, ensure you find them all and replace them.

    If you didn't set a font or force webfont in your game, then it's proabably Arial font that you need to replace.

  • mikeOstaff

    what is your game? any links?

    Looks interesting.

  • krish, KFC sorry for the delaying. I'm glad that this workaround is work =)

    I have no time to create tutorial or something bigger than post on forum topic, so i will be glad if you guys create this tutorial, because this info is useful for iOs developers.

    mikeOstaff

    what is your game? any links?

    Looks interesting.

    It's our project - RunRabbitRun - hardcore platformer which eat all of our time =) . The game about rabbit which want to find his carrot. This game has been created under the impression of Super Meat Boy and Defrag(Quake3Arena mod).

    You can find more info here - http://runrabbitrun.ru/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • mikeOstaff .. that looks pretty good mate.

    I tried playing with keyboard and would love to play with controller

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)