Copy link to clipboard
Copied
I'd like to buy the 'ITC Stone Sans' family together with 'ITC Stone Phonetic Std', but first I need to find out what the font metrics are. From what I've heard, the phonetic font has different metrics from the rest of the family, which makes line gaps in Word or in Flash totally uneven. Obviously, if that's the case, I wouldn't be able to use this font family, since what I really need is a font with the IPA range, or, if unavailable (as is the case here) and split into 2 fonts, then fonts with matching metrics. I couldn't for the life of me find a way to contact Adobe Support directly and enquire about font features prior to placing my order. I'd be grateful if anyone could answer my question. TIA.
Copy link to clipboard
Copied
The Phonetic font has indeed different vertical metrics from the other fonts. In MS Word (2007 & 2008-Mac) that causes the fonts to not sit on the same baseline:
But in Flash (CS5) the fonts align on the same baseline:
Copy link to clipboard
Copied
and InDesign (CS5) they do as well:
Copy link to clipboard
Copied
Thank you. In Flash, if I use the Classic Text engine and HTML + CSS to combine regular with phonetic font, will that result in different line spacing? E.g. the regular font might have 30 pixels between lines, and then the space between the line with phonetic symbols (same size and leading) and the following one would be 35 pixels?
Copy link to clipboard
Copied
I don't know. Send me an FLA file with that setup and I'll plug in the fonts.
Copy link to clipboard
Copied
I'm afraid I don't know how to do that. There's no option to attach files other than video or images, either here or via private messages, and there's no e-mail address for you. The fla I'd send you is a one-frame, one-layer file; here's the code:
stop();
import flash.text.TextField;
//Text > Font Embedding... > Times LT Std Phonetic:
//Also include these characters:
//čŋœǰɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰˈˉˌˏː˜̥̩̪̬̃
var cssPhon:StyleSheet = new StyleSheet();
cssPhon.setStyle("body", {color:'#000000',fontFamily:'Times LT Std',fontSize:'20',textAlign:'justify',leading:'5'});
cssPhon.setStyle(".bold", {fontFamily:'Times LT Std',fontWeight:'bold'});
cssPhon.setStyle(".it", {fontFamily:'Times LT Std',fontStyle:'italic'});
cssPhon.setStyle(".boldit", {fontFamily:'Times LT Std',fontWeight:'bold',fontStyle:'italic'});
cssPhon.setStyle(".ph", {fontFamily:'Times LT Std Phonetic'});
var strText:String = "An affricate is a type of <i>consonant</i> consisting of a <b>plosive</b> followed by a <b>fricative</b> with the same <b><i>place of articulation</i></b>: examples are the <ph>ʧ</ph> and <ph>ʤ</ph> sounds at the beginning and end of the English words ‘church’ <ph>ʧɜːʧ</ph>, ‘judge’ <ph>ʤʌʤ</ph> (the first of these is voiceless, the second voiced). It is often difficult to decide whether any particular combination of a plosive plus a fricative should be classed as a single affricate sound or as two separate sounds, and the question depends on whether these are to be regarded as separate <i>phonemes</i> or not. It is usual to regard <ph>ʧ</ph>, <ph>ʤ</ph> as affricate phonemes in English (usually symbolised <ph>č</ph>, <ph>ǰ</ph> by American writers); <ph>ts</ph>, <ph>dz</ph>, <ph>tr</ph>, <ph>dr</ph> also occur in English but are not usually regarded as affricates. The two phrases ‘why choose’ <ph>waɪ ʧuːz</ph> and ‘white shoes’ <ph>waɪt ʃuːz</ph> are said to show the difference between the <ph>ʧ</ph> affricate (in the first example) and separate <ph>t</ph> and <ph>ʃ</ph> (in the second).";
var reBStart:RegExp = new RegExp("<b>", "g");
var reBEnd:RegExp = new RegExp("</b>", "g");
var reIStart:RegExp = new RegExp("<i>", "g");
var reIEnd:RegExp = new RegExp("</i>", "g");
var reBIStart:RegExp = new RegExp("<b><i>", "g");
var reBIEnd:RegExp = new RegExp("</i></b>", "g");
var rePhStart:RegExp = new RegExp("<ph>", "g");
var rePhEnd:RegExp = new RegExp("</ph>", "g");
strText = strText.replace(reBStart, "<span class='bold'>");
strText = strText.replace(reBEnd, "</span>");
strText = strText.replace(reIStart, "<span class='it'>");
strText = strText.replace(reIEnd, "</span>");
strText = strText.replace(reBIStart, "<span class='boldit'>");
strText = strText.replace(reBIEnd, "</span>");
strText = strText.replace(rePhStart, "<span class='ph'>");
strText = strText.replace(rePhEnd, "</span>");
var txtTextfield:TextField = new TextField();
txtTextfield.x = 50;
txtTextfield.y = 45;
txtTextfield.width = 450;
txtTextfield.autoSize = TextFieldAutoSize.LEFT;
txtTextfield.embedFonts = true;
txtTextfield.multiline = true;
txtTextfield.wordWrap = true;
txtTextfield.condenseWhite = true;
txtTextfield.styleSheet = cssPhon;
txtTextfield.htmlText = "<body>" + strText + "</body>";
txtTextfield.antiAliasType = "advanced";
txtTextfield.gridFitType = "subpixel";
addChild(txtTextfield);
Quotation source: Peter Roach, A Little Encyclopaedia of Phonetics, a.k.a. English Phonetics and Phonology, The Glossary (2010)
Copy link to clipboard
Copied
I couldn't get that to work. The SWF kept displaying blank, despite embedding the fonts.
So I styled the text manually and here's the result:
I noticed that one of the characters in the text (č : c with caron above) is not supported by the Stone Phonetic font.
My contact is msousa at adobe dot com.
Copy link to clipboard
Copied
Sometimes font embedding is a guessing game even when one has fonts - the trick is to use the same name in the code as the font *really* has - otherwise the text will be blank. In my code I went for the standard option, not having the font to hand to check whether this would work or not. Another option that may work would be (or whatever the names of the fonts are:
var cssPhon:StyleSheet = new StyleSheet();
cssPhon.setStyle("body", {color:'#000000',fontFamily:'Times LT Std Roman',fontSize:'20',textAlign:'justify',leading:'5'});
cssPhon.setStyle(".bold", {fontFamily:'Times LT Std Bold'});
cssPhon.setStyle(".it", {fontFamily:'Times LT Std Italic'});
cssPhon.setStyle(".boldit", {fontFamily:'Times LT Std Bold Italic'});
cssPhon.setStyle(".ph", {fontFamily:'Times LT Std Phonetic'});
or:
var cssPhon:StyleSheet = new StyleSheet();
cssPhon..setStyle("body", {color:'#000000',fontFamily:'Times Std Roman',fontSize:'20',textAlign:'justify',leading:'5'});
cssPhon.setStyle(".bold", {fontFamily:'Times Std Bold'});
cssPhon.setStyle(".it", {fontFamily:'Times Std Italic'});
cssPhon.setStyle(".boldit", {fontFamily:'Times Std Bold Italic'});
cssPhon.setStyle(".ph", {fontFamily:'Times Std Phonetic'});
or:
var cssPhon:StyleSheet = new StyleSheet();
cssPhon.setStyle("body", {color:'#000000',fontFamily:'Times Std',fontSize:'20',textAlign:'justify',leading:'5'});
cssPhon.setStyle(".bold", {fontFamily:'Times Std',fontWeight:'bold'});
cssPhon.setStyle(".it", {fontFamily:'Times Std',fontStyle:'italic'});
cssPhon.setStyle(".boldit", {fontFamily:'Times Std',fontWeight:'bold',fontStyle:'italic'});
cssPhon.setStyle(".ph", {fontFamily:'Times Std Phonetic'});
Usually it's the same name as the one displayed at the bottom of the embedding window.
What do you mean by styling the text manually?
Copy link to clipboard
Copied
Ninna76 wrote:
What do you mean by styling the text manually?
Created a text frame on the stage, pasted the text, and applied the fonts. All via the UI, instead of using your ActionScript code.
Copy link to clipboard
Copied
Thank you.
I seem to have a problem now. On the one hand you've confirmed that the metrics *are* different, on the other, manually styling the text, all seems to be in order. In the meantime, I managed to get hold of someone with the fonts who run my code for me and sent me the screenshots. These, unfortunately, confirm, that different metrics influence line spaces in Flash (compare with [left] and without
phonetic font).
Thank you again for your time.