No need to set the SelectedFont since it is no longer used
Use Font instead of SelectedFont which can be null if there are more than one font within the selected text
This commit is contained in:
parent
bb3844538c
commit
71fb86effb
@ -858,7 +858,7 @@ namespace Volian.Controls.Library
|
||||
// dyLineSpacing is Spacing between lines. the PFS_EXACT sets line spacing as the spacing from one
|
||||
//line to the next, in twips - thus the 1440.
|
||||
|
||||
pft.dyLineSpacing = Convert.ToInt32(.5 + richTextBox.SelectionFont.GetHeight(dpi)) * 1440 / dpi;
|
||||
pft.dyLineSpacing = Convert.ToInt32(.5 + richTextBox.Font.GetHeight(dpi)) * 1440 / dpi;
|
||||
SetParaFormat(richTextBox, pft);
|
||||
}
|
||||
public static E_FontStyle GetFontStyle(RichTextBox richTextBox)
|
||||
|
@ -226,7 +226,7 @@ namespace Volian.Controls.Library
|
||||
// IMPORTANT: SetLineSpacing must be set before Links, otherwise it
|
||||
// was confusing the 'handle' of the rtf box.
|
||||
//Console.WriteLine("'font',{0}", Font);
|
||||
if(Text == "")SelectionFont = Font; // Initialize SelectionFont
|
||||
//if(Text == "")SelectionFont = Font; // Initialize SelectionFont
|
||||
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
||||
AddRtfText(vlntxt.StartText);
|
||||
//AddRtfStyles();
|
||||
|
Loading…
x
Reference in New Issue
Block a user