Class: HexaPDF::Font::TrueType::Table::OS2
- Inherits:
-
HexaPDF::Font::TrueType::Table
- Object
- HexaPDF::Font::TrueType::Table
- HexaPDF::Font::TrueType::Table::OS2
- 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
Instance Attribute Summary collapse
-
#break_char ⇒ Object
The break character used by Windows.
-
#cap_height ⇒ Object
The distance between the baseline and the approximate height of uppercase letters.
-
#code_page_range ⇒ Object
The code page character range.
-
#default_char ⇒ Object
The default character displayed by Windows to represent an unsupported character.
-
#family_class ⇒ Object
Classification of the font-family design.
-
#first_char_index ⇒ Object
The minimum Unicode index in this font.
-
#last_char_index ⇒ Object
The maximum Unicode index in this font.
-
#lower_point_size ⇒ Object
The lowest size at which the font starts to be used.
-
#max_context ⇒ Object
The maximum length of an OpenType context for any feature in this font.
-
#panose ⇒ Object
Describes the visual characteristics of the given typeface.
-
#selection ⇒ Object
Information concerning the nature of the font patterns.
-
#strikeout_position ⇒ Object
Position of the strikeout stroke relative to the baseline.
-
#strikeout_size ⇒ Object
Width of the strikeout stroke.
-
#subscript_x_offset ⇒ Object
Recommended horizontal offset for subscripts.
-
#subscript_x_size ⇒ Object
Recommended horizontal size in pixels for subscripts.
-
#subscript_y_offset ⇒ Object
Recommended vertical offset from the baseline for subscripts.
-
#subscript_y_size ⇒ Object
Recommended vertical size in pixels for subscripts.
-
#superscript_x_offset ⇒ Object
Recommended horizontal offset for superscripts.
-
#superscript_x_size ⇒ Object
Recommended horizontal size in pixels for superscripts.
-
#superscript_y_offset ⇒ Object
Recommended vertical offset from the baseline for superscripts.
-
#superscript_y_size ⇒ Object
Recommended vertical size in pixels for superscripts.
-
#type ⇒ Object
Characteristics and properties of this font.
-
#typo_ascender ⇒ Object
The typographic ascender.
-
#typo_descender ⇒ Object
The typographic descender.
-
#typo_line_gap ⇒ Object
The typographic line gap.
-
#unicode_range ⇒ Object
Describes the Unicode ranges covered by the font.
-
#upper_point_size ⇒ Object
The highest size at which the font starts to be used.
-
#vendor_id ⇒ Object
The four character identifier of the font vendor.
-
#version ⇒ Object
The version of the table.
-
#weight_class ⇒ Object
Visual weight of stroke in glyphs.
-
#width_class ⇒ Object
Relative change from the normal aspect ratio (width/height).
-
#win_ascent ⇒ Object
The ascender metric for Windows.
-
#win_descent ⇒ Object
The descender metric for Windows.
-
#x_avg_char_width ⇒ Object
AVerage weighted advance width of lower case letters and space.
-
#x_height ⇒ Object
The distance between the baseline and the approximate height of non-ascending lowercase letters.
Attributes inherited from HexaPDF::Font::TrueType::Table
Method Summary
Methods included from Utils::BitField
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_char ⇒ Object
The break character used by Windows.
155 156 157 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 155 def break_char @break_char end |
#cap_height ⇒ Object
The distance between the baseline and the approximate height of uppercase letters.
149 150 151 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 149 def cap_height @cap_height end |
#code_page_range ⇒ Object
The code page character range.
142 143 144 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 142 def code_page_range @code_page_range end |
#default_char ⇒ Object
The default character displayed by Windows to represent an unsupported character.
152 153 154 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 152 def default_char @default_char end |
#family_class ⇒ Object
Classification of the font-family design.
103 104 105 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 103 def family_class @family_class end |
#first_char_index ⇒ Object
The minimum Unicode index in this font.
121 122 123 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 121 def first_char_index @first_char_index end |
#last_char_index ⇒ Object
The maximum Unicode index in this font.
124 125 126 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 124 def last_char_index @last_char_index end |
#lower_point_size ⇒ Object
The lowest size at which the font starts to be used.
161 162 163 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 161 def lower_point_size @lower_point_size end |
#max_context ⇒ Object
The maximum length of an OpenType context for any feature in this font.
158 159 160 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 158 def max_context @max_context end |
#panose ⇒ Object
Describes the visual characteristics of the given typeface.
106 107 108 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 106 def panose @panose end |
#selection ⇒ Object
Information concerning the nature of the font patterns.
115 116 117 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 115 def selection @selection end |
#strikeout_position ⇒ Object
Position of the strikeout stroke relative to the baseline.
100 101 102 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 100 def strikeout_position @strikeout_position end |
#strikeout_size ⇒ Object
Width of the strikeout stroke.
97 98 99 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 97 def strikeout_size @strikeout_size end |
#subscript_x_offset ⇒ Object
Recommended horizontal offset for subscripts.
79 80 81 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 79 def subscript_x_offset @subscript_x_offset end |
#subscript_x_size ⇒ Object
Recommended horizontal size in pixels for subscripts
73 74 75 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 73 def subscript_x_size @subscript_x_size end |
#subscript_y_offset ⇒ Object
Recommended vertical offset from the baseline for subscripts.
82 83 84 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 82 def subscript_y_offset @subscript_y_offset end |
#subscript_y_size ⇒ Object
Recommended vertical size in pixels for subscripts
76 77 78 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 76 def subscript_y_size @subscript_y_size end |
#superscript_x_offset ⇒ Object
Recommended horizontal offset for superscripts.
91 92 93 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 91 def superscript_x_offset @superscript_x_offset end |
#superscript_x_size ⇒ Object
Recommended horizontal size in pixels for superscripts
85 86 87 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 85 def superscript_x_size @superscript_x_size end |
#superscript_y_offset ⇒ Object
Recommended vertical offset from the baseline for superscripts.
94 95 96 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 94 def superscript_y_offset @superscript_y_offset end |
#superscript_y_size ⇒ Object
Recommended vertical size in pixels for superscripts
88 89 90 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 88 def superscript_y_size @superscript_y_size end |
#type ⇒ Object
Characteristics and properties of this font.
67 68 69 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 67 def type @type end |
#typo_ascender ⇒ Object
The typographic ascender. 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_ascender @typo_ascender end |
#typo_descender ⇒ Object
The typographic descender. May not be the same as the ascender in the ‘hhea’ table.
130 131 132 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 130 def typo_descender @typo_descender end |
#typo_line_gap ⇒ Object
The typographic line gap. May not be the same as the ascender in the ‘hhea’ table.
133 134 135 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 133 def typo_line_gap @typo_line_gap end |
#unicode_range ⇒ Object
Describes the Unicode ranges covered by the font.
109 110 111 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 109 def unicode_range @unicode_range end |
#upper_point_size ⇒ Object
The highest size at which the font starts to be used.
164 165 166 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 164 def upper_point_size @upper_point_size end |
#vendor_id ⇒ Object
The four character identifier of the font vendor.
112 113 114 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 112 def vendor_id @vendor_id end |
#version ⇒ Object
The version of the table.
55 56 57 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 55 def version @version end |
#weight_class ⇒ Object
Visual weight of stroke in glyphs.
61 62 63 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 61 def weight_class @weight_class end |
#width_class ⇒ Object
Relative change from the normal aspect ratio (width/height).
64 65 66 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 64 def width_class @width_class end |
#win_ascent ⇒ Object
The ascender metric for Windows.
136 137 138 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 136 def win_ascent @win_ascent end |
#win_descent ⇒ Object
The descender metric for Windows.
139 140 141 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 139 def win_descent @win_descent end |
#x_avg_char_width ⇒ Object
AVerage weighted advance width of lower case letters and space.
58 59 60 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 58 def x_avg_char_width @x_avg_char_width end |
#x_height ⇒ Object
The distance between the baseline and the approximate height of non-ascending lowercase letters.
146 147 148 |
# File 'lib/hexapdf/font/true_type/table/os2.rb', line 146 def x_height @x_height end |