I've used this in the past; it handles the case of all-selected in the same way as none-selected. And, you can, optionally, reset the selection after the Font change.
private void SetFont(RichTextBox rtbx, bool restoreselection = false)
{
int selStart = rtbx.SelectionStart;
int selLength = rtbx.SelectionLength;
if (fontDialog1.ShowDialog() == DialogResult.OK)
{
if (selLength == 0) rtbx.SelectAll();
rtbx.SelectionFont = fontDialog1.Font;
if (restoreselection)
{
rtbx.Focus();
rtbx.SelectionStart = selStart;
rtbx.SelectionLength = selLength;
}
}
}