Class: Fontisan::Type1::Encodings::Encoding
- Inherits:
-
Object
- Object
- Fontisan::Type1::Encodings::Encoding
- Defined in:
- lib/fontisan/type1/encodings.rb
Overview
Base encoding class
All encoding classes should inherit from this and implement the required methods.
Direct Known Subclasses
Class Method Summary collapse
-
.all_glyph_names ⇒ Array<String>
Get all glyph names in encoding.
-
.codepoint_for_glyph(name) ⇒ Integer?
Get character code for glyph name.
-
.encoding_name ⇒ String
Get encoding name.
-
.glyph_name_for_code(codepoint) ⇒ String?
Get glyph name for character code.
-
.include?(name) ⇒ Boolean
Check if glyph name is in encoding.
Class Method Details
.all_glyph_names ⇒ Array<String>
Get all glyph names in encoding
552 553 554 |
# File 'lib/fontisan/type1/encodings.rb', line 552 def self.all_glyph_names raise NotImplementedError, "#{name} must implement all_glyph_names" end |
.codepoint_for_glyph(name) ⇒ Integer?
Get character code for glyph name
529 530 531 532 |
# File 'lib/fontisan/type1/encodings.rb', line 529 def self.codepoint_for_glyph(name) raise NotImplementedError, "#{name} must implement codepoint_for_glyph" end |
.encoding_name ⇒ String
Get encoding name
545 546 547 |
# File 'lib/fontisan/type1/encodings.rb', line 545 def self.encoding_name raise NotImplementedError, "#{name} must implement encoding_name" end |
.glyph_name_for_code(codepoint) ⇒ String?
Get glyph name for character code
520 521 522 523 |
# File 'lib/fontisan/type1/encodings.rb', line 520 def self.glyph_name_for_code(codepoint) raise NotImplementedError, "#{name} must implement glyph_name_for_code" end |
.include?(name) ⇒ Boolean
Check if glyph name is in encoding
538 539 540 |
# File 'lib/fontisan/type1/encodings.rb', line 538 def self.include?(name) !codepoint_for_glyph(name).nil? end |