Hmm... a sprawdź ten skrypt. Korzystam z niego w Wymiarze X i chyba nie ma tego błędu...
#==============================================================================
# ** Fonts
#------------------------------------------------------------------------------
# Install or load the font.
#==============================================================================
module Fonts
AutoInstall = {'Arial.ttf' => 'Arial'}
Source = 'Fonts/'
AFR = Win32API.new('gdi32', 'AddFontResource', ['P'], 'L')
WPS = Win32API.new('kernel32', 'WriteProfileString', ['P'] * 3, 'L')
SM = Win32API.new('user32', 'SendNotifyMessage', ['L'] * 4, 'L')
SHGetFolderPath = Win32API.new("shell32.dll","SHGetFolderPath","PIPIP","I")
WM_FONTCHANGE = 0x001D
HWND_BROADCAST = 0xffff
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def self.reload_custom_fonts
needs_reset = false
for i in Fonts::AutoInstall.keys
f = i.dup
n = Fonts::AutoInstall[f]
if not Font.exist?(n)
if FileTest.exists?(Fonts::Source + f)
needs_reset = true
fontDir = " " * 256
SHGetFolderPath.call(0,0x0014,0,0,fontDir)
fontDir = fontDir.strip.gsub("\000","")
fontDir.gsub!(/\\/, "/")
if File.writable_real?(fontDir)
dest = File.open("#{fontDir}/#{f}", "w+")
src = File.open(Fonts::Source + f, "r")
src.each { |line| dest.puts(line) }
dest.close; src.close
AFR.call("#{fontDir}/#{f}")
SM.call(HWND_BROADCAST, WM_FONTCHANGE, 0, 0)
WPS.call('Fonts', '#{f} (TrueType)', f)
else
Fonts::Source + f
AFR.call(Fonts::Source + f)
SM.call(HWND_BROADCAST, WM_FONTCHANGE, 0, 0)
WPS.call('Fonts', n + ' (TrueType)', f)
end
else
p 'Czcionki: font ' + f + ' nie znaleziono.'
end
end
end
if needs_reset
Thread.new { system('Game') }
exit
end
end
end
Fonts.reload_custom_fonts