This is a migrated thread and some comments may be shown as answers.

Some Fonts are not able to bold/italic

8 Answers 360 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
yiping
Top achievements
Rank 1
yiping asked on 13 Jul 2016, 01:31 PM

All fonts which are the sub font style of a font family in c:\windows\fonts are not able to set to bold or italic( bold/Italic are not shown in richtextbox but when exported to word, they are showing correctly). Is there any solution on it?

Some examples: Arial Black, Arial Narrow, Bodoni MT Black, Bodoni MT Condensed,Calibri Light, Franklin Gothic Medium, ... 

8 Answers, 1 is accepted

Sort by
0
yiping
Top achievements
Rank 1
answered on 13 Jul 2016, 01:38 PM
Extra Info: If I put "Arial Narrow" font related file into a folder and read them by var an = System.Windows.Media.Fonts.GetFontFamilies(new Uri("pack://application:,,,/someproject;component/Resources/Arial Narrow/arialn.ttf")); FontManager.RegisterFont(an.First()); The font "./Arial" is added in fonts list and working good as arial narrow. However the texts applied with this font is suffered from export to word/ close reopen.
0
Boyko
Telerik team
answered on 18 Jul 2016, 12:28 PM
Hello Yiping,

I have compared RadRichTextBox with the WPF RichTextBox behavior when displaying bold, italic etc. on the mentioned font families and the behavior is the same.

About your second question, the font "Arial Narrow" is already registered. Please take a look at the attached screenshot from our demos.  Also, I exported and then imported the document and the text is still there.
Please have in mind that the RadRichTextBox will initially show all fonts that are installed on the operation system. 

Regards,
Boyko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
yiping
Top achievements
Rank 1
answered on 19 Jul 2016, 03:09 PM
Here I attached a screen shot of your demo, which I applied Arial Narrow with Bold and Italic but the text are displayed with Arial Narrow without B/I . And second is showing my fonts installation.
0
Boyko
Telerik team
answered on 22 Jul 2016, 01:54 PM
Hi Yiping,

Not all font families allow , italic, etc. to be applied to them. You could compare RadRichTextBox with the WPF RichTextBox behavior when displaying bold, italic etc. on the mentioned font families and the behavior is the same. I confirm that everything works as expected. 

Regards,
Boyko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Joan VANDERWEYST
Top achievements
Rank 1
answered on 09 May 2017, 05:24 PM
I'm having the same issue as described here specifically with the Arial Narrow font. It does not display correctly in the RadRichEditor in bold and italic. I see you said the behavior is the same in both editors but that does not mean it is correct - it is not. My machine has the bold and italic fonts installed correctly (they render correctly in all other applications) but not in the editor control. I saw that there was a known defect like this one when rendering PDF files but I tried the workaround provided in that thread (http://www.telerik.com/forums/radflowdocument-to-pdf---arialnarrow-font-issues) and it didn't help. Is the specific code error mentioned in that thread the cause of this problem and if so is there a plan to fix it?
0
Tanya
Telerik team
answered on 12 May 2017, 02:24 PM
Hello Joan,

As to our notion, the issue with the font styles is related to the WPF framework. RadRichTextBox is built and dependent on that framework, so I am afraid that there is not much we can do in this case. What are the applications you mentioned that work properly? Are they WPF applications or are different?

The public item you have encountered is related to the Document Processing libraries. These components are independent of platform and don't have UI. Therefore, the nature of the issue in this context is different. 

Regards,
Tanya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Joan VANDERWEYST
Top achievements
Rank 1
answered on 15 May 2017, 03:02 PM

From my research on the net I thought the PDF problem was related to the richtextbox problemand since I read that defect was fixed I thought the text box problem was also fixed. Also, all the apps I tried worked fine but they are Microsoft apps (Word, Wordpad, OneNote) and it seems they have internal workaround but for whatever reason aren't fixing the problem in WPF even though it's a know issue since 2008. Sorry for the confusion.

0
Tanya
Telerik team
answered on 18 May 2017, 11:26 AM
Hi Joan,

Yes, both issues seem related, but actually are pretty different when it comes to the implementation, so it is possible to confuse them. The Microsoft applications are working as expected with those fonts, however, their internal implementation is different and doesn't utilize the WPF platform so we cannot compare the applications in this specific case. 

Regards,
Tanya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
RichTextBox
Asked by
yiping
Top achievements
Rank 1
Answers by
yiping
Top achievements
Rank 1
Boyko
Telerik team
Joan VANDERWEYST
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or