Code Monkey home page Code Monkey logo

Comments (3)

ajwfrost avatar ajwfrost commented on June 1, 2024 1

You can now load in a TTF file at runtime, and then use this to render text via the Flash Text Engine classes, see the update to FontDescription:
https://airsdk.dev/reference/actionscript/3.0/flash/text/engine/FontDescription.html#createFromByteArray()
(It actually seems to work with font files that have true-type outlines too..)

But to do the same for TextField and 'normal' Font objects, we would need to adapt some Java code from the Adobe build tools (that we don't (yet) have source code for) so we are hoping to provide this but it's not going to be soon..

thanks

from adobe-runtime-support.

ajwfrost avatar ajwfrost commented on June 1, 2024 1

TextField isn't going to help with RTL languages though .. all of the complex rendering with combining of glyphs and handling accented marks etc, all sits within the text component used by Flash Text Engine. So for any advanced stuff, it may be that you won't be able to solve it just with TextField.

But yes .. in terms of that font embedding, we will see where we get. It's actually just a translation that's required from the outline mechanisms that are possible within TTF files, to the 'shape' definitions that are used in the SWF files for non-CFF embedded font data. All open source / open spec but probably a very large job, hence trying to get the Java source code that's used within the compiler so that we can translate that to C++ and put it in the runtime..

thanks

from adobe-runtime-support.

ylazy avatar ylazy commented on June 1, 2024

It's sad to say that the Flash Text Engine is too complex to use compared to TextField. To use FTE with TextField-like features, I need something like the Text Layout Framework (that has been deprecated). I'm building a framework to implement the Adobe Spectrum to AS3. I had spent over 1 month tried to build something like the TLF but had to give up. Then I came back to the old friend TextField and successfully implemented almost all features I need (undoable, skinable, text coloring...) using a wrapper. Now everything is ok except some issues with the font embedding, RTL languages, paragraph spacing, superscript, subscript (that I can't do by myself). Hope to see font embedding on TextField in the not too far future...

Thank you!

from adobe-runtime-support.

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.