If anybody has successfully managed to convert a font and use it as described in the article linked below, can you explain what you did in plain English?

http://www.tcpdf.org/fonts.php

Thank you!

Comments

vishusrinivasan’s picture

@paperscenery I was able to add custom font:
1. Convert your desired TTF font using the following URL
http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf
and then download the .php and .z file. (you font file name should be appropriate for example: "georgia" for regular, "georgiab" for bold etc )
2. Copy the converted .php and .z files to the libraries/tcpdf/fonts folder

Next is editing the module files, can someone suggest how can we do it without editing the module file.
3. Edit the views_pdf_template.php in the Views PDF module and add in the name of your font in "protected static $defaultFontList = array" line 50. and your new font will be listed in the views PDF font settings.

Cheers.

kevster’s picture

Many thx vishusrinivasan for posting that link. I made the .php and .z files and included/uploaded and the font is available to select and use (TTF font). The only problem I have is that the font is not kerned so looks terrible on the PDF - same spacing for all chars.

Any ideas as to how to set the kerning?

EDIT:
fixed by using a different TTF font that was very similar and the new one didnt have the kerning issue

Simon Georges’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pvanerk’s picture

Worked for me (adding verdana). I also had to add the *.afm files and convert verdanai (verdana italic), verdanab (verdana bold) and verdanaz (verdana bold italic) fonts in order to use the standard verdana font (I am not using the italic or bold variant in my text but still I had to include it).

If I don't convert the italic/bold font I get the error message:
TCPDF ERROR: The font definition file has a bad format

lhridley’s picture

Issue summary: View changes

I got much better font conversions on this page:

Font Converter