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.
349 350 351 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 349 def copyright @copyright end |
#family_name ⇒ String?
Returns Family name.
343 344 345 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 343 def family_name @family_name end |
#full_name ⇒ String?
Returns Full font name.
340 341 342 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 340 def full_name @full_name end |
#is_fixed_pitch ⇒ String?
Returns Fixed pitch (monospace) indicator.
358 359 360 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 358 def is_fixed_pitch @is_fixed_pitch end |
#italic_angle ⇒ String?
Returns Italic angle.
367 368 369 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 367 def italic_angle @italic_angle end |
#notice ⇒ String?
Returns Notice string.
352 353 354 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 352 def notice @notice end |
#underline_position ⇒ String?
Returns Underline position.
361 362 363 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 361 def underline_position @underline_position end |
#underline_thickness ⇒ String?
Returns Underline thickness.
364 365 366 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 364 def underline_thickness @underline_thickness end |
#version ⇒ String?
Returns Font version.
346 347 348 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 346 def version @version end |
#weight ⇒ String?
Returns Font weight (Thin, Light, Regular, Bold, etc.).
355 356 357 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 355 def weight @weight end |
Instance Method Details
#parse(dict_data) ⇒ Object
Parse FontInfo from dictionary data
372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/fontisan/type1/font_dictionary.rb', line 372 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 |