Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-29 Thread allandt bik-elliott (thefieldcomic.com)
Out of interest try it with a different font - I've had all sorts of
problems embedding Arial in the past

On 28 Jun 2010 20:34, Bill S. lists...@fo.com wrote:

Hi Karl.

I did try all combos of arial, Arial, _arial before asking.

And the fontname in the ttf itself is Arial.

Also, the exact same code works in CS4.

I think it's the path stuff that John notes.

I'm looking into that now.

Thanks
~Bill



- Original Message -
From: Karl DeSaulniers
To: Bill S. ; Flash Coders List
Cc:...

___
Flashcoders mailing list
flashcod...@chattyfig.figle...
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-28 Thread Bill S.

Hi Christoffer, thank you for the answer; but adding fontFamily didn't help.

 [Embed(arial.ttf, fontName=_Arial, fontFamily=_Arial, 
mimeType='application/x-font')]


John -- I tried messing with the flex swc but that didn't do it either -- 
although I have a feeling that it is related to this. I am digging further in.

Thanks
~Bill





One of the frustrating things with CS3 Flash was (contrary to many blogs -- and 
I believe the docs) that you could not actually [EMBED] fonts.

However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work again.


The below code is exactly the same in a CS4 and a CS5 FLA. Literally, the same 
fla file was copied and updated to CS5. The font class was untouched.

All it is meant to do is display This is my text, which works in CS4.


The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
 
import fonts._Arial;

