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
550 551 552 |
# File 'lib/fontisan/type1/encodings.rb', line 550 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
527 528 529 530 |
# File 'lib/fontisan/type1/encodings.rb', line 527 def self.codepoint_for_glyph(name) raise NotImplementedError, "#{name} must implement codepoint_for_glyph" end |
.encoding_name ⇒ String
Get encoding name
543 544 545 |
# File 'lib/fontisan/type1/encodings.rb', line 543 def self.encoding_name raise NotImplementedError, "#{name} must implement encoding_name" end |
.glyph_name_for_code(codepoint) ⇒ String?
Get glyph name for character code
518 519 520 521 |
# File 'lib/fontisan/type1/encodings.rb', line 518 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
536 537 538 |
# File 'lib/fontisan/type1/encodings.rb', line 536 def self.include?(name) !codepoint_for_glyph(name).nil? end |