Class: Fontisan::Type1::FontDictionary::FontInfo
- Inherits:
-
Object
- Object
- Fontisan::Type1::FontDictionary::FontInfo
- Defined in:
- lib/fontisan/type1/font_dictionary.rb
Overview
FontInfo sub-dictionary
Contains font metadata such as FullName, FamilyName, version, etc.
Instance Attribute Summary collapse
-
#copyright ⇒ String?
Copyright notice.
-
#family_name ⇒ String?
Family name.
-
#full_name ⇒ String?
Full font name.
-
#is_fixed_pitch ⇒ String?
Fixed pitch (monospace) indicator.
-
#italic_angle ⇒ String?
Italic angle.
-
#notice ⇒ String?
Notice string.
-
#underline_position ⇒ String?
Underline position.
-
#underline_thickness ⇒ String?
Underline thickness.
-
#version ⇒ String?
Font version.
-
#weight ⇒ String?
Font weight (Thin, Light, Regular, Bold, etc.).
Instance Method Summary collapse
-
#parse(dict_data) ⇒ Object
Parse FontInfo from dictionary data.
Instance Attribute Details
#copyright ⇒ String?
Returns Copyright notice.
287 288 289 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 287 def copyright @copyright end |
#family_name ⇒ String?
Returns Family name.
281 282 283 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 281 def family_name @family_name end |
#full_name ⇒ String?
Returns Full font name.
278 279 280 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 278 def full_name @full_name end |
#is_fixed_pitch ⇒ String?
Returns Fixed pitch (monospace) indicator.
296 297 298 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 296 def is_fixed_pitch @is_fixed_pitch end |
#italic_angle ⇒ String?
Returns Italic angle.
305 306 307 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 305 def italic_angle @italic_angle end |
#notice ⇒ String?
Returns Notice string.
290 291 292 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 290 def notice @notice end |
#underline_position ⇒ String?
Returns Underline position.
299 300 301 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 299 def underline_position @underline_position end |
#underline_thickness ⇒ String?
Returns Underline thickness.
302 303 304 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 302 def underline_thickness @underline_thickness end |
#version ⇒ String?
Returns Font version.
284 285 286 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 284 def version @version end |
#weight ⇒ String?
Returns Font weight (Thin, Light, Regular, Bold, etc.).
293 294 295 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 293 def weight @weight end |
Instance Method Details
#parse(dict_data) ⇒ Object
Parse FontInfo from dictionary data
310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 310 def parse(dict_data) # FontInfo can be embedded in the main dict or as a sub-dict # Try to extract from various patterns @full_name = extract_string_value(dict_data, "FullName") @family_name = extract_string_value(dict_data, "FamilyName") @version = extract_string_value(dict_data, "version") @copyright = extract_string_value(dict_data, "Copyright") @notice = extract_string_value(dict_data, "Notice") @weight = extract_string_value(dict_data, "Weight") @is_fixed_pitch = extract_value(dict_data, "isFixedPitch") @underline_position = extract_value(dict_data, "UnderlinePosition") @underline_thickness = extract_value(dict_data, "UnderlineThickness") @italic_angle = extract_value(dict_data, "ItalicAngle") end |