hallenberg
02-13-2011, 10:04 AM
Hi.. I'm creating styles within actionscript. eg..
styleSheet.setStyle("p", {
fontFamily: "font1, font2, font3"
});
..and I'm getting unexpected results using 'sans-serif' (or '_sans') as a named font. Has anyone else come across this?..
fontFamily: "sans-serif"
(flash player uses _sans device font as expected)
fontFamily: "NonExistentFont, sans-serif"
(flash player uses _serif device font, hmm)
?
Other tests..
fontFamily: "sans-serif, NonExistentFont"
(flash player uses _serif device font)
fontFamily: "NonExistentFont, sans-serif, Verdana"
(flash player uses Verdana)
fontFamily: "sans-serif, Verdana"
(flash player uses Verdana)
Compiling with CS5, testing with v10.1 players.
var css:StyleSheet = new StyleSheet();
css.setStyle("p", {
fontFamily: "NonExistentFont, sans-serif"
});
var tf:TextField = new TextField();
tf.width = 150;
tf.x = tf.y = 10;
tf.styleSheet = css;
tf.htmlText = "<p>Am I sans-serif or what?</p>";
addChild(tf);
styleSheet.setStyle("p", {
fontFamily: "font1, font2, font3"
});
..and I'm getting unexpected results using 'sans-serif' (or '_sans') as a named font. Has anyone else come across this?..
fontFamily: "sans-serif"
(flash player uses _sans device font as expected)
fontFamily: "NonExistentFont, sans-serif"
(flash player uses _serif device font, hmm)
?
Other tests..
fontFamily: "sans-serif, NonExistentFont"
(flash player uses _serif device font)
fontFamily: "NonExistentFont, sans-serif, Verdana"
(flash player uses Verdana)
fontFamily: "sans-serif, Verdana"
(flash player uses Verdana)
Compiling with CS5, testing with v10.1 players.
var css:StyleSheet = new StyleSheet();
css.setStyle("p", {
fontFamily: "NonExistentFont, sans-serif"
});
var tf:TextField = new TextField();
tf.width = 150;
tf.x = tf.y = 10;
tf.styleSheet = css;
tf.htmlText = "<p>Am I sans-serif or what?</p>";
addChild(tf);