diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-12 07:48:31 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-12 07:48:31 +0000 |
| commit | 2bc48ec00f2ee0028c1a5096aa676391820b87ec (patch) | |
| tree | f89e9e7746e75343a2886ee50fc23a37f9fe5886 /ext/tk/lib/tkfont.rb | |
| parent | ce6c53d24d361f589169ffa49360e93be8c994a3 (diff) | |
| download | ruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.tar.gz ruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.tar.xz ruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.zip | |
2000-06-12
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkfont.rb')
| -rw-r--r-- | ext/tk/lib/tkfont.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb index 2683260d6..363839d3d 100644 --- a/ext/tk/lib/tkfont.rb +++ b/ext/tk/lib/tkfont.rb @@ -49,7 +49,7 @@ class TkFont def TkFont.create_copy(font) keys = {} - font.configure.each{|key,value| keys[key] = value } + font.configinfo.each{|key,value| keys[key] = value } new_font = TkFont.new(font.latin_font, font.kanji_font, keys) end @@ -123,17 +123,13 @@ class TkFont ################################### private ################################### - def initialize(ltn=nil, knj=nil, keys=nil) + def initialize(ltn=DEFAULT_LATIN_FONT_NAME, knj=DEFAULT_KANJI_FONT_NAME, + keys=nil) @id = format("@font%.4d", Tk_FontID[0]) Tk_FontID[0] += 1 Tk_FontNameTBL[@id] = self - - ltn = DEFAULT_LATIN_FONT_NAME unless ltn create_latinfont(ltn) - - knj = DEFAULT_KANJI_FONT_NAME unless knj create_kanjifont(knj) - create_compoundfont(keys) end @@ -714,7 +710,7 @@ class TkFont if winobj.kind_of? TkText ret.push([winobj, winobj.tagid2obj(tag)]) elsif winobj.kind_of? TkCanvas - if (tagobj = TkcTag.id2obj(tag)).kind_of? TkcTag + if (tagobj = TkcTag.id2obj(winobj, tag)).kind_of? TkcTag ret.push([winobj, tagobj]) elsif (tagobj = TkcItem.id2obj(tag)).kind_of? TkcItem ret.push([winobj, tagobj]) @@ -822,7 +818,7 @@ class TkFont if JAPANIZED_TK configinfo_core(@latinfont, slot) else - configure(slot, value) + configinfo(slot) end end |
