VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: andrai2 on January 25, 2017, 21:43:42 PM

Title: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: andrai2 on January 25, 2017, 21:43:42 PM
Hello!

The goal is to instal new tcpd font (times new roman with utf-8) for invoice..?

1. Where can i donwload the times new roman font for pdf...? Is this the right place https://sourceforge.net/projects/tcpdf/
i did that and uploud font files in /libraries/tcpdf/fonts/...
Virtuemart manual writes
"To update your fonts in TCDPF please upload proper font files to your /libraries/tcpdf/fonts/ if a non existent font is used within your wysiwyg templates, you may receive a fatal error."
But i dont see any changes in font drop down list shop - invoice emails (if i uploud those files https://sourceforge.net/projects/tcpdf/ ..
2. If i upadate font here /libraries/tcpdf/fonts/ form https://sourceforge.net/projects/tcpdf/  than  do i have to make some php changes..?
3. How can i make this font times new roman use in utf-8 as i am from Latvia and we have āēčķļī charachters,
4. The problem is that default font Free Mono (UTF-8 Unicode) has clunky design and i want have invoice with times new roman with utf-8 charachters

Can someone, can give me an advice on this

I have VirtueMart 3.0.16
and joomla 3.6.

p.s. this was solution in older vm versions https://forum.virtuemart.net/index.php?topic=99783.0 i assume some things has changed
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: Milbo on January 26, 2017, 00:21:55 AM
You just need to copy the right files (two) into libraries/tcpdf/fonts

Then you can select the font in dropdown. When your fonts supports āēčķļī then it should work. Which files did you copy into?
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: Milbo on January 26, 2017, 13:59:59 PM
The list in the vendor edit view checks for this

if(function_exists('glob')){
         $specfiles = glob($dir.DS."*_specs.xml");

so your server must support the "glob" function and you need a file which ends with _specs.xml to be listed. You can ignore the old advices, also the FAQ, I will remove it, because as far as I know, all this fonts are parameters now. This was the time, when we had no option there.
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: andrai2 on January 26, 2017, 14:30:20 PM
I take tcpd file frome here https://sourceforge.net/projects/tcpdf/ ...Is this the right place files..? and transfer ALL font folder intoto libraries/tcpdf/fonts...

Can you teel where can i right donwload tcpdf font files for virtuemart...?

If i understand it corectly i must transfer right files via ftp to ibraries/tcpdf/fonts and thats it..

Can send me time new roman font files utf-8 for virtumart invoice...? p.s. than i uploud in ibraries/tcpdf/fonts if its 5 min job, not sure if i have right files

i did not find new fint files here http://dev.virtuemart.net/projects/tcpdf/files

my curent job was to transfer: form https://sourceforge.net/projects/tcpdf/ to libraries/tcpdf/fonts files
times.php timesb.php timesbi.php timesi.php, than  take file freemono_specs copy it and and replace with times new roman requisites times_specs.xml, by uplouding  times_specs.xml i manage to get times new roman font in select are see the picture, but i still have ? in āēķļ, i thinks its because of  maybe wrong xml wchich i made  or wrong files which i uploud as copy of freemono_specs

This is my xml brutal copy of freemono_specs reaname to  times_specs.xml
<?xml version="1.0" encoding="UTF-8"?>
<font>
  <fontname>Times New Roman</fontname>
  <fonttype>UTF-8 Unicode</fonttype>
  <filename>times</filename>
  <version>1.0</version>
  <creationDate>2012-11-28</creationDate>
  <author>The VirtueMart Development Team</author>
  <copyright>Copyright (C) 2004-2012 Virtuemart Team. All rights reserved.</copyright>
  <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
   <files>
   <file>times.php</file>
   <file>timesb.php</file>
   <file>timesb.php</file>
   <file>timesbi.php</file>
      </files>
</font>

am i closer to truth...
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: andrai2 on January 26, 2017, 23:25:00 PM
font, i mange to get times new roman font in the select are when i uploud times_specs.xml, but in invoice i still got the ? instead of āēū
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: Studio 42 on January 28, 2017, 00:10:17 AM
If your HTML Document have some inline font set and they exist, It's possible that tcpdf auto load it.
Does your font change in the document when you change it in the dropdown ?
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: GJC Web Design on January 28, 2017, 12:42:58 PM
Hi S42,

I know andrai2 as I did some checking for this as he has my shipping plugin.
On a standard install using ā ē etc in things like the VM address, they render as ?? in the pdfs so it isn't inline stuff...
Title: Re: How to instal new tcpd font (times new roman with utf-8) for invoice..?
Post by: Milbo on January 28, 2017, 13:02:04 PM
Quote from: Milbo on January 26, 2017, 13:59:59 PM
The list in the vendor edit view checks for this

if(function_exists('glob')){
         $specfiles = glob($dir.DS."*_specs.xml");

so your server must support the "glob" function and you need a file which ends with _specs.xml to be listed.

replaced against a new function in vm3.0.19.2