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

Methods

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

Public Instance methods

The font bbox, as an array of integers

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.

Returns true if the font has kerning data, false otherwise

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

[Validate]