Viewing 1 replies (of 1 total)
  • Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Currently, Gravity PDF makes no guess work when registering custom fonts with Mpdf (the software used to generate PDFs). What that means is, since not all fonts support Open Type layout tables (what’s used to join the cursive Arabic font) we don’t enable this functionality at all.

    If you’d like to enable this yourself you can use the “mpdf_font_data” WordPress filter at priority 15 to modify the $fonts array and include the appropriate ‘useOTL’ and ‘useKashida’ options for your custom font. That might look like this:

    add_filter( 'mpdf_font_data', function( $fonts ) {
       if ( isset( $fonts['notosans'] ) ) {
          $fonts['notosans']['useOTL']     = 0xFF;
          $fonts['notosans']['useKashida'] = 50;
       }
    
       return $fonts;
    }, 15 );

    You’ll need to adjust ‘notosans’ to the font key assigned to your font, and adjust ‘useOTL’ and ‘useKashida’ as appropriate to your font family.

    If you’d rather not do this configuration, you can select one of the pre-installed fonts that do support Arabic, including XB Riyaz, Lateef or Bahif Uthman Taha.

    • This reply was modified 6 years, 3 months ago by Jake Jackson.
Viewing 1 replies (of 1 total)
  • The topic ‘the space between the Arabic letters is displayed’ is closed to new replies.