This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Using external fonts with Fontmap
To use external fonts, the font must be in TTF, PFB or PFA font format. Below are the step-by-step instructions.
First, create the directory, in this case foo
shell# mkdir /tmp/foo
Copy the fonts to /tmp/foo dir. Inside foo dir create the file Fontmap(it must be this name); in body of file make the following font map to Trebuchet.ttf and Verdana.ttf.
/Trebuchet (Trebuchet.ttf);
/Verdana (Verdana.ttf);
thus
shairon@hashcode:/tmp/foo$ ls -lh
-rw-r--r-- 1 shairon shairon 57 2008-06-12 17:25 Fontmap
-rw-r--r-- 1 shairon shairon 124K 2008-06-12 17:23 Trebuchet.ttf
-rw-r--r-- 1 shairon shairon 137K 2008-06-12 17:24 Verdana.ttf
Loading the fonts
RGhost::Config::GS[:extensions] << '/tmp/foo'
Now you have to define tags using the method define_tags
d.define_tags do
tag :myfont, :name => 'Verdana', :size => 12, :color => '#ADAD66'
end
Using the tag
doc.show 'Hello using the Verdana font', :tag => :myfont
with method/class Text
doc.text 'Hello using the <myfont>Verdana</myfont>'






