niklasravnsborg / laravel-pdf

📄 Laravel PDF
709 stars 209 forks source link

Arabic font issue #30

Closed umairali closed 6 years ago

umairali commented 7 years ago

Arabic font not connected and its showing like this

captdddure

The right word is الإسم

umairali commented 7 years ago

To fix this issue with just add 2 new parameters in Arabic fonts array in config pdf.php file.

'useOTL' => 0xFF,
'useKashida' => 75,
 'arabic-font' => [
     'R'  => 'arabic-font.ttf',    // regular font
     'B'  => 'arabic-font.ttf',          // optional: bold font
     'I'  => 'arabic-font-Light.ttf',    // optional: italic font
     'BI' => 'arabic-font.ttf',           // optional: bold-italic font
     'useOTL' => 0xFF,
     'useKashida' => 75,
]
niklasravnsborg commented 7 years ago

@umairali Okay I will look at this

erfansahaf commented 7 years ago

@umairali Can we define custom font in config/pdf.php ? Or we should edit mpdf library by ourselves?

niklasravnsborg commented 7 years ago

@erfansahaf Yes, you can define custom fonts like this: https://github.com/niklasravnsborg/laravel-pdf#custom-fonts

erfansahaf commented 7 years ago

@niklasravnsborg I have read the README more than 5 times but I don't know why I didn't see custom font section even once! 😐 Thanks.

niklasravnsborg commented 7 years ago

@erfansahaf No problem!

niklasravnsborg commented 6 years ago

Awesome! This can be closed now :)

sinahosseini76 commented 5 years ago

i have problem with persian fonts i try lots of fonts but don't work please help

erfansahaf commented 5 years ago

@sinahosseini76 Which font do you use? Have you set the OTL options in your configs?

Asim1khan commented 2 years ago

arabic text not show properly like in place of 1 it take the arabic 1 and 0.00 before the point of 0 not showing please help me Subscription Details (2).pdf

mranonyms022 commented 2 years ago

Arabic fonts are working I Need to show Arabic font now What Will do please help

mranonyms022 commented 2 years ago

arabic text not show properly like in place of 1 it take the arabic 1 and 0.00 before the point of 0 not showing please help me Subscription Details (2).pdf

Will you please tell me how you solved arabic font issue.