[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial(); 

try
  {
 var _title:TextField = new TextField();
with(_title)
 {
x = 1;
y = 1;
alpha = 100;
background = false;
   defaultTextFormat = new 
TextFormat(font=_Arial,size=24,color=0xff,align=center); 
   width = 500;
   visible = true;
   selectable = true;
   type = TextFieldType.INPUT;
   antiAliasType = AntiAliasType.ADVANCED;
   embedFonts = true;
   text = This is my text;
   trace(Embedded);  // Embedded is outputted in both cases.
 }
stage.addChild(_title);

}
catch(e)
{
 trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
 import flash.text.Font;
 import flash.display.Sprite;

 public class _Arial extends Sprite
 {
  [Embed(arial.ttf, fontName=_Arial, mimeType='application/x-font')]
  public var m_font:Class;

  public function _Arial():void
  {
   Font.registerFont(m_font);
  }
 }
}


Thanks
~Bill
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-28 Thread John McCormack
In CS5 Publish settings, ActionScript3, Source path there was already a 
path set up for ., which I thought would be enough to find the 
package, but I changed it to the fla's directory 
C:\Users\John\Desktop\Temp and then it found the font package.

I would have expected it to find the saved fla with .

After that I had two errors FontAsset was not found (my FlashBuilder 
error I had seen before) and You have used a feature that requires the 
flex SDK. Then it said Flex SDK Path: $(AppConfig)/ActionScript 
3.0/flex_sdk/4.0.0/


I clicked Update Library path to change the publish settings and then it 
worked okay and reported embeded.

I had copied the font file into the same directory.

I usually build my programs in Flash Builder and so hadn't expected the 
. path problem.


John

On 28/06/2010 13:03, Bill S. wrote:

Hi Christoffer, thank you for the answer; but adding fontFamily didn't help.

  [Embed(arial.ttf, fontName=_Arial, fontFamily=_Arial, 
mimeType='application/x-font')]


John -- I tried messing with the flex swc but that didn't do it either -- 
although I have a feeling that it is related to this. I am digging further in.

Thanks
~Bill





One of the frustrating things with CS3 Flash was (contrary to many blogs -- and 
I believe the docs) that you could not actually [EMBED] fonts.

However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work again.


The below code is exactly the same in a CS4 and a CS5 FLA. Literally, the same 
fla file was copied and updated to CS5. The font class was untouched.

All it is meant to do is display This is my text, which works in CS4.


The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

import fonts._Arial;

[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial();

try
   {
  var _title:TextField = new TextField();
 with(_title)
  {
 x = 1;
 y = 1;
 alpha = 100;
 background = false;
defaultTextFormat = new 
TextFormat(font=_Arial,size=24,color=0xff,align=center);
width = 500;
visible = true;
selectable = true;
type = TextFieldType.INPUT;
antiAliasType = AntiAliasType.ADVANCED;
embedFonts = true;
text = This is my text;
trace(Embedded);  // Embedded is outputted in both cases.
  }
stage.addChild(_title);

}
catch(e)
{
  trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
  import flash.text.Font;
  import flash.display.Sprite;

  public class _Arial extends Sprite
  {
   [Embed(arial.ttf, fontName=_Arial, mimeType='application/x-font')]
   public var m_font:Class;

   public function _Arial():void
   {
Font.registerFont(m_font);
   }
  }
}


Thanks
~Bill
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


   



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-28 Thread Karl DeSaulniers
Try removing the underscore in your font name. In my experience, when  
embeding fonts, the name of the font in your code must match the font  
name  exactly. cAse SeNsiTiVe.


I believe it should be.

Arial
Not
_Arial

And if your embedding arial.ttf, it should be arial as the font name.

Hth,
Karl

Sent from losPhone

On Jun 28, 2010, at 7:03 AM, Bill S. lists...@fo.com wrote:



Hi Christoffer, thank you for the answer; but adding fontFamily  
didn't help.


[Embed(arial.ttf, fontName=_Arial, fontFamily=_Arial,  
mimeType='application/x-font')]



John -- I tried messing with the flex swc but that didn't do it  
either -- although I have a feeling that it is related to this. I am  
digging further in.


Thanks
~Bill





One of the frustrating things with CS3 Flash was (contrary to many  
blogs -- and I believe the docs) that you could not actually [EMBED]  
fonts.


However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work  
again.



The below code is exactly the same in a CS4 and a CS5 FLA.  
Literally, the same fla file was copied and updated to CS5. The font  
class was untouched.


All it is meant to do is display This is my text, which works in  
CS4.



The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

import fonts._Arial;

[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial();

try
 {
var _title:TextField = new TextField();
   with(_title)
{
   x = 1;
   y = 1;
   alpha = 100;
   background = false;
  defaultTextFormat = new TextFormat 
(font=_Arial,size=24,color=0xff,align=center);

  width = 500;
  visible = true;
  selectable = true;
  type = TextFieldType.INPUT;
  antiAliasType = AntiAliasType.ADVANCED;
  embedFonts = true;
  text = This is my text;
  trace(Embedded);  // Embedded is outputted in both cases.
}
stage.addChild(_title);

}
catch(e)
{
trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
import flash.text.Font;
import flash.display.Sprite;

public class _Arial extends Sprite
{
 [Embed(arial.ttf, fontName=_Arial, mimeType='application/x- 
font')]

 public var m_font:Class;

 public function _Arial():void
 {
  Font.registerFont(m_font);
 }
}
}


Thanks
~Bill
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-28 Thread Bill S.
Hi Karl.

I did try all combos of arial, Arial, _arial before asking.

And the fontname in the ttf itself is Arial.

Also, the exact same code works in CS4.

I think it's the path stuff that John notes.

I'm looking into that now.

Thanks
~Bill


  - Original Message - 
  From: Karl DeSaulniers 
  To: Bill S. ; Flash Coders List 
  Cc: flashcoders@chattyfig.figleaf.com 
  Sent: Monday, June 28, 2010 2:24 PM
  Subject: Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?


  Try removing the underscore in your font name. In my experience, when  
  embeding fonts, the name of the font in your code must match the font  
  name  exactly. cAse SeNsiTiVe.

  I believe it should be.

  Arial
  Not
  _Arial

  And if your embedding arial.ttf, it should be arial as the font name.

  Hth,
  Karl
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-26 Thread Bill S.
One of the frustrating things with CS3 Flash was (contrary to many blogs -- and 
I believe the docs) that you could not actually [EMBED] fonts.

However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work again.


The below code is exactly the same in a CS4 and a CS5 FLA. Literally, the same 
fla file was copied and updated to CS5. The font class was untouched.

All it is meant to do is display This is my text, which works in CS4.


The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
 
import fonts._Arial;

[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial(); 

try
  {
 var _title:TextField = new TextField();
with(_title)
 {
x = 1;
y = 1;
alpha = 100;
background = false;
   defaultTextFormat = new 
TextFormat(font=_Arial,size=24,color=0xff,align=center); 
   width = 500;
   visible = true;
   selectable = true;
   type = TextFieldType.INPUT;
   antiAliasType = AntiAliasType.ADVANCED;
   embedFonts = true;
   text = This is my text;
   trace(Embedded);  // Embedded is outputted in both cases.
 }
stage.addChild(_title);

}
catch(e)
{
 trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
 import flash.text.Font;
 import flash.display.Sprite;

 public class _Arial extends Sprite
 {
  [Embed(arial.ttf, fontName=_Arial, mimeType='application/x-font')]
  public var m_font:Class;

  public function _Arial():void
  {
   Font.registerFont(m_font);
  }
 }
}


Thanks
~Bill


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-26 Thread Christoffer Enedahl
I don't know about cs5, but this thing got me a day ago when I needed to 
use stysheets and fonts, I had to add fontFamily in the embed tag aswell 
for the font to show.


 [Embed(arial.ttf, fontName=_Arial, fontFamily=_Arial,
mimeType='application/x-font')]

HTH/Christoffer



Bill S. skrev:

One of the frustrating things with CS3 Flash was (contrary to many blogs -- and 
I believe the docs) that you could not actually [EMBED] fonts.

However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work again.


The below code is exactly the same in a CS4 and a CS5 FLA. Literally, the same 
fla file was copied and updated to CS5. The font class was untouched.

All it is meant to do is display This is my text, which works in CS4.


The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
 
import fonts._Arial;


[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial(); 


try
  {
 var _title:TextField = new TextField();
with(_title)
 {
x = 1;
y = 1;
alpha = 100;
background = false;
   defaultTextFormat = new TextFormat(font=_Arial,size=24,color=0xff,align=center); 
   width = 500;

   visible = true;
   selectable = true;
   type = TextFieldType.INPUT;
   antiAliasType = AntiAliasType.ADVANCED;
   embedFonts = true;
   text = This is my text;
   trace(Embedded);  // Embedded is outputted in both cases.
 }
stage.addChild(_title);

}
catch(e)
{
 trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
 import flash.text.Font;
 import flash.display.Sprite;

 public class _Arial extends Sprite
 {
  [Embed(arial.ttf, fontName=_Arial, mimeType='application/x-font')]
  public var m_font:Class;

  public function _Arial():void
  {
   Font.registerFont(m_font);
  }
 }
}


Thanks
~Bill


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Embedded Fonts: Works in CS4, Fails in CS5?

2010-06-26 Thread John McCormack
I was trying to do this today and kept getting errors and then came 
across this:


http://forums.adobe.com/thread/441087

It goes on to say:

Turns out the packages have been split up at least as early as build 
7410 (May/2009) and I was including flex4.swc where the mx classes no 
longer reside.


I am not sure if it's the problem but I changed the classes I was using 
and that fixed it.


John

On 26/06/2010 17:38, Bill S. wrote:

One of the frustrating things with CS3 Flash was (contrary to many blogs -- and 
I believe the docs) that you could not actually [EMBED] fonts.

However this worked wonderfully in CS4.

But now, in (a fully updated) CS5 I can't seem to get EMBED to work again.


The below code is exactly the same in a CS4 and a CS5 FLA. Literally, the same 
fla file was copied and updated to CS5. The font class was untouched.

All it is meant to do is display This is my text, which works in CS4.


The code is the same for both CS4 and CS5.
Am I missing something in the code? Or a setting?


import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

import fonts._Arial;

[SWF(backgroundColor=#ddffdd, frameRate=30)]


var Arial:_Arial = new _Arial();

try
   {
  var _title:TextField = new TextField();
 with(_title)
  {
 x = 1;
 y = 1;
 alpha = 100;
 background = false;
defaultTextFormat = new 
TextFormat(font=_Arial,size=24,color=0xff,align=center);
width = 500;
visible = true;
selectable = true;
type = TextFieldType.INPUT;
antiAliasType = AntiAliasType.ADVANCED;
embedFonts = true;
text = This is my text;
trace(Embedded);  // Embedded is outputted in both cases.
  }
stage.addChild(_title);

}
catch(e)
{
  trace(error in TextField setup:  + e);
}


// the fonts._Arial class
package fonts
{
  import flash.text.Font;
  import flash.display.Sprite;

  public class _Arial extends Sprite
  {
   [Embed(arial.ttf, fontName=_Arial, mimeType='application/x-font')]
   public var m_font:Class;

   public function _Arial():void
   {
Font.registerFont(m_font);
   }
  }
}


Thanks
~Bill


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


   



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders