summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkfont.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkfont.rb')
-rw-r--r--ext/tk/lib/tkfont.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb
index 1526f68d88..c680d166e7 100644
--- a/ext/tk/lib/tkfont.rb
+++ b/ext/tk/lib/tkfont.rb
@@ -817,6 +817,7 @@ class TkFont
#if JAPANIZED_TK
if @kanjifont != ""
configure_core(@kanjifont, slot, value)
+ configure('size'=>configinfo('size')) # to reflect new configuration
else
#""
configure(slot, value)
@@ -841,10 +842,12 @@ class TkFont
def latin_replace(ltn)
latin_replace_core(ltn)
+ reset_pointadjust
end
def kanji_replace(knj)
kanji_replace_core(knj)
+ reset_pointadjust
end
def measure(text)
@@ -891,6 +894,17 @@ class TkFont
end
end
+ def reset_pointadjust
+ begin
+ if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
+ configure('pointadjust' => latin_actual.assoc('size')[1].to_f /
+ kanji_actual.assoc('size')[1].to_f )
+ end
+ rescue
+ end
+ self
+ end
+
###################################
# public alias
###################################