Class: HexaPDF::Font::TrueType::Table::OS2

Inherits:
HexaPDF::Font::TrueType::Table show all
Extended by:
Utils::BitField
Defined in:
lib/hexapdf/font/true_type/table/os2.rb

Overview

The ‘OS/2’ table contains information required by Windows.

Some attributes may be nil when read from a file depending on the version of the table.

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

Constant Summary

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

TIME_EPOCH

Instance Attribute Summary collapse

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

#font

Method Summary

Methods included from Utils::BitField

bit_field

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

#break_charObject

The break character used by Windows.



149
150
151
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 149

def break_char
  @break_char
end

#cap_heightObject

The distance between the baseline and the approximate height of uppercase letters.



143
144
145
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 143

def cap_height
  @cap_height
end

#code_page_rangeObject

The code page character range.



136
137
138
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 136

def code_page_range
  @code_page_range
end

#default_charObject

The default character displayed by Windows to represent an unsupported character.



146
147
148
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 146

def default_char
  @default_char
end

#family_classObject

Classification of the font-family design.



98
99
100
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 98

def family_class
  @family_class
end

#first_char_indexObject

The minimum Unicode index in this font.



115
116
117
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 115

def first_char_index
  @first_char_index
end

#last_char_indexObject

The maximum Unicode index in this font.



118
119
120
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 118

def last_char_index
  @last_char_index
end

#lower_point_sizeObject

The lowest size at which the font starts to be used.



155
156
157
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 155

def lower_point_size
  @lower_point_size
end

#max_contextObject

The maximum length of an OpenType context for any feature in this font.



152
153
154
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 152

def max_context
  @max_context
end

#panoseObject

Describes the visual characteristics of the given typeface.



101
102
103
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 101

def panose
  @panose
end

#selectionObject

Information concerning the nature of the font patterns.



110
111
112
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 110

def selection
  @selection
end

#strikeout_positionObject

Position of the strikeout stroke relative to the baseline.



95
96
97
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 95

def strikeout_position
  @strikeout_position
end

#strikeout_sizeObject

Width of the strikeout stroke.



92
93
94
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 92

def strikeout_size
  @strikeout_size
end

#subscript_x_offsetObject

Recommended horizontal offset for subscripts.



74
75
76
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 74

def subscript_x_offset
  @subscript_x_offset
end

#subscript_x_sizeObject

Recommended horizontal size in pixels for subscripts



68
69
70
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 68

def subscript_x_size
  @subscript_x_size
end

#subscript_y_offsetObject

Recommended vertical offset from the baseline for subscripts.



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

def subscript_y_offset
  @subscript_y_offset
end

#subscript_y_sizeObject

Recommended vertical size in pixels for subscripts



71
72
73
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 71

def subscript_y_size
  @subscript_y_size
end

#superscript_x_offsetObject

Recommended horizontal offset for superscripts.



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

def superscript_x_offset
  @superscript_x_offset
end

#superscript_x_sizeObject

Recommended horizontal size in pixels for superscripts



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

def superscript_x_size
  @superscript_x_size
end

#superscript_y_offsetObject

Recommended vertical offset from the baseline for superscripts.



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

def superscript_y_offset
  @superscript_y_offset
end

#superscript_y_sizeObject

Recommended vertical size in pixels for superscripts



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

def superscript_y_size
  @superscript_y_size
end

#typeObject

Characteristics and properties of this font.



63
64
65
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 63

def type
  @type
end

#typo_ascenderObject

The typographic ascender. May not be the same as the ascender in the ‘hhea’ table.



121
122
123
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 121

def typo_ascender
  @typo_ascender
end

#typo_descenderObject

The typographic descender. May not be the same as the ascender in the ‘hhea’ table.



124
125
126
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 124

def typo_descender
  @typo_descender
end

#typo_line_gapObject

The typographic line gap. May not be the same as the ascender in the ‘hhea’ table.



127
128
129
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 127

def typo_line_gap
  @typo_line_gap
end

#unicode_rangeObject

Describes the Unicode ranges covered by the font.



104
105
106
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 104

def unicode_range
  @unicode_range
end

#upper_point_sizeObject

The highest size at which the font starts to be used.



158
159
160
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 158

def upper_point_size
  @upper_point_size
end

#vendor_idObject

The four character identifier of the font vendor.



107
108
109
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 107

def vendor_id
  @vendor_id
end

#versionObject

The version of the table.



51
52
53
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 51

def version
  @version
end

#weight_classObject

Visual weight of stroke in glyphs.



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

def weight_class
  @weight_class
end

#width_classObject

Relative change from the normal aspect ratio (width/height).



60
61
62
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 60

def width_class
  @width_class
end

#win_ascentObject

The ascender metric for Windows.



130
131
132
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 130

def win_ascent
  @win_ascent
end

#win_descentObject

The descender metric for Windows.



133
134
135
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 133

def win_descent
  @win_descent
end

#x_avg_char_widthObject

AVerage weighted advance width of lower case letters and space.



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

def x_avg_char_width
  @x_avg_char_width
end

#x_heightObject

The distance between the baseline and the approximate height of non-ascending lowercase letters.



140
141
142
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 140

def x_height
  @x_height
end