Peter Sergeant > RTF-Reader-0.01_2 > RTF::Reader::Font

Download:
RTF-Reader-0.01_2.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Source  

NAME ^

RTF::Reader::Font

DESCRIPTION ^

Interface to RTF fonts

OVERVIEW ^

To (hopefully) make document conversion from RTF easier, fonts are interfaced through a nice clean class of their own. That, and I don't like the thought of throwing around data structures, only to have the all-seeing Microsoft change the underlying structure of RTF documents, and mess up a bunch of legacy code.

An RTF::Reader::Font object represents a single font in a document.

RTF::Reader currently does NOT support embedded fonts. Patches (with copious accompanying tests) welcome.

METHODS ^

family

Returns a string corresponding to the family of the font.

Stolen from the RTF spec (1.6): "RTF also supports font families, so that applications can attempt to intelligently choose fonts if the exact font is not present on the reading system. RTF uses the following [names] to describe the various font families."

nil

Unknown or default fonts (the default)

roman

Roman, proportionally spaced serif fonts eg: Times New Roman, Palatino

swiss

Swiss, proportionally spaced sans serif fonts eg: Arial

modern

Fixed-pitch serif and sans serif fonts eg: Courier New, Pica

script

Script fonts eg: Cursive

decor

Decorative fonts eg: Old English, ITC Zapf Chancery

tech

Technical, symbol, and mathematical fonts eg: Symbol

bidi

Arabic, Hebrew, or other bidirectional font eg: Miriam

charset

Returns the character set of the font - the number returned is defined by the Windows header files:

 0   ANSI

 1   Default

 2   Symbol

 3   Invalid

 77  Mac

 128 Shift Jis

 129 Hangul

 130 Johab

 134 GB2312

 136 Big5

 161 Greek

 162 Turkish

 163 Vietnamese

 177 Hebrew

 178 Arabic

 179 Arabic Traditional

 180 Arabic user

 181 Hebrew user

 186 Baltic

 204 Russian

 222 Thai

 238 Eastern European

 254 PC 437

 255 OEM

pitch

Font pitch to use: http://www.webopedia.com/TERM/F/fixed_pitch.html

 0 Default pitch

 1 Fixed pitch

 2 Variable pitch

panose

PANOSE is a system for font matching - this property returns a PANOSE description of the font as described here:

http://msdn.microsoft.com/library/en-us/gdi/fontext_48aa.asp

non_tagged_name =head2 name =head2 alternative_name =head2 codepage