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

Embedding Unicode Characters

New Here ,
Jan 24, 2010 Jan 24, 2010

Copy link to clipboard

Copied

Dear List

I am at a loss with flash fonts embedding once again.   I am using Flex 3 for coding and the Flash 4 IDE for font and assets management.

I used the following steps to include the fonts:

CS4 IDE:
------------
1) Library : New Font 'HelveticaNeueRegular'  mapped to Helvetica Neue Regular
2) Export for ActionScript and Export in Frame 1 enabled
3) Class Name: HelveticaNeueRegular
4) Base Class: flash.text.font
5) Publish file as swc

Flex:
----
6) Include the swc file in the project.
7) Code: Font.registerFont(HelveticaNeueRegular);

External XML:
8) Use an external xml file for all dynamic text.  Define css classes with the span tag

External CSS:
9) Define the styles like this:
.articleText{
    font-family:"Helvetica Neue";
    font-size:15;
    color:#000000;
}

The Problem:
Now the above works fine, but when I try to display special characters such as superscripts or Caron accents they don't show up.

What I've tried:
I've tried to put an additional textfield with the additional characters (ie: ²Žž) to embed on the stage in the CS4 IDE as well as in the library as a separate symbol with the export in 1st frame enabled.  In both cases I included the characters with the text property option 'Character Embedding' > 'Include these Characters' and I also put the characters in the textfield itself.  I used both the real name of the font as well as the Libaray Font name (ie: HelveticaNeueRegular*)

No luck

Any suggestions on how to get these special unicode character outlines to display?

Thank you all

Regards

sk

TOPICS
ActionScript

Views

3.3K

Translate

Translate

Report

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
Guest
Jan 24, 2010 Jan 24, 2010

Copy link to clipboard

Copied

are you on pc? or mac?

if youre on pc.. go into accessories and look at the character map and select helvetica nue and let see if it has those characters in its font mapping.

Votes

Translate

Translate

Report

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
New Here ,
Jan 24, 2010 Jan 24, 2010

Copy link to clipboard

Copied

Hi iFezec

Thank you for your reply.  I am on a Mac.  I've checked the font mapping in font book and all the characters are listed.

Hmm ... ?

-sk

Votes

Translate

Translate

Report

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
Guest
Jan 24, 2010 Jan 24, 2010

Copy link to clipboard

Copied

i had asked that because i too am on a mac but i know that some fonts do not have subsets which is why when you on a pc include a new font you strictly get that font.

macs are different because they have a different way to map a font.

I was hoping this might shed light on the matter.

There is a way to create your own font list using flexbuilder and unicode ranges.  this will be able to assist you in this case scenario but once again you need to be able to view all the characters in the font list for their unicode values.

Votes

Translate

Translate

Report

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
New Here ,
Jan 25, 2010 Jan 25, 2010

Copy link to clipboard

Copied

Thank you again.  I remember having a hard time finding a suiteable and working solution to embed the outlines for xml / html text / external css.  Somehow all other solutions had some sort of drawback or plainly didn't work.  Since I do have the CS4 IDE I would imagine that above solution should work.  In the past putting a dynamic text field on the stage and embedding additional characters through the property window would work.

Not sure what to do now... 

I guess I can try again to embed the fonts by linking it directly to the font in the Flex IDE and then specify the unicode fonts there.  I will give it a shot.  If someone knows of a way of making this work in CS4 > export to .swc for Flex (as3 project) please let me know.

Much thanks to everyone.

Regards

sk

Votes

Translate

Translate

Report

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
New Here ,
Jan 25, 2010 Jan 25, 2010

Copy link to clipboard

Copied

You can get a good idea of how to create font swfs using unicode character and load them at runtime  from GotoAndLearn() explained very comprehensively by Lee Brimelow from Adobe.

http://adobe.edgeboss.net/download/adobe/adobetv/gotoandlearn/runtimefonts.mov

Hope this helps!

Ben.

Votes

Translate

Translate

Report

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
New Here ,
Jan 26, 2010 Jan 26, 2010

Copy link to clipboard

Copied

LATEST

Hello

The above tutorial was very helpful.  Thank you very much!

I forgot to use the UTF-8 encoding for my xml file.

I ended up using the following code for embedding the font:

[Embed(systemFont="Helvetica Neue", fontName="Helvetica Neue", mimeType="application/x-font", unicodeRange="U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F")]
private static const HelveticaNeueRegular:Class;

Font.registerFont(HelveticaNeueRegular);

Thank you everyone for all your help.

Regards,

sk

Votes

Translate

Translate

Report

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