# Resolving Double-Bold Text Appearance in PDF Export Using Telerik Document Processing

## Environment

| Version    | Product          | Author                                                                          |
| ---------- | ---------------- | ------------------------------------------------------------------------------- |
| 2025.3.806 | RadPdfProcessing | [Desislava Yordanova](https://www.telerik.com/blogs/author/desislava-yordanova) |

## Description

When exporting documents to PDF using Telerik WordsProcessing, the bold text may appear "double-bold" in browsers like Edge or Chrome. This issue arises due to font embedding settings or inaccuracies in font file access, specifically with condensed fonts like Arial Narrow Bold.

## Solution

The "double bold" text appearance in PDF viewers like Edge or Chrome is typically caused by font embedding. Using [FontEmbeddingType.Full](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings) can sometimes cause duplication if both regular and bold font variants are embedded and the viewer applies bold rendering on top. If your style already sets bold, do not set the `Run.FontWeight` property to `FontWeights.Bold` again. Double-assigning bold can lead to rendering issues.

To resolve the double-bold appearance issue, manually register the correct font files for Arial Narrow Bold and configure the style settings properly. Follow these steps:

1. Register the correct font files at the start of your application by using [`FontsRepository.RegisterFont`](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/concepts/fonts#registering-a-font). This ensures that the library uses the appropriate font variations for bold and italic.

   ```csharp
   FontsRepository.RegisterFont(new System.Windows.Media.FontFamily("Arial Narrow"), FontStyles.Normal, FontWeights.Bold,
       File.ReadAllBytes(@"C:\WINDOWS\FONTS\ARIALNB.TTF"));
   FontsRepository.RegisterFont(new System.Windows.Media.FontFamily("Arial Narrow"), FontStyles.Italic, FontWeights.Normal,
       File.ReadAllBytes(@"C:\WINDOWS\FONTS\ARIALNI.TTF"));
   FontsRepository.RegisterFont(new System.Windows.Media.FontFamily("Arial Narrow"), FontStyles.Italic, FontWeights.Bold,
       File.ReadAllBytes(@"C:\WINDOWS\FONTS\ARIALNBI.TTF"));
   ```

2. Define a [style](https://www.telerik.com/document-processing-libraries/documentation/libraries/radwordsprocessing/concepts/styles) for the desired section to apply the correct font family and weight settings.

   ```csharp
   Telerik.Windows.Documents.Flow.Model.Styles.Style referenceStyleChar = new Telerik.Windows.Documents.Flow.Model.Styles.Style("ReferenceStyleChar", StyleType.Character);
   referenceStyleChar.Name = "Reference Style Char";
   referenceStyleChar.CharacterProperties.FontFamily.LocalValue = new ThemableFontFamily("Arial Narrow");
   referenceStyleChar.CharacterProperties.FontStyle.LocalValue = FontStyles.Normal;
   referenceStyleChar.CharacterProperties.FontWeight.LocalValue = FontWeights.Bold;
   document.StyleRepository.Add(referenceStyleChar);
   ```

3. Apply the style to the desired text or [Runs](https://www.telerik.com/document-processing-libraries/documentation/libraries/radwordsprocessing/model/run) in your document.

   ```csharp
   foreach (var referenceParagraph in referenceParagraphs)
   {
       foreach (var inline in referenceParagraph.Inlines)
       {
           Run run = inline as Run;
           if (run != null)
           {
               run.StyleId = "ReferenceStyleChar";
           }
       }
   }
   ```

4. Use the `FontEmbeddingType.Subset` setting when [exporting to PDF](https://www.telerik.com/document-processing-libraries/documentation/libraries/radwordsprocessing/formats-and-conversion/pdf/settings) to avoid redundant font embedding.

   ```csharp
   PdfFormatProvider PDFprovider = new PdfFormatProvider();
   PDFprovider.ExportSettings = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExportSettings
   {
       FontEmbeddingType = FontEmbeddingType.Subset
   };

   using (Stream output = File.OpenWrite(Server.MapPath("~/App_Data/Output.pdf")))
   {
       PDFprovider.Export(document, output, TimeSpan.FromSeconds(10));
   }
   ```

5. Test the exported PDF in different viewers to confirm that the bold text appears correctly without the "double-bold" effect.

## See Also

* [Fonts in PdfProcessing](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/concepts/fonts)
