Class | Prawn::Font::AFM
In: | lib/prawn/font/afm.rb
Parent: | Font

### Methods

bbox encode_text has_kerning_data? metrics_path normalize_encoding unicode?

### Constants

BUILT_INS | = | %w[ Courier Helvetica Times-Roman Symbol ZapfDingbats Courier-Bold Courier-Oblique Courier-BoldOblique Times-Bold Times-Italic Times-BoldItalic Helvetica-Bold Helvetica-Oblique Helvetica-BoldOblique ]

### Public Class methods

metrics_path()

### Public Instance methods

bbox()

The font bbox, as an array of integers

encode_text(text, options={})

Perform any changes to the string that need to happen before it is rendered to the canvas. Returns an array of subset "chunks", where each chunk is an array of two elements. The first element is the font subset number, and the second is either a string or an array (for kerned text).

For Adobe fonts, there is only ever a single subset, so the first element of the array is "0", and the second is the string itself (or an array, if kerning is performed).

The `text` parameter must be in WinAnsi encoding (cp1252).

has_kerning_data?()

Returns true if the font has kerning data, false otherwise

normalize_encoding(text)

built-in fonts only work with winansi encoding, so translate the string. Changes the encoding in-place, so the argument itself is replaced with a string in WinAnsi encoding.

unicode?()

[Validate]