Git Product home page Git Product logo

Comments (7)

Markham avatar Markham commented on August 17, 2024

It's probably more that the embedded font doesn't support non-English characters.

from flixel.

nshen avatar nshen commented on August 17, 2024

could you fix that in a future version? although the embedded font is very beautiful,but not everyone speak english..

from flixel.

Markham avatar Markham commented on August 17, 2024

The font contains the characters for most Latin-character-based languages, and appears to be available through a free license. I'm not sure if Adam can find one that contains more characters than that while being free to use, but that doesn't stop you from embedding your own font and using that.

from flixel.

nshen avatar nshen commented on August 17, 2024

sorry my english is not good, I mean a language not character, why it must embed font?
add(new FlxText(0,0,100,"I am Chinese ,中文无法显示?"))

from flixel.

Markham avatar Markham commented on August 17, 2024

The current font is embedded into FlxGame with this line:
[Embed(source="data/nokiafc22.ttf",fontFamily="system")] protected var junk:String;

You can use this line in your game's code to embed a font you want to use by changing the source variable to the font to use and the fontFamily variable to a name to use in the FlxText setFormat function.

from flixel.

AdamAtomic avatar AdamAtomic commented on August 17, 2024

Yea it sounds like this is just a font problem, it's hard to find a good bitmap font (which is important for flixel) that supports more than basic latin characters

from flixel.

ryanhex53 avatar ryanhex53 commented on August 17, 2024

you can set the ”embeddedfont“ param in FlxText constructor to false, and set font = "_sans". if you need to display chinese chars.

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.