Module: HexaPDF::Font::Encoding
- Defined in:
- lib/hexapdf/font/encoding.rb,
lib/hexapdf/font/encoding/base.rb,
lib/hexapdf/font/encoding/glyph_list.rb,
lib/hexapdf/font/encoding/symbol_encoding.rb,
lib/hexapdf/font/encoding/standard_encoding.rb,
lib/hexapdf/font/encoding/win_ansi_encoding.rb,
lib/hexapdf/font/encoding/mac_roman_encoding.rb,
lib/hexapdf/font/encoding/difference_encoding.rb,
lib/hexapdf/font/encoding/mac_expert_encoding.rb,
lib/hexapdf/font/encoding/zapf_dingbats_encoding.rb
Overview
Contains implementations of the encodings used for fonts.
Defined Under Namespace
Classes: Base, DifferenceEncoding, GlyphList, MacExpertEncoding, MacRomanEncoding, StandardEncoding, SymbolEncoding, WinAnsiEncoding, ZapfDingbatsEncoding
Class Method Summary collapse
-
.for_name(name) ⇒ Object
Returns the encoding object for the given name, or
nil
if no such encoding is available.
Class Method Details
.for_name(name) ⇒ Object
Returns the encoding object for the given name, or nil
if no such encoding is available.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/hexapdf/font/encoding.rb', line 56 def self.for_name(name) case name when :WinAnsiEncoding then @win_ansi ||= WinAnsiEncoding.new when :MacRomanEncoding then @mac_roman ||= MacRomanEncoding.new when :StandardEncoding then @standard ||= StandardEncoding.new when :MacExpertEncoding then @mac_expert ||= MacExpertEncoding.new when :SymbolEncoding then @symbol ||= SymbolEncoding.new when :ZapfDingbatsEncoding then @zapf_dingbats ||= ZapfDingbatsEncoding.new else nil end end |