Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] TextField and StageText apply font file at runtime (OTF/TTF/TTC etc) #149

Open
itlancer opened this issue Nov 14, 2019 · 2 comments

Comments

@itlancer
Copy link

Feature Description

For many projects using dynamic fonts (loaded at runtime) is essential. Not embedding fonts inside SWF or bundle with manifest.
For graphics and text editors for example (where user can choose and add your own font) for now there is no way to use TextField and StageText with external fonts files (OTF/TTF/TTC etc) that could be loaded and applied dynamically at runtime.
AIR should support loading and applying fonts and runtime via file/url path to font, font ByteArray data or something like that.
This essential for Enterprise solutions.

Related issue: https://tracker.adobe.com/#/view/AIR-3829000

Known Workarounds

none

  • for some OSes you can write native extension but there is nothing you can do with Android for example
@ajwfrost
Copy link
Collaborator

This is an interesting idea; in terms of TextField, when this uses embedded fonts it uses something that has been processed by the AS3 compiler where the font data is translated into SWF 'shape' objects.. whereas the embedded fonts used by TextBlock/Flash Text Engine code are 'CFF' and just include the truetype font data directly. (See the SWF file spec if you're really interested!)

So, trying to render embedded fonts in a TextField that are provided at runtime as binary files would require us to do the necessary processing and could be problematic ... but I'm wondering whether we could instead basically use these in device text mode i.e. non-embedded, giving the font file to the OS and getting the platform to render the text for us.

So, this might be feasible in some sort of form.. thanks for the suggestion!

@manishpatel0404
Copy link

but I'm wondering whether we could instead basically use these in device text mode i.e. non-embedded, giving the font file to the OS and getting the platform to render the text for us.

@ajwfrost this might also be a good solution for issue #1143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants