Class | Prawn::Font::TTF
In: | lib/prawn/font/ttf.rb
Parent: | Font

### Methods

basename bbox cap_height encode_text family_class has_kerning_data? italic_angle new normalize_encoding pdf_flags script? serif? stemV width_of x_height

### Constants

UNICODE_CMAP_TEMPLATE | = | <<-STR.strip.gsub(/^\s*/, "") /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <00><ff> endcodespacerange %s endcmap CMapName currentdict /CMap defineresource pop end end STR .strip.gsub(/^\s*/, "")

### Attributes

subsets | [R] |
ttf | [R] |

### Public Class methods

new(document, name, options={})

### Public Instance methods

basename()
bbox()
cap_height()
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 the even-numbered indices are the font subset number, and the following entry element is either a string or an array (for kerned text).

The `text` parameter must be UTF8-encoded.

family_class()
has_kerning_data?()
italic_angle()
normalize_encoding(text)
pdf_flags()
script?()
serif?()
stemV()

not sure how to compute this for true-type fonts…

width_of(string, options={})

`string` must be UTF8-encoded.

x_height()

[Validate]