To set up laravel-snappy for an RTL custom font, you can use the setOption method to set the --encoding and --no-collate options for RTL language support. Additionally, you can use the --header-font-name and --header-font-size options to change the font and size of the header. Here's an example:
$pdf = PDF::loadView('pdf.invoice', $data);
$pdf->setOption('encoding', 'UTF-8');
$pdf->setOption('no-collate', true);
$pdf->setOption('header-font-name', 'MyCustomFont');
$pdf->setOption('header-font-size', '12');
return $pdf->download('invoice.pdf');
Make sure to replace MyCustomFont with the actual name of your custom font. Also, make sure that the font is installed on the server where you're generating the PDF.