I'm defining a couple of styles in code :-
Code
aStyle := Editor.ParStyles.AddStyle(STYLE_PLAIN); aStyle.ASetFontName('Verdana'); aStyle.ASet(WPAT_CharFontSize, 15*100); // 15pt aStyle := ditor.ParStyles.AddStyle(STYLE_QUOTED); aStyle.ASetFontName('Lucida Console'); aStyle.ASet(WPAT_CharFontSize, 14*100); // 14pt
I then try to set STYLE_PLAIN as the active style
But the text is rendered using the font and size from CurrAttr which is 11pt Arial. I've tried setting Editor.CurrAttr.StyleName to STYLE_PLAIN as well, but that makes no difference.
What am I missing?
Here's what the saved text looks like in WPT format (I've just taken the bit from the end)
Code
<stylesheet><pstyle name="Plain" nr=1 wpsty=[[CharFont:'Verdana';CharFontSize:1500;CharStyleMask:7;CharBGColor:clWhite;]]/>
<pstyle name="Quoted" nr=2 wpsty=[[CharFont:'Lucida Console';CharFontSize:1400;CharStyleMask:7;CharColor:clGreen;CharBGColor:clWhite;]]/>
</stylesheet><div><cs nr=1 wpsty=[[CharFont:'Arial';CharFontSize:1100;]]/><c nr=1/>Testing lkfj sldjf lsdjflsdljsd lksdlkf jlsjfd</div>