Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tamil (Indic) font support in TCPDF in FA does not support consonants in vowels on both it's sides #6

Open
apmuthu opened this issue May 2, 2015 · 10 comments

Comments

@apmuthu
Copy link
Owner

apmuthu commented May 2, 2015

The unofficial ta_IN Tamil Language extension for FA displays correctly in the browser but does not render correctly in PDF reports. Excel reports are fine though.

In Debian Squeeze, it is installed with:

sed -i -e 's/# ta_IN UTF-8/ta_IN UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales

Additional Tamil fonts can be installed in Debian Squeeze with:

apt-get install ttf-tamil-fonts

Tamil Font Installation is discussed in the FA forums.

Online fonts and conversions are at:
http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf
http://azhagi.com/freefonts.html

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

Browser Display
fa_tamil_2015-05-01_163523
fa_tamil_setup_company_2015-05-01_163754

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

Excel Report Rendering
fa_tamil_xls_pl
The worksheet name is mangled.

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

Poor rendering of PDF reports in both browser and external reader
fa_tamil_pdf_pl
fa_tamil_pdf_pl_in_ff

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

Although:
ட + ு = டு
0B9F + 0BC1
the following is displayed:
ட ு

Ila.Sundaram font is used but all Unicode fonts like Akshar, etc have the same issue.

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

tamil_font_inclusion

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

Generation of Tamil Unicode font files:

C:\php53\php tcpdf_addfont.php -b -t TrueTypeUnicode -f 32 -i Sundaram.ttf,SundaramB.ttf
C:\php53\php tcpdf_addfont.php -b -t TrueTypeUnicode -f 96 -i SundaramBI.ttf,SundaramI.ttf

Each font will have a ttf, z, php and ctg.z extensions that need to be uploaded to the reporting/fonts folder.
The file tcpdf_addfont.php is in the original TCPDF v4.0.027 release in the tcpdf/tools/ folder.

Reference links:
http://symbolcodes.tlt.psu.edu/bylanguage/tamilchart.html
http://www.wazu.jp/gallery/Fonts_Tamil.html
http://barathonline.blogspot.sg/2008/03/tamil-fonts-collection_06.html
http://stackoverflow.com/questions/18200919/using-unicode-with-tcpdf
http://rrbits.com/epb/2013/02/23/tcpdf-indic-script-support/
http://www.azhagi.com/fonts-sample5.html
http://www.higopi.com/fonts/
http://people.w3.org/rishida/scripts/indic-overview/

@apmuthu
Copy link
Owner Author

apmuthu commented May 2, 2015

The necessary Tamil FA font files are at http://www.apmuthu.com/frontaccounting/sundaram_tamil_fonts.zip

The ta_IN language extension needs to be detailed in the lang/installed_languages.inc file and is available for download.

installed_languages

@apmuthu
Copy link
Owner Author

apmuthu commented May 4, 2015

TAMIL LETTER TTA
2975 (Dec) => 0B9F
Category: Letter, Other [Lo]

TAMIL VOWEL SIGN U
3009 (Dec) => 0BC1
Category: Mark, Spacing Combining [Mc]

Tamil Unicode Block
From U+0B80 To U+0BFF
72 characters
No Mirroring
BIDI: LTR
UTF Browser Test

Supported Fonts
Support Font
100% FreeSerif
100% GNU Unifont
100% Unicode BMP Fallback SIL
99% Code2000 (71 of 72)
99% LastResort (71 of 72)
85% Arial Unicode MS (61 of 72)
68% Samyak_Multilingual (49 of 72)
14% Segoe UI (10 of 72)
14% Segoe UI Bold (10 of 72)
14% Segoe UI Light (10 of 72)

FreeSerif supported Tamil character fonts are here:
http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip
http://ftp.gnu.org/gnu/freefont/freefont-otf-20120503.tar.gz

@apmuthu
Copy link
Owner Author

apmuthu commented May 9, 2015

@apmuthu
Copy link
Owner Author

apmuthu commented May 11, 2015

Possible Alternatives to TCPDF for Tamil / Indic Scripts:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant