I have developed the website in codeigniter, now i want to add tamil fonts in my website .
Type the description in tamil, and add the description value into the description table desc colum and retrieve the desc values and display that tamil content to my website..
You can do it with CSS3!
Before the functionality didn't actually exist beyond having the font pre-installed. Tamil fonts are unicode and often are ttf files. So make sure you have the ttf file on your web-server in order to have it available for use.
<style>
#font-face
{
font-family: myTamilFont;
src: url(tamil_font.ttf);
}
div
{
font-family: myTamilFont;
}
</style>
This will not work IE8 and below
For more information: http://www.w3schools.com/css3/css3_fonts.asp
Similar question asked on StackOverflow: How to embed fonts in HTML?
Use meta tag char set utf8 for using tamil font...
for insert database you should use ..
mysql_query ("set character_set_results='utf8'");
Hope this will help you
Related
I am using fpdf in php for developing pdf. I have to include some static Arabic or Farsi text to this pdf. I had used
$farsi_txt = iconv('UTF-8', 'ISO-8859-5', html_entity_decode('حضور محترم'));
$pdf->Write(5,$farsi_txt);
But the output was Blank.
When I had displayed it directly
$pdf->Write(5,'فغانستان کابل');
then the out put was like ٕغانستان کابل
When I had created a window to insert the arabic text to database then the output was حضور محترم
Is there any way to display this text as Arabic or Farsi in fpdf?
Found the answer for my question. I had replaced FPDF with TCPDF. TCPDF provides special fonts for Arabic and Farsi languages. I had got the correct output using TCPDF. I simply done this by switching font and $tpdf->setRTL(false); this sets the right to left alignment if arabic words.
TCPDF Download link
take a look here. This page specifically talks about adding new Fonts and encodings, which I believe is the issue as the PDF is missing the Arabic font and is unable to find a replacement for characters.
I'm trying to render some "special characters" (⇒⇀↛←⇐⇐↼↚↔⇔⇌⇄⥄) on a new page. When I use the custom TTF "Noto Sans Regular" most of the characters don't render, if I simply swap the font to "Symbola" everything renders exactly as you'd expect.
Is this a known issue in ZendPDF (2.0.2) or am I doing something wrong?
It turns out that the NotoSans font only contained a subset of the characters... lesson learned!
I'm working on a new Wordpress website, and it has both Sinhala and English characters, the charset of the website and the database is UTF-8. However although the English characters are displayed properly the Sinhala characters are displayed as question marks.
I can't seem to find an error, how can I fix it ?
First of all you can select a font file and font-face into your css file. You should write your text Unicode format.
#font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Just comment these two lines in wp-config.php and check.
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
If you are importing this data from another source, please make sure that the export script does the DB export with UTF8 character set. In my case this was the problem
if the database is mysql use the below line to export the source DB.
mysqldump --default-character-set=utf8 -r{export.sql} -u{uname} -p{pass} {db} -h{server}
So I have a problem with diacritics in wordpress.This is the website http://colectia-harnau.ro This is the div for first category:
<div style="font-family: 'Sancreek', cursive;font-size:110%;">
SUPORTURI PREZENTARE
</div>
As you can see on google fonts, this font have diacritics like ă,ș,ț etc. Here is the font URL: https://www.google.com/fonts/specimen/Sancreek
As you can see here the diacritics are loaded but showed with different font
Any ideas? Thanks
Make sure you are using the extended latin character sets. Like this:
<link href='http://fonts.googleapis.com/css?family=Sancreek&subset=latin,latin-ext' rel='stylesheet' type='text/css'>.
Note the latin-ext
Ok , problem solved!
For those who will occur this issue. You need to select the Larin extended option from 2nd selector!
Latin Extended (latin-ext)
I have used dom pdf class in codeigniter to create html to pdf creation. But this dom pdf doesn't support turkish character. Is there any pdf plugin that support turkish character.
Thanks
Shylaja
To support the Turkish language in DOMPDF, a Turkish character uses the dejavu font
.turkish
{
font-family: 'dejavu sans';
}
download the font from below link
http://dejavu-fonts.org/wiki/Download
and copy to folder dompdf/lib/fonts
dom pdf support turkish character by using dejavu