Solved

True Type Font Files?

Posted on 2016-09-23
4
82 Views
Last Modified: 2016-09-27
I'm using a thing called fpdf, it is a pdf generator works great, based on php.

It comes with of course a bunch of the "standard" fonts.

I want to use a script style font like Freestyle Script in Word or something similar. Fpdf has a poorly documented feature too make font files (that are php files) from things called .map files, for example cp1250.map.

How can I get a "map" file for Freestyle Script or something similar? Preferably free or small charge.

Thanks
0
Comment
Question by:Richard Korts
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
bigeven2002 earned 500 total points
ID: 41813365
Hello,

Did you already try their online conversion tool?  It is located at this page below.  There is no special map file for fonts, that is just the encoding.

http://www.fpdf.org/makefont/

Browse and find the Freestyle script regular font.  Use the ISO-8859-1 encoding which is Western Europe.  It should generated two files, a php file and z file.  The z file is the compressed file.
0
 
LVL 16

Expert Comment

by:DansDadUK
ID: 41813690
I agree with @bigeven2002 regarding "... no special map file for fonts, that is just the encoding ..." (I know nothing about fpdf, so can't comment on that).

Most TrueType / OpenType fonts contain definitions of hundreds (if not thousands) of characters.

For fully 'international' alphabets, applications use a multi-byte encoding; these days, this will usually be Unicode, or the UTF-8 transformation format of this encoding.

Applications which still use single-byte character encodings are limited to a maximum of 256 different characters; it will usually be less than this (typically 192 or 224 'graphic' characters and 64 or 32 non-graphic 'control-code' characters).

The different 'maps', or encodings, are just definitions of which 256-character subset, from the much (much) larger repertoires offered by Unicode, is to be used.

As regards which map / character set to use:

If you want to use single-byte encoding in the Western world, use the ISO-8859-1 Latin-1 set, or perhaps the Windows Latin-1 superset of this (which uses character codes in the 'reserved C1 control codes' range (0x80 -> 0x9f) for additional graphic glyphs, such as the Euro sign).
0
 

Author Comment

by:Richard Korts
ID: 41813956
bigeven2002,

OK, that created the files perfectly. Do I have to use AddFont in fpdf to make it available for SetFont?

Thanks,

Richard
0
 
LVL 17

Expert Comment

by:bigeven2002
ID: 41813969
OK thanks for the update.  From what I read, yes you will need to run AddFont to make it available:

$pdf->AddFont('FREESCPT','','FREESCPT.php');

Open in new window


Then

$pdf->SetFont('FREESCPT');

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now