hi all
i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
characters like the euro sign and accentuated german a letter.
whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
How ive set up the fla:
1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
this.createTextField("T_text",1,0,10,Stage.width-60,50);
var myFmt = new TextFormat();
myFmt.size = 12;
myFmt.leading = 3;
myFmt.font = "Arial";
T_text.html = true;
T_text.autoSize = "left";
T_text.multiline = true;
T_text.wordWrap = true;
T_text.selectable = false;
T_text.embedFonts = false;
T_text.textColor = "0x666666";
T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
T_text.setNewTextFormat(myFmt);
now, im calling text from a database.
when calling the text from the browser url bar, there's no chars missing.
its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
http://img210.imageshack.us/img210/340/utf8.png
any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
anyone has seen this issue before and know how to solve it?
regards
correct. you've not correctly embedded your needed font.
click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok. then use:
this.createTextField("T_text",1,0,10,Stage.width-60,50);
var myFmt = new TextFormat();
myFmt.size = 12;
myFmt.leading = 3;
myFmt.font = "ArialID";
T_text.html = true;
T_text.autoSize = "left";
T_text.multiline = true;
T_text.wordWrap = true;
T_text.selectable = false;
T_text.embedFonts = true;
T_text.textColor = 0x666666; // no quotes here. this is a number
T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
T_text.setTextFormat(myFmt); // to format the above text, use setTextFormat(). if you want to format text added after this line, use setNewTextFormat()
kglad, you mean i must select the styles i want to include in the font?
i have done that (together with adding the font to the library - like you said) but the result is that i get all the text in bold italic.
plus, the charactersare still missing from the text. plus, i am using bitmap text.
i don't know if that influences anything.
ive attached an fla with the work im doing
any plus help will be appreciated.
no. but you must embed each font/font family you want to use in that textfield.
if you have more than one font/font family you want to use, you can embed all the fonts/font families in "dummy" textfields and assign fonts using html tags or a stylesheet.
p.s. i don't download and correct files unless hired. for free help, continue posting here.
how do i embbed variants of the same font though?
i need arial normal, italic, bold and bold italic, but i can only assign the font linkage identifier to one font variant in the library.
regards
edit: the attached file is not what i'm working on - it's just a fla with the code posted here on this topic so it's easier to follow what i'm doing.
thanks
you can use as many textformat instances as needed to embed each of the families but you must embed them each the same as you would for different fonts.
you can do with with code using different textformat instances and setTextFormat() (it accepts parameters to specify which font applies to which section(s) of text) or you can use the ide to add dummy textfields.
p.s. you can attach screenshots to this forum.
thanks, but regarding the dummy textfields, ive tried addind four dynamic textfields on the stage, one for each font variant, and embedded the glyphs needed into all four, but i still cannot get some special characters to show up...
the dummy textfiled are placed before the textfield that will display text using all four variants.
any tips as to what i still need to do, or any idea why some characters dont show?
thanks
hi kglad
is my embedding code
this.createTextField("T_text",1,0,10,Stage.width - 60,10);
var txtArial:TextFormat = new TextFormat();
var txtArialBold:TextFormat = new TextFormat();
var txtArialItalic:TextFormat = new TextFormat();
var txtArialBoldItalic:TextFormat = new TextFormat();
txtArial.size = 12;
txtArial.leading = 3;
txtArial.font = "Arial";
txtArialBold.size = 12;
txtArialBold.leading = 3;
txtArialBold.font = "ArialBold";
txtArialItalic.size = 12;
txtArialItalic.leading = 3;
txtArialItalic.font = "ArialItalic";
txtArialBoldItalic.size = 12;
txtArialBoldItalic.leading = 3;
txtArialBoldItalic.font = "ArialBoldItalic";
T_text.html = true;
T_text.autoSize = "left";
T_text.multiline = true;
T_text.wordWrap = true;
T_text.selectable = false;
T_text.embedFonts = false;
T_text.textColor = "0x666666";
T_text.htmlText = "Dies ist ein Typoblindtext. An ihm kann man sehen, ob alle Buchstaben da sind und wie sie aussehen. Manchmal benutzt man Worte wie Hamburgefonts, Rafgenduks oder Handgloves, um Schriften zu testen. Manchmal Sätze, die alle Buchstaben des Alphabets enthalten - man nennt diese Sätze Pangrams. Sehr bekannt ist dieser: The quick brown fox jumps over the lazy old dog. Oft werden in Typoblindtexte auch fremdsprachige Satzteile eingebaut (AVAIL® and Wefoxâ„¢ are testing aussi la Kerning), um die Wirkung in anderen Sprachen zu testen. In Lateinisch sieht zum Beispiel fast jede Schrift gut aus. Quod erat demonstrandum. Seit 1975 fehlen in den meisten Testtexten die Zahlen, weswegen nach TypoGb. 204 § ab dem Jahr 2034 Zahlen in 86 der Texte zur Pflicht werden. Nichteinhaltung wird mit bis zu 245 € oder 368 $ bestraft.";
T_text.setNewTextFormat(txtArial);
T_text.setNewTextFormat(txtArialBold);
T_text.setNewTextFormat(txtArialItalic);
T_text.setNewTextFormat(txtArialBoldItalic);
correct?
regards
no.
you assigned your embedFonts property to be false.
look, you can test if you've embedded fonts correctly by using:
T_text._rotation=3;
if you see no text, you're not embedding fonts correctly.
so, use:
T_text.embedFonts=true;
and then test. if you see no text, use:
/////////////////////////////////////////////////////////
click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok. then use:
this.createTextField("T_text",1,0,10,Stage.width-60,50);
var myFmt = new TextFormat();
myFmt.size = 12;
myFmt.leading = 3;
myFmt.font = "ArialID";
T_text.html = true;
T_text.autoSize = "left";
T_text.multiline = true;
T_text.wordWrap = true;
T_text.selectable = false;
T_text.embedFonts = true;
T_text.textColor = 0x666666; // no quotes here. this is a number
T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
T_text.setTextFormat(myFmt); // to format the above text, use setTextFormat(). if you want to format text added after this line, use setNewTextFormat()
thanks kglad.
i still havent been able to use all variants though.
im using the multiple setTextFormat (i posetd above)
but the text doesnt appear correctly. instead it appears with the last setTextFormat format i added, meaning all of it is italic and bold.
is the script incorrect?
regards
no. your script is going to do exactly what you see.
to use setTextFormat() to assign multiple font families/styles in the same textfield, you must use the 2nd and 3rd parameters to indicate which text indices should be using which textformat. for example, you should be using something like:
T_text.setNewTextFormat(0,40,txtArial);
T_text.setNewTextFormat(40,99,txtArialBold);
T_text.setNewTextFormat(99,111,txtArialItalic);
T_text.setNewTextFormat(111,200,txtArialBoldItalic,);
North America
Europe, Middle East and Africa
Asia Pacific