Solved

True Type Font Files?

Posted on 2016-09-23
4
121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

739 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