C# 如何从RichTextBox Rtf中提取字体名称
假设我的RichTextBox在C#中有特定的Rtf代码C# 如何从RichTextBox Rtf中提取字体名称,c#,richtextbox,rtf,C#,Richtextbox,Rtf,假设我的RichTextBox在C#中有特定的Rtf代码 "{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}" 我想做的是从给定的Rt
"{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}"
我想做的是从给定的Rtf中提取字体名称,以便将其打印到控制台中。
所以我只想从给定的Rtf中获取Times New Roman和其他字体。您的文件格式无效。它只是字体表部分。您可能需要解析它并从\fcharsetN到\fcharsetN中选择部分;您的文件格式无效。它只是字体表部分。您可能需要解析它并从\fcharsetN到\fcharsetN中选择部分;