KevinTH Posted January 15, 2014 Share Posted January 15, 2014 I have been experimenting trying to get the currency symbol for Thai baht showing correctly. It's a B with a vertical slash as in ฿ Works fine in the portal and printable invoices but has problems in PDF invoices which all my clients prefer. I've experimented with the 3 different fonts provided. Helvetica Freesans dejavusans As you will see the last two (freesans & dejavusans) are completely messed up and of no use at all. Only helvetica gets close but the Thai baht currency symbol doesn't work and shows _3647; (ignore the _) instead of ฿ Could anyone shed any light on this? Much appreciated. Link to comment Share on other sites More sharing options...
KevinTH Posted January 16, 2014 Author Share Posted January 16, 2014 Found a temporary solution...now using the sharp S, German: esszett or scharfes S) as in ß not 100% correct but close. Still don't understand why freesans and dejavusans are so screwed up though. Link to comment Share on other sites More sharing options...
KevinTH Posted January 17, 2014 Author Share Posted January 17, 2014 Don't know who marked this as [Not a bug] but the screwed up results of using WHMCS fonts freesans and dejavusans are a bug to me. Link to comment Share on other sites More sharing options...
SeanP Posted January 17, 2014 Share Posted January 17, 2014 This may have something to do with the character set of your MySQL database. Link to comment Share on other sites More sharing options...
KevinTH Posted January 17, 2014 Author Share Posted January 17, 2014 That may be so but as WHMCS install program created it surely the character set would be one they choose it to be. WHMCS is NOT installed on a Thai server it is on a US one. Link to comment Share on other sites More sharing options...
SeanP Posted January 17, 2014 Share Posted January 17, 2014 I agree, I just wonder if that is the root of where this issue is coming from. What is the "System Charset" set to under Setup > General Settings > Localisation in the admin? Have you opened a ticket with WHMCS? Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2014 Share Posted January 17, 2014 if your settings don't reveal an answer, another possible solution would be to use a different pdf font - i've sent you a pm on how to do this. e.g, here is a part of an invoice using a custom pdf font that shows the baht symbol without a problem. http://prntscr.com/2k4042 i'll check with a mod to see if I can publish the method on the forum. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted January 17, 2014 Share Posted January 17, 2014 KevinTH, I apologize for the confusion here. I wrote a reply but it appears not to have posted, after the reply was made I also changed the prefix. I have restored the prefix to a more accurate state. In this case I think your best bet forward may be to open a ticket with our support team so they can investigate this further. WHMCS does not define default database collations, it uses what the database is setup to use. That can vary from install to install. Have a great day. Nate C Link to comment Share on other sites More sharing options...
WHMCS Nate Posted January 17, 2014 Share Posted January 17, 2014 Brian!, As one of the moderators on this forum I would be happy to see you share the solution you are using. Thanks, Nate C Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2014 Share Posted January 17, 2014 As one of the moderators on this forum I would be happy to see you share the solution you are using. ok Nate - the reason I was going to contact a mod was because I thought there might be copyright issues with this solution, but i'm sure if there are, you can always delete the post! ideally you need to find a free font (ttf or otf) that contains your baht symbol (Unicode Alt +0E3F) - this can then be converted to a pdf font at the site below. (btw, there is a way to do this in PHP using TCPDF, but this is a drag/drop solution - so much easier for the non-technical!). http://fonts.snm-portal.com/ not all fonts that contain the baht symbol will convert successfully to a usable pdf font format - I think Verdana is one that will, and Tahoma is another... although whether these are classed as "free fonts" that can be converted for this purpose, I don't know. you certainly should not convert any commercially available fonts to a pdf font format without permission. anyway, if you drag/drop your selected font into the above site, it will convert it to the three files that WHMCS needs for its pdf fonts. save them locally and then upload these three files to the includes/fonts directory of whmcs. then go to general settings -> invoices and change the pdf font (TCPDF Font Family) to custom and enter the font name. in the image below, I quickly switched the currency to use the baht symbol and changed to using a custom pdf font (Tahoma) - the image below is part of the resulting pdf invoice.. as you can see, the baht symbol is shown correctly. http://prntscr.com/2k4042 I believe that this is only a bug in the sense that none of the PDF fonts that are currently included with whmcs, have the baht symbol within them - one possible solution might be for WHMCS to manually add the symbol to their fonts and convert them again. Link to comment Share on other sites More sharing options...
KevinTH Posted January 18, 2014 Author Share Posted January 18, 2014 I agree, I just wonder if that is the root of where this issue is coming from. What is the "System Charset" set to under Setup > General Settings > Localisation in the admin? Have you opened a ticket with WHMCS? iso-8859-1: encodes what it refers to as "Latin alphabet no. 1," consisting of 191 characters from the Latin script. This character-encoding scheme is used throughout the Americas, Western Europe, Oceania, and much of Africa. I understand the Baht symbol is not in that character set and I don't require any Thai character other than the currency symbol. - - - Updated - - - Thanks everybody for all your help and advice. It's Saturday here and I have appointments with friends all weekend. I'll get back to you all on Monday. Link to comment Share on other sites More sharing options...
essecosi Posted February 6, 2014 Share Posted February 6, 2014 Hi I have the same problem, but with central european letters ščž ŠČŽ. instead of Š and š show me ? Link to comment Share on other sites More sharing options...
neo2shyalien Posted February 7, 2014 Share Posted February 7, 2014 (edited) I confirm that bug for Cyrillic. And should bi fixed ASAP because all my invoice are completely broken for my costumers!!! Edited February 7, 2014 by neo2shyalien Link to comment Share on other sites More sharing options...
neo2shyalien Posted February 7, 2014 Share Posted February 7, 2014 (edited) Temporary bug fix Again!!! In folder includes/classes/TCPDF/fonts extract this files http://goo.gl/hwLgF2 and all pdfs are OK for me now. For invoices I'm using freesans font. I'm completely disappointed with this buggy version. This is my second workaround for major bugs. I completely do not understand why this was released with so many bugs. But I understand that I pay for something which broke my clients functionality and lost my days!!! Edited February 7, 2014 by neo2shyalien Link to comment Share on other sites More sharing options...
Miron Posted February 7, 2014 Share Posted February 7, 2014 Hello, For v5.3.3. try uploading your existing and any additional fonts from /includes/fonts/ to the /includes/classes/TCPDF/fonts directory. That fixed issue with missing "Freesans" font for me. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted February 7, 2014 Share Posted February 7, 2014 Hello, I can confirm that the font directory moved in 5.3.3. It moved as part of an upgrade to TCPDF which should resolve some other bugs customers had with it. If you depend on custom fonts, you need to copy them there. Have a great day, Nate C Link to comment Share on other sites More sharing options...
neo2shyalien Posted February 7, 2014 Share Posted February 7, 2014 (edited) Hello, I can confirm that the font directory moved in 5.3.3. It moved as part of an upgrade to TCPDF which should resolve some other bugs customers had with it. If you depend on custom fonts, you need to copy them there. Have a great day, Nate C We dont talking about for some "custom fonts". FreeSans is default WHMCS and should have full support of it. But it's missing from TCPDF folder and this cause the bug with unreadable invoices. So I dont want to be rude but this response is completely pointless. Edited February 7, 2014 by neo2shyalien Link to comment Share on other sites More sharing options...
WHMCS Nate Posted February 7, 2014 Share Posted February 7, 2014 neo2shyalien, I apologize for not addressing the concern you raised in this thread. Freesans was a font that was shipped by PCPDF that we included. When we upgraded to a new PCPDF version in 5.3.3 they shipped new fonts and removed Freesans and we followed their lead. I have opened case 4037 to look at adding these fonts back into what we distribute. Thanks for your report and thanks for sticking with the forum thread until we get it right, Nate C Link to comment Share on other sites More sharing options...
Db2000 Posted February 11, 2014 Share Posted February 11, 2014 I am not using freesans and moving the font files to the new location does not solve my problem. It seems to be that the custom font is not found. Link to comment Share on other sites More sharing options...
WHMCS Nate Posted February 11, 2014 Share Posted February 11, 2014 Hello, This thread has become an example of why I am normally aggressive in closing bug report forum threads. The thread began around finding the correct font to use to show the thai baht. It was picked up to discuss the change in font location in 5.3.3. Used to discuss the removal of one of the fonts shipped in 5.2 by TCPDF. Now db2000 is raising a different issue, which is the pdf template not using the custom font setting. Db2000, your issue has already been reported and case 4007 was opened to track it and get it resolved. To prevent further confusion I am going to close this thread. Link to comment Share on other sites More sharing options...
Recommended Posts