Set IUP to use Property Box Font selection and font size

require "luacom"


function setIupDefaults()
    -- Get Font and size from the Registry for the property box and use as the default font.
    local v
    v = getRegKey('HKEY_CURRENT_USER\\Software\\Calico Pie\\Family Historian\\2.0\\Preferences\\PDX Font')
    local t = {stringx.splitv(v,',')} -- first value is size and 14th is font name
    iup.SetGlobal('DEFAULTFONT', t[14]..' '..t[1]/20)
    iup.SetGlobal("UTF8MODE", "YES")
    iup.SetGlobal("UTF8MODE_FILE", "NO") --use file names in the current locale
    fhSetStringEncoding("UTF-8")
end