I used Tamil font Noto Sans but when I am trying to generate pdf, the tamil words mismatch in pdf. This is What I wrote in web page "முகவரி", but in pdf it generate like this "மீகவரி".

This is my head tag of my blade view in laravel:

//I also tried akruti1.ttf by downloading it and added on my public directory but it does not load in my project::

<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil&display=swap" rel="stylesheet">

<title>Proforma Report</title>
<style>
    body {
        font-family: 'Noto Sans Tamil', sans-serif;
    }
</style>

//This is my body tag:

<div>
    <label>1. விண்ணப்பதாரர் பெயர்<br>
        Name of the Applicant</label>
</div>
<div>
    <textarea></textarea>
</div>
1

There are 1 best solutions below

0
Karl Hill On BEST ANSWER

In your Blade, try modifying the head tag section to the following.

<head>
    <title>Proforma Report</title>
    <style>
        @font-face {
            font-family: 'Noto Sans Tamil';
            font-style: normal;
            font-weight: 400;
            src: url('{{ public_path('fonts/NotoSansTamil-Regular.ttf') }}') format('truetype');
        }
        body {
            font-family: 'Noto Sans Tamil', sans-serif;
        }
    </style>
</head>