Class: HexaPDF::Font::TrueType::Table::Post

Inherits:
HexaPDF::Font::TrueType::Table show all
Defined in:
lib/hexapdf/font/true_type/table/post.rb

Overview

The ‘post’ table contains information for using a font on a PostScript printer.

post format 2.5 is currently not implemented because use of the format is deprecated since 2000 in the specification and no font with a format 2.5 post subtable was available for testing.

See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6post.html

Defined Under Namespace

Modules: Format1, Format2, Format3, Format4

Constant Summary

Constants inherited from HexaPDF::Font::TrueType::Table

TIME_EPOCH

Instance Attribute Summary collapse

Attributes inherited from HexaPDF::Font::TrueType::Table

#font

Instance Method Summary collapse

Methods inherited from HexaPDF::Font::TrueType::Table

calculate_checksum, #checksum_valid?, #directory_entry, #initialize, #raw_data

Constructor Details

This class inherits a constructor from HexaPDF::Font::TrueType::Table

Instance Attribute Details

#formatObject

The format of the table (a Rational).



54
55
56
# File 'lib/hexapdf/font/true_type/table/post.rb', line 54

def format
  @format
end

#is_fixed_pitchObject

Specifies whether the font is proportional (value is 0) or monospaced (value is not 0).



67
68
69
# File 'lib/hexapdf/font/true_type/table/post.rb', line 67

def is_fixed_pitch
  @is_fixed_pitch
end

#italic_angleObject

The italic angle (a Rational).



57
58
59
# File 'lib/hexapdf/font/true_type/table/post.rb', line 57

def italic_angle
  @italic_angle
end

#max_mem_type1Object

Maximum memory usage when a Type1 font is downloaded.



86
87
88
# File 'lib/hexapdf/font/true_type/table/post.rb', line 86

def max_mem_type1
  @max_mem_type1
end

#max_mem_type42Object

Maximum memory usage when a font is downloaded.



80
81
82
# File 'lib/hexapdf/font/true_type/table/post.rb', line 80

def max_mem_type42
  @max_mem_type42
end

#min_mem_type1Object

Minimum memory usage when a Type1 font is downloaded.



83
84
85
# File 'lib/hexapdf/font/true_type/table/post.rb', line 83

def min_mem_type1
  @min_mem_type1
end

#min_mem_type42Object

Minimum memory usage when a font is downloaded.



77
78
79
# File 'lib/hexapdf/font/true_type/table/post.rb', line 77

def min_mem_type42
  @min_mem_type42
end

#underline_positionObject

The suggested distance of the top of the underline from the baseline (negative values indicate underlines below the baseline).



61
62
63
# File 'lib/hexapdf/font/true_type/table/post.rb', line 61

def underline_position
  @underline_position
end

#underline_thicknessObject

The suggested thickness for underlines.



64
65
66
# File 'lib/hexapdf/font/true_type/table/post.rb', line 64

def underline_thickness
  @underline_thickness
end

Instance Method Details

#[](glyph_id) ⇒ Object

Returns the name for the given glpyh id or “.notdef” if the given glyph id has no name.



89
90
91
# File 'lib/hexapdf/font/true_type/table/post.rb', line 89

def [](glyph_id)
  @glyph_names[glyph_id] || '.notdef'
end

#is_fixed_pitch?Boolean

Returns true if the font is monospaced.

See: #is_fixed_pitch

Returns:

  • (Boolean)


72
73
74
# File 'lib/hexapdf/font/true_type/table/post.rb', line 72

def is_fixed_pitch?
  @is_fixed_pitch != 0
end