File: unicode-readme.txt

package info (click to toggle)
cl-pdf 166-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,520 kB
  • ctags: 639
  • sloc: lisp: 6,902; makefile: 39
file content (33 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for the details
;;; You can reach me at marc.battyani@fractalconcept.com or marc@battyani.net
;;; The homepage of cl-pdf is here: http://www.fractalconcept.com/asp/html/cl-pdf.html

Unicode readme

To use Unicode fonts you need to have the font metrics and the character
encoding of the font. For this you must have an unicode font metrics (.ufm file).

You can generate it with a special version of afm2pt1:
http://www.fractalconcept.com/fcweb/download/ttf2pt1-src.zip

I've put a windows executable here:
http://www.fractalconcept.com/fcweb/download/ttf2pt1.zip

You can get the original version here: 
http://ttf2pt1.sourceforge.net/

Use it like this (using the times font as an example):
ttf2pt1 -a -F times.ttf times
This will generate the needed times.ufm file.

You can then load the font:
(pdf:load-ttu-font #P"times.ufm" #P"times.ttf")

And now you can use it:
PDF 222 > (pdf:get-font "TimesNewRomanPSMT")
#<pdf:font timesnewromanpsmt 25558C54>

To see the exact name of the font, just look inside the .ufm file.

If you only need some characters of a font, you can use fontforge to tweak it.