Copy link to clipboard
Copied
Hi
I am going round in circles with embedded fonts! I am using Flash on a Mac. When I embed my fonts and publish all looks good, I have embedded GG Superscript Sans and GG Subscript Sans. I am using Arial (not embedded). I have drawn text boxes and used the check options
When viewing the site in Safari on the Mac I get perfection, subs, supers and bold. But in Windows (and Puffin on my iphone) the subs and supers do not show up. The bold does (<b> tag in external text file).
The AS3 code in the flash swf is;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
import flash.text.StyleSheet;
// requests
var c21specheadReq:URLRequest = new URLRequest("c21spechead.txt");
var c21specbox1Req:URLRequest = new URLRequest("c21specbox1.txt");
var c21specbox2Req:URLRequest = new URLRequest("c21specbox2.txt");
var cssReq:URLRequest = new URLRequest("styles.css");
// loaders
var c21specheadLoader:URLLoader = new URLLoader();
var c21specbox1Loader:URLLoader = new URLLoader();
var c21specbox2Loader:URLLoader = new URLLoader();
var cssLoader:URLLoader = new URLLoader();
// listeners
c21specheadLoader.addEventListener(Event.COMPLETE, c21specheadLoaded);
c21specbox1Loader.addEventListener(Event.COMPLETE, c21specbox1Loaded);
c21specbox2Loader.addEventListener(Event.COMPLETE, c21specbox2Loaded);
cssLoader.addEventListener(Event.COMPLETE, cssLoaded);
function c21specheadLoaded(event:Event):void {
txtspec_txt.htmlText = c21specheadLoader.data;
}
function c21specbox1Loaded(event:Event):void {
txtbox1_txt.htmlText = c21specbox1Loader.data;
}
function c21specbox2Loaded(event:Event):void {
txtbox2_txt.htmlText = c21specbox2Loader.data;
}
function cssLoaded(event:Event):void {
var sheet:StyleSheet = new StyleSheet();
sheet.parseCSS(cssLoader.data);
txtspec_txt.styleSheet = sheet;
txtbox1_txt.styleSheet = sheet;
txtbox2_txt.styleSheet = sheet;
}
// Load the files
c21specheadLoader.load(c21specheadReq);
c21specbox1Loader.load(c21specbox1Req);
c21specbox2Loader.load(c21specbox2Req);
cssLoader.load(cssReq);
The text file looks like this;
(g) When atoms share pairs of electrons, they form covalent bonds.
These bonds between atoms are strong.
Some covalently bonded substances consist of simple molecules such as
H<font face = 'GG Subscript Sans'>2</font>,
Cl<font face = 'GG Subscript Sans'>2</font>,
O<font face = 'GG Subscript Sans'>2</font>,
HCl, H<font face = 'GG Subscript Sans'>2</font>O,
NH<font face = 'GG Subscript Sans'>3</font>
and CH<font face = 'GG Subscript Sans'>4</font>.
Others have giant covalent structures (macromolecules), such as diamond and silicon dioxide.
<b>(i) The electrons in the highest occupied energy levels (outer shell)
of metal atoms are delocalised and so free to move through the whole structure.
This corresponds to a structure of positive ions with electrons between the
ions holding them together by strong electrostatic attractions. </b>
The stylesheet is embarrassingly small!
body {
background-color: white;
font-family:'Arial';
}
img {
border-width: 0;
}
I'm trying for functionality before I decorate.
Frustratingly, when playing with the checkboxes for the property inspecto for my text box I DID create a version that had subscript and superscript working in BOTH windows and mac browsers; BUT the BOLD stopped at that point.
Very frustrating.
I'd be delighted if someone could point me to a solution.
Thanks
Mark
Copy link to clipboard
Copied
OK - it now works using Puffin Browser on my iphone, which seems to produce the same results as Windows browsers.
I have changed to a TT font (Garamond) and embedded regular and bold versions.
Very odd that this now cures the sub super problem.
Lesson learned; embed all fonts used, slightly more cumbersome swf but functional.
Now to look through the fonts for one that I like, Verdana is not my favourite!
Any logic to my solution would be grateful!
Mark
Find more inspiration, events, and resources on the new Adobe Community
Explore Now