Sha256: c816622f813ce37cee9ed0613bc749fae843c68afe06d06965edfc76befdb4dc

Contents?: true

Size: 877 Bytes

Versions: 9

Compression:

Stored size: 877 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

9 entries across 9 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.0.pre.rc.3-x64-mingw-ucrt lib/wx/core/font.rb
wxruby3-0.9.0.pre.rc.2-x64-mingw-ucrt lib/wx/core/font.rb