Sha256: 2e0d02e88a7aea5ccb2caa0d5c07ae5e0b8e3b9854e1d86ad1b29d71061cccbf

Contents?: true

Size: 847 Bytes

Versions: 17

Compression:

Stored size: 847 Bytes

Contents

require_relative './font/encoding'

module Wx

  class Font
    class << self
      # Returns the name of the platform's default font encoding
      def get_default_encoding_name
        ENCODING_NAMES[ get_default_encoding ]
      end

      # Sets the default encoding to be +enc+, which may be the string
      # name of an encoding (eg 'UTF8') or an internal WxWidgets flag
      # (eg Wx::FONTENCODING_UTF8).
      def set_default_encoding_name(enc)
        if flag_int = ENCODING_NAMES.index(enc.upcase)
          set_default_encoding(Wx::FontEncoding.new(flag_int))
        else
          raise ArgumentError, "Unknown font encoding name '#{enc}'"
        end
      end
    end
  end

  # make this simply an alias for the Font class so the #find_or_create_font methods
  # can be accessed through that name too.
  TheFontList = Font

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
wxruby3-1.3.0 lib/wx/core/font.rb
wxruby3-1.2.1 lib/wx/core/font.rb
wxruby3-1.2.0 lib/wx/core/font.rb
wxruby3-1.1.2 lib/wx/core/font.rb
wxruby3-1.1.1 lib/wx/core/font.rb
wxruby3-1.1.0 lib/wx/core/font.rb
wxruby3-1.0.1 lib/wx/core/font.rb
wxruby3-0.9.8 lib/wx/core/font.rb
wxruby3-0.9.7 lib/wx/core/font.rb
wxruby3-0.9.5 lib/wx/core/font.rb
wxruby3-0.9.4 lib/wx/core/font.rb
wxruby3-0.9.3 lib/wx/core/font.rb
wxruby3-0.9.2 lib/wx/core/font.rb
wxruby3-0.9.1 lib/wx/core/font.rb
wxruby3-0.9.0 lib/wx/core/font.rb
wxruby3-0.9.0.pre.rc.3 lib/wx/core/font.rb
wxruby3-0.9.0.pre.rc.2 lib/wx/core/font.rb