Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Uploading and embedding fonts during runtime

Explorer ,
Jan 17, 2013 Jan 17, 2013

Good day.

I'm stuck with the following issue:

I have multiple fonts embedded into my application, but i can't embed them all, so i want the user to upload his *.ttf file, and then i want to embed it into my application, all this during runtime, and using only AS3/flex.


All i can think of right now, is upload the file to the server, compile an swf there which has the custom font embedded (i have an idea about how i should link the path to the font), and then load this swf into my main application.

But this is hardcore, basically i have send an instruction to the compiler in order to create the swf with my font (and i have no idea how to do that), as well as keep the whole SDK on the server.


Any other ideas on how to do this?

Basically anything would be appreciated, as i'm really stuck with this one

TOPICS
ActionScript
866
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jan 17, 2013 Jan 17, 2013

It has multiple purposes, one of which is editing, printing and exporting text (and not only) into multiple formats. The user may find a font on the internet that he would like to use instead of the default ones that we provide, that's why i need to let him upload fonts.

Translate
Guru ,
Jan 17, 2013 Jan 17, 2013

I have multiple fonts embedded into my application, but i can't embed them all

Why? I can`t think of any scenario that measure should be necessary other than to build a font-viewer with hundreds of Fonts.

Could you specify the purpose of the application?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 17, 2013 Jan 17, 2013

It has multiple purposes, one of which is editing, printing and exporting text (and not only) into multiple formats. The user may find a font on the internet that he would like to use instead of the default ones that we provide, that's why i need to let him upload fonts.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 17, 2013 Jan 17, 2013

Here is a thread that deals with this problem.

There is a guy posting in it he did solve the problem you are talking about, but I couldn`t find a proof or demo of it.

It's defintiely possible... I've dynamically compiled swfs server side to embed fonts before.


Maybe you should write directly to him.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 17, 2013 Jan 17, 2013

Just a tip: If you would be willing to target AIR instead of Flash you could have direct access to the device`s local fonts via

enumerateFonts()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 17, 2013 Jan 17, 2013

Thank you! Seems like it is the only way out - to compile a new swf on the server using the library you've specified, and then loading it into the main project.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 17, 2013 Jan 17, 2013
LATEST

You`re welcome. Would you kindly close the thread if you are satisfied with the answer?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines