Fonts not embedded Flash CS4 AS3

Maybe you can help me with the problem that I am experiencing. Project URL: http://www.mauriciogiraldo.com/vgline/beta/

This is a Drupal-connected, AMFPHP-connected AS3 web application. Data passes through Flash without any problems, I confirmed that UTF-8 is good and that’s it. The problem can be better seen in these URLs:

http://www.mauriciogiraldo.com/vgline/beta/#/146

Open text version of this link:

http://www.mauriciogiraldo.com/vgline/node/146

(Pay attention to the name of the guy)

The Inconsolata font, although I could use any open-source monospace font if necessary. You can see that I embedded the font (I even chose dynamic text fields to insert the whole thing, the full encoding), as well as the "New Font" menu in the library. Inconsolata appears with an asterisk in the CS4 development tool (which, according to Adobe's documentation, means the thing is built-in).

I tried other options for embedding fonts to no avail. Inconsolata seems to have this “ō” character when used in creation, but it does not appear in dynamic texts.

, : static, (WTF). , ( " " - , , ... ). , - Times New Roman.

AS3 ( ).

HTML (.htmlText) CSS.

:

http://code.google.com/p/vgline/

, , :

http://code.google.com/p/vgline/source/browse/trunk/src/TLDetail.as

:

 var ss:StyleSheet = new StyleSheet();
 var css:String = ".title { color:#333333; font-family:Inconsolata; font-size:16; leading:2; } ";
 css += ".date { color:" + StringUtils.rgb2web(data.color.r, data.color.g, data.color.b) + "; font-family:Inconsolata; font-size:14; leading:4; } ";
 css += ".text { color:#333333; font-family:Inconsolata; font-size:11; leading:4; } ";
 css += ".link { color:#000000; font-family:Inconsolata; font-size:11; leading:4; text-decoration:underline; } ";
 css += "a:hover { text-decoration:none; } ";
 ss.parseCSS(css);
 var fechahtml:String = "<span class='date'>";
 if (data.mes != null && data.dia != null) {
         fechahtml += data.dia + " " + StringUtils.month2name(data.mes) + " " + data.anotext;
 } else if (data.mes != null) {
         fechahtml += StringUtils.month2name(data.mes) + " " + data.anotext;
 } else {
         fechahtml += data.anotext;
 }
 fechahtml += "</span>";
 date_txt = new TextField();
 date_txt.width = 275;
 date_txt.embedFonts = true;
 date_txt.antiAliasType = "advanced";
 date_txt.styleSheet = ss;
 date_txt.htmlText = fechahtml;
 date_txt.x = 8;
 date_txt.y = 3;

 addChild(date_txt);

. , .

+3
3

- , flash. ( ).

  • ( ) , Font ( MyFont)
  • TextFormat ( frmt)
  • frmt.font = new MyFont().fontName
  • TextField ( tf)
  • tf.embedFonts = true tf.defaultTextFormat = frmt

, .

+3

Arial Regular ( HTML), , html AS.

Lucida Sans, .

+1

.

. , swf , IDE (flash cs3), -. , Arial. Arial .

, , .

New Lucida Console? ( Tōru Iwatani, 2 , Courier New, Lucida Console, , , , .


EDIT:

,

dafont.com

, , :

var fonts:Array = Font.enumerateFonts();
for(var i:int = 0 ; i < fonts.length; i++){
    if(fonts[i].hasGlyphs('ō')) trace(fonts[i].fontName);
}

, :

Monaco
Lucida Grande
Bitstream Vera Sans Mono
saxMono
JackInput
Liberation Mono Regular
F25 Bank Printer

.

, :

library embed

:

stage embed

, , , :)

l.text = j.text = f.text = li.text = s.text = b.text = 'Hello Tōru Iwatani...Hello Tōru Iwatani...Hello Tōru Iwatani...';

var lucida:TextField = getStyledTextField("Lucida Grande");
var liberation:TextField = getStyledTextField("Liberation Mono Regular");
var sax:TextField = getStyledTextField("saxMono");
addChild(lucida);
addChild(liberation);
addChild(sax);
liberation.y = 30;
sax.y = 60; 
lucida.htmlText= liberation.htmlText = sax.htmlText = "<body><span class='text'>Hello Tōru Iwatani...</span></body>";

function getTextField(font:String):TextField{
    var label:TextField = new TextField();
    label.defaultTextFormat = new TextFormat(font,11,0x33333);
    label.autoSize = TextFieldAutoSize.LEFT;
    label.border = true;
    label.embedFonts = true;
    return label;
}

function getStyledTextField(font:String):TextField{
    var style:StyleSheet = new StyleSheet();
    style.parseCSS(".text { color:#333333; font-family:"+font+";  }");
    var label:TextField = new TextField();
    label.styleSheet = style;
    label.autoSize = TextFieldAutoSize.LEFT;
    label.border = true;
    label.embedFonts = true;
    return label;
}

l, li, b, j .. lucida grande, , bitstream vera sans mono, JackInput ..

I'm not sure what the problem is, but embedding the characters in the scene worked for me. Also, I embedded all the glyphs to make sure. It takes ages to compile, you can choose the font that you like from the ones that work, and gradually take out the glyphs until you find the minimum number of glyphs that you need to use.

Goodluck, George

0
source

Source: https://habr.com/ru/post/1728776/


All Articles