Git Product home page Git Product logo

Comments (12)

AdamAtomic avatar AdamAtomic commented on August 17, 2024

I have no idea what to do about this, if anybody wants to take point on finding out if there is a Flex 3 and Flex 4 compatible way of doing text that'd be rad!

from flixel.

goshki avatar goshki commented on August 17, 2024

Hm... am I the only one who does not see "Use Flex 3 Compatibility Mode" in the Flex SDK Version fieldset? I'm using Flex Builder 3 as a plugin for Eclipse.

from flixel.

georgik avatar georgik commented on August 17, 2024

@goshki It's in Flash Builder 4 beta 2 (new version of former Flex Builder 3)

from flixel.

goshki avatar goshki commented on August 17, 2024

Thanks for the explanation. For anyone interested in using Flixel (1.50) with Flex SDK 4 (4.0.0.10485) in Flex Builder 3, you have to do the following: go to Project Properties -> Flex Compiler -> Compiler options and in the "Additional compiler arguments" field add the following:

-compatibility-version=3.0.0

After this FlxText should display correctly.

from flixel.

AdamAtomic avatar AdamAtomic commented on August 17, 2024

I'm super interested in actually solving this big, or at least understanding it, so any leads that anybody has I would love to hear them. My sickly stumbling about on Google hasn't turned up anything yet!

from flixel.

stupergenius avatar stupergenius commented on August 17, 2024

Seems like there might be some merit to manually disabling CFF for the font embed. This is all due to the transition between Define3 and Define4 embedding. It's rather unclear to me what the actual issue is, but it appears Flex 4 uses a new Text engine and embeds things differently to match.
The below blog post and Adobe page helped me:
http://www.richardleggett.co.uk/blog/index.php/2009/03/16/definefont4embedding
http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Font+Embedding

So following the blog's advice we would change the font embed in FlxGame to the following:
[Embed(source="data/nokiafc22.ttf",fontFamily="system",cff="false")]

I'm too lazy to try this but I figured I'd post my findings.

from flixel.

Hidoshi avatar Hidoshi commented on August 17, 2024

It still doesn't work here. I'm following the first tutorial (Hello World) and I'm getting the 1067 error.

I'm using Flex Builder 3 (build 3.0.2.214193) and the latest version of Flixel.
Also when I go to project properties I don't see Flex Compiler, but Actionscript Compiler. Tried the compatibility Goshki said, but that gave me a different error (invalid verison specified).

Help would be appreciated.

from flixel.

AdamAtomic avatar AdamAtomic commented on August 17, 2024

Right now the only reliable solution is to use the 3.4 Flex SDK

from flixel.

JohnFly avatar JohnFly commented on August 17, 2024

-compatibility-version=3.0.0 worked for me

from flixel.

timoxley avatar timoxley commented on August 17, 2024

Yep, this is a weird one, I was messing around with it, changed the Metadata in FlxGame to this:

[Embed(source="data/nokiafc22.ttf",fontName="system")]
protected var SystemFont:Class;

Then I referenced SystemFont in the FlxGame constructor:

public function FlxGame(GameSizeX:uint,GameSizeY:uint,InitialState:Class,Zoom:uint=2)
{
    SystemFont
    ...
}

And suddenly it worked! But interestingly, I can't get it to un-work. I've completely undone all of my changes, restarted flash builder, restarted the browser, cleaned my project and none of the above seemed to change anything. It just continued to work using the EXACT same code that wasn't working a few minutes ago. Weird.

Anyway, I'm not sure what exactly made it work, but I have a suspicion it's the use of 'fontName' can someone please test this as I can't seem to break it. :D

from flixel.

mklee avatar mklee commented on August 17, 2024

So the first official non-beta release of Flex 4 came out a few days ago. If you add embedAsCFF='false' to the font line that should fix the issue. So if you change the embed font line in FlxGame.as to the following text should display without using the the compatibility-version fix that now breaks a ton of other things.

[Embed(source="data/nokiafc22.ttf",fontName="system",embedAsCFF="false")] protected var SystemFont:Class;

Of course, I'm having some issues now with embeding txt files, but I dunno if that's a configuration problem on my end or something with Flex SDK 4 again.

from flixel.

AdamAtomic avatar AdamAtomic commented on August 17, 2024

awesome, it looks like that's working!! thanks mklee :)

from flixel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.