External fonts not working on Rich Text Editor

Hi again to everyone! I'm trying to apply external fonts on my Rich Text Editor of my angular 12 project, but only Arial and Courier New are working. I need at least Times New Roman and Tahoma to work. I tried adding via cdn, downloading .tff files and importing on css, tried google fonts but only Poppins font work. I realized that on syncfusion documentation, the example of using google fonts is not working too. Its an issue that has to be adjusted or is there another way to implement external fonts?


Thank you!


2 Replies

BS Buvana Sathasivam Syncfusion Team February 24, 2022 04:01 AM UTC

Hi Felix, 
 
Currently, we are validating your reported query. We will update you with further details on February 25, 2022.  
 
Regards, 
Buvana S 



BS Buvana Sathasivam Syncfusion Team February 25, 2022 09:57 AM UTC

Hi Felix, 
 
Query #1: “I'm trying to apply external fonts on my Rich Text Editor of my angular 12 project, but only Arial and Courier New are working. I need at least Times New Roman and Tahoma to work.” 
Yes, you can customize the default font names and add your customized font words and font names in the text and value properties of the fontFamily items. Check the below code and sample for reference.  
Index.html 
 <link 
      rel="stylesheet" 
      rel='nofollow' href=http://fonts.googleapis.com/css?family=Great+Vibes 
    /> 
    <link 
      rel="stylesheet" 
    /> 
 
app.component.html 
<ejs-richtexteditor  [fontFamily]="fontFamily">….. 
 </ejs-richtexteditor> 
 
app.component.ts 
public fontFamilyObject = { 
    default: 'Segoe UI', 
    items: [ 
      { 
        text: 'Segoe UI', 
        value: 'Segoe UI', 
        class: 'e-segoe-ui', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Courier New', 
        value: 'Courier New,Courier,monospace', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Great vibes',     // Goggle font 
        value: 'Great Vibes,cursive', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Times New Roman', 
        value: 'Times New Roman,Times,serif', 
        class: 'e-times-new-roman', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Arial', 
        value: 'Arial,Helvetica,sans-serif', 
        class: 'e-arial', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Tahoma', 
        value: 'Tahoma,Geneva,sans-serif', 
        class: 'e-tahoma', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
      { 
        text: 'Shizuru',          // Goggle font 
        value: 'Shizuru, cursive', 
        class: 'e-shizuru', 
        command: 'Font', 
        subCommand: 'FontName', 
      }, 
    ], 
  }; 
 
 
 
Query #2: “I realized that on syncfusion documentation, the example of using google fonts is not working too. Its an issue that has to be adjusted or is there another way to implement external fonts?” 
We were unable to reproduce your reported issue. Can you please check the above sample and if the issue persists, share the video with your issue? 
 
 
 
Regards, 
Buvana S 


Loader.
Up arrow icon