summaryrefslogtreecommitdiff
path: root/lib/tktext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tktext.rb')
-rw-r--r--lib/tktext.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/tktext.rb b/lib/tktext.rb
index 8ffc6260464..e0b4f9641ea 100644
--- a/lib/tktext.rb
+++ b/lib/tktext.rb
@@ -58,8 +58,11 @@ module TkTreatTextTagFont
fobj = tagfontobj(tag)
if ltn.kind_of? TkFont
conf = {}
- ltn.latin_configinfo.each{|key,val| conf[key] = val}
- if keys
+ ltn.latin_configinfo.each{|key,val| conf[key] = val if val != []}
+ if conf == {}
+ fobj.latin_replace(ltn)
+ fobj.latin_configure(keys) if keys
+ elsif keys
fobj.latin_configure(conf.update(keys))
else
fobj.latin_configure(conf)
@@ -74,8 +77,11 @@ module TkTreatTextTagFont
fobj = tagfontobj(tag)
if knj.kind_of? TkFont
conf = {}
- knj.kanji_configinfo.each{|key,val| conf[key] = val}
- if keys
+ knj.kanji_configinfo.each{|key,val| conf[key] = val if val != []}
+ if conf == {}
+ fobj.kanji_replace(knj)
+ fobj.kanji_configure(keys) if keys
+ elsif keys
fobj.kanji_configure(conf.update(keys))
else
fobj.kanji_configure(conf)