Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/support/rfil

= Ruby font installer library

These files should help you (a programmer) to create a font installer
for TeX. 

The library is currently in alpha state. The interface might change,
but a lot of basic classes and methods are available. See the example
programs in the examples directory on how to use the library. Also
take a look at the Kpathsea and ENC classes on how to make use of
these.

== Roadmap

Accessing Encodings:: See the ENC class to read and write <tt>.enc</tt>-files.
Accessing TFM/VF files:: Use the TFM and VF classes to read and write TeX font metrics and virtual fonts.
Accessing font metrics:: See the FontMetric class and the subclass AFM to read and write the font metric files.
Installing a font(set):: See below for examples.

== Example programs

You might find the examples shipped with RFIL useful.

afm2tfm.rb:: Install a single font. As with afm2tfm (the program shipped with dvips), you can reencode a font and fake caps.
afminfo:: Give information about an afm file (metrics, glyph information).
encodingtable:: Print out a table with encodings/glyphnames/slots
pldiff:: Compare two metric files and output all differences.
plinfo:: Show information about a TeX metric file.
rfont:: Simple installer that handles a family of fonts (reguar, italic, bold...)
rfii:: Yet another installer, work in progress.

== Example usage of the RFI Library

=== Example usage to install a single font:
 font=Font.new
 font.load_variant("savorg__.afm")
 font.texenc=["ec","texnansi"]
 font.mapenc=["8r"]
 font.write_files

This will create virtual fonts for _ec_ and _texnansi_ encoding that
map to <em>8r</em> encoding, +tfm+ files for the _raw_ fonts and a +map+-file.

=== Synthesize small caps
Create a second variant, synthesize small caps and copy the relevant part
to the main font.
 f=Font.new
 f.texenc="ec"
 f.load_variant("savorg__.afm")
 fc = f.load_variant("savorg__.afm")
 f.fake_caps(fc,0.8)
 f.copy(fc,:lowercase,:ligkern=>true)
 f.defaultfm.chars.apply_ligkern_instructions(RFI::STDLIGKERN)
 f.write_files

== Installation

Run <tt>ruby setup.rb config</tt> and afterwards <tt>ruby setup.rb
install</tt> to install the library files in your system. You might
need to be superuser/root for that. Now you should be able to use the
examples. Perhaps start with <tt>afminfo</tt> or <tt>rfont</tt>. 

== Creating the documentation

Run <tt>rake rdoc</tt> in order to create the documentation in the
subdirectory <tt>doc/</tt>. Open <tt>doc/index.html</tt> in your
browser and voila, see all classes and methods documented. If you
don't have <tt>Rake</tt> installed, go to the homepage (see below) and
read the online documentation.

==Other Stuff

Author:: Patrick Gundlach <patrick@gundla.ch>
Project Page::  https://foundry.supelec.fr/projects/rfil
Homepage:: (Documentation) https://rfil.groups.foundry.supelec.fr
License::  Copyright (c) 2005 Patrick Gundlach.
           Released under the terms of the GNU General Public License

Direc­to­ries

Name Notes
examples
lib

Files

Name Size Date Notes
README 2963 2006-05-16 09:07
Rakefile 1080 2006-05-16 09:04
setup.rb 29252 2004-10-02 01:06

Down­load the con­tents of this pack­age in one zip archive (67.5k).

rfil – Ruby font in­staller li­brary

The Ruby font in­staller li­brary (RFIL) is an­other at­tempt on font in­stal­la­tion for TeX fonts. It con­sists of a set of ex­am­ple pro­grams and sev­eral li­braries for do­ing font re­lated tasks, such as read/write tfm, afm, vf and enc files, cre­at­ing font met­rics, do­ing cal­cu­la­tions and the like. The soft­ware is all writ­ten in Ruby.

Pack­age De­tailsrfil
Ver­sion0.1
Li­censeGNU Gen­eral Public Li­cense
Copy­right2006 Pa­trick Gund­lach
Main­tainerPa­trick Gund­lach
Topics pro­cess fonts for use with TeX (in­cludes in­stal­la­tion)
Guest Book Sitemap Contact