Class: Fontisan::Type1::Encodings::AdobeStandard
- Defined in:
- lib/fontisan/type1/encodings.rb
Overview
Adobe Standard Encoding
The most common encoding for Type 1 fonts, providing a consistent mapping of glyph names to character positions in the range 0-255.
Constant Summary collapse
- CODE_TO_GLYPH =
code_to_glyph.freeze
- GLYPH_TO_CODE =
glyph_to_code.freeze
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.
Methods inherited from Encoding
Class Method Details
.all_glyph_names ⇒ Array<String>
Get all glyph names in encoding
598 599 600 |
# File 'lib/fontisan/type1/encodings.rb', line 598 def self.all_glyph_names ADOBE_STANDARD.reject { |n| n == ".notdef" } end |
.codepoint_for_glyph(name) ⇒ Integer?
Get character code for glyph name
584 585 586 |
# File 'lib/fontisan/type1/encodings.rb', line 584 def self.codepoint_for_glyph(name) GLYPH_TO_CODE[name] end |
.encoding_name ⇒ String
Get encoding name
591 592 593 |
# File 'lib/fontisan/type1/encodings.rb', line 591 def self.encoding_name "AdobeStandard" end |
.glyph_name_for_code(codepoint) ⇒ String?
Get glyph name for character code
576 577 578 |
# File 'lib/fontisan/type1/encodings.rb', line 576 def self.glyph_name_for_code(codepoint) CODE_TO_GLYPH[codepoint] end |