local ded_char_w = 64
local ded_char_h = 52
local font_DED_chars = {
	[1]		= {latin['A'], ded_char_w, ded_char_h},
	[2]		= {latin['B'], ded_char_w, ded_char_h},
	[3]		= {latin['C'], ded_char_w, ded_char_h},
	[4]		= {latin['D'], ded_char_w, ded_char_h},
	[5]		= {latin['E'], ded_char_w, ded_char_h},
	[6]		= {latin['F'], ded_char_w, ded_char_h},
	[7]		= {latin['G'], ded_char_w, ded_char_h},
	[8]		= {latin['H'], ded_char_w, ded_char_h},
	[9]		= {latin['I'], ded_char_w, ded_char_h},
	[10]	= {latin['J'], ded_char_w, ded_char_h},
	[11]	= {latin['K'], ded_char_w, ded_char_h},
	[12]	= {latin['L'], ded_char_w, ded_char_h},
	[13]	= {latin['M'], ded_char_w, ded_char_h},
	[14]	= {latin['N'], ded_char_w, ded_char_h},
	[15]	= {latin['O'], ded_char_w, ded_char_h},
	[16]	= {latin['P'], ded_char_w, ded_char_h},
	[17]	= {latin['Q'], ded_char_w, ded_char_h},
	[18]	= {latin['R'], ded_char_w, ded_char_h},
	[19]	= {latin['S'], ded_char_w, ded_char_h},
	[20]	= {latin['T'], ded_char_w, ded_char_h},
	[21]	= {latin['U'], ded_char_w, ded_char_h},
	[22]	= {latin['V'], ded_char_w, ded_char_h},
	[23]	= {latin['W'], ded_char_w, ded_char_h},
	[24]	= {latin['X'], ded_char_w, ded_char_h},
	[25]	= {latin['Y'], ded_char_w, ded_char_h},
	[26]	= {latin['Z'], ded_char_w, ded_char_h},

	[27]	= {symbol['1'], ded_char_w, ded_char_h},
	[28]	= {symbol['2'], ded_char_w, ded_char_h},
	[29]	= {symbol['3'], ded_char_w, ded_char_h},
	[30]	= {symbol['4'], ded_char_w, ded_char_h},
	[31]	= {symbol['5'], ded_char_w, ded_char_h},
	[32]	= {symbol['6'], ded_char_w, ded_char_h},
	[33]	= {symbol['7'], ded_char_w, ded_char_h},
	[34]	= {symbol['8'], ded_char_w, ded_char_h},
	[35]	= {symbol['9'], ded_char_w, ded_char_h},
	[36]	= {symbol['0'], ded_char_w, ded_char_h},

	[37]	= {symbol['^'], ded_char_w, ded_char_h},	-- small triangles up and down in the same symbol
	[38]	= {symbol['('], ded_char_w, ded_char_h},
	[39]	= {symbol[')'], ded_char_w, ded_char_h},
	[40]	= {symbol['<'], ded_char_w, ded_char_h},
	[41]	= {symbol['>'], ded_char_w, ded_char_h},
	[42]	= {symbol['['], ded_char_w, ded_char_h},
	[43]	= {symbol[']'], ded_char_w, ded_char_h},
	[44]	= {symbol['+'], ded_char_w, ded_char_h},
	[45]	= {symbol['-'], ded_char_w, ded_char_h},
	[46]	= {symbol['*'], ded_char_w, ded_char_h},
	[47]	= {symbol['/'], ded_char_w, ded_char_h},
	[48]	= {symbol['='], ded_char_w, ded_char_h},
	[49]	= {symbol['$'], ded_char_w, ded_char_h},	-- degrees
	[50]	= {symbol['|'], ded_char_w, ded_char_h},
	[51]	= {latin['d'], ded_char_w, ded_char_h},	-- arrow down
	[52]	= {latin['u'], ded_char_w, ded_char_h},	-- arrow up
	[53]	= {symbol['.'], ded_char_w, ded_char_h},
	[54]	= {symbol[','], ded_char_w, ded_char_h},
	[55]	= {symbol['!'], ded_char_w, ded_char_h},
	[56]	= {symbol['?'], ded_char_w, ded_char_h},
	[57]	= {symbol[':'], ded_char_w, ded_char_h},
	[58]	= {symbol[';'], ded_char_w, ded_char_h},
	[59]	= {symbol['&'], ded_char_w, ded_char_h},
	[60]	= {symbol['_'], ded_char_w, ded_char_h},
	[61]	= {symbol['\''], ded_char_w, ded_char_h},
	[62]	= {symbol['"'], ded_char_w, ded_char_h},
	[63]	= {symbol['%'], ded_char_w, ded_char_h},
	[64]	= {symbol['#'], ded_char_w, ded_char_h},
	[65]	= {symbol['@'], ded_char_w, ded_char_h},
	[66]	= {symbol[' '], ded_char_w, ded_char_h},
	[67]	= {symbol[' '], ded_char_w, ded_char_h},
	[68]	= {symbol[' '], ded_char_w, ded_char_h},
	[69]	= {symbol[' '], ded_char_w, ded_char_h},
	[70]	= {symbol[' '], ded_char_w, ded_char_h},
	[71]	= {symbol[' '], ded_char_w, ded_char_h},
	[72]	= {symbol[' '], ded_char_w, ded_char_h},

    [73]	= {latin['A']+32, ded_char_w, ded_char_h},
	[74]	= {latin['B']+32, ded_char_w, ded_char_h},
	[75]	= {latin['C']+32, ded_char_w, ded_char_h},
	[76]	= {latin['D']+32, ded_char_w, ded_char_h},
	[77]	= {latin['E']+32, ded_char_w, ded_char_h},
	[78]	= {latin['F']+32, ded_char_w, ded_char_h},
	[79]	= {latin['G']+32, ded_char_w, ded_char_h},
	[80]	= {latin['H']+32, ded_char_w, ded_char_h},
	[81]	= {latin['I']+32, ded_char_w, ded_char_h},
	[82]	= {latin['J']+32, ded_char_w, ded_char_h},
	[83]	= {latin['K']+32, ded_char_w, ded_char_h},
	[84]	= {latin['L']+32, ded_char_w, ded_char_h},
	[85]	= {latin['M']+32, ded_char_w, ded_char_h},
	[86]	= {latin['N']+32, ded_char_w, ded_char_h},
	[87]	= {latin['O']+32, ded_char_w, ded_char_h},
	[88]	= {latin['P']+32, ded_char_w, ded_char_h},
	[89]	= {latin['Q']+32, ded_char_w, ded_char_h},
	[90]	= {latin['R']+32, ded_char_w, ded_char_h},
	[91]	= {latin['S']+32, ded_char_w, ded_char_h},
	[92]	= {latin['T']+32, ded_char_w, ded_char_h},
	[93]	= {latin['U']+32, ded_char_w, ded_char_h},
	[94]	= {latin['V']+32, ded_char_w, ded_char_h},
	[95]	= {latin['W']+32, ded_char_w, ded_char_h},
	[96]	= {latin['X']+32, ded_char_w, ded_char_h},
	[97]	= {latin['Y']+32, ded_char_w, ded_char_h},
	[98]	= {latin['Z']+32, ded_char_w, ded_char_h},

	[99]	= {symbol['1']-34, ded_char_w, ded_char_h},
	[100]	= {symbol['2']-34, ded_char_w, ded_char_h},
	[101]	= {symbol['3']-34, ded_char_w, ded_char_h},
	[102]	= {symbol['4']-34, ded_char_w, ded_char_h},
	[103]	= {symbol['5']-34, ded_char_w, ded_char_h},
	[104]	= {symbol['6']-34, ded_char_w, ded_char_h},
	[105]	= {symbol['7']-34, ded_char_w, ded_char_h},
	[106]	= {symbol['8']-34, ded_char_w, ded_char_h},
	[107]	= {symbol['9']-34, ded_char_w, ded_char_h},
	[108]	= {symbol['0']-34, ded_char_w, ded_char_h},

	[109]	= {latin['z']+128, ded_char_w, ded_char_h},	-- small triangles up and down in the same symbol
	[110]	= {symbol['(']-31, ded_char_w, ded_char_h},
	[111]	= {symbol[')']-31, ded_char_w, ded_char_h},
	[112]	= {symbol['<']+128, ded_char_w, ded_char_h}, -- 28
	[113]	= {symbol['>']+128, ded_char_w, ded_char_h}, -- 30
	[114]	= {symbol['[']+128, ded_char_w, ded_char_h},
	[115]	= {symbol[']']+128, ded_char_w, ded_char_h},
	[116]	= {symbol['+']-31, ded_char_w, ded_char_h},
	[117]	= {symbol['-']-20, ded_char_w, ded_char_h},
	[118]	= {symbol['*']-31, ded_char_w, ded_char_h}, -- 10
	[119]	= {symbol['/']-20, ded_char_w, ded_char_h},
	[120]	= {symbol['=']+128, ded_char_w, ded_char_h}, -- 29
	[121]	= {symbol['$']-31, ded_char_w, ded_char_h},	-- degrees -- 31
	[122]	= {symbol['|']+128, ded_char_w, ded_char_h},
	[123]	= {latin['d']+128, ded_char_w, ded_char_h},	-- arrow down
	[124]	= {latin['u']+128, ded_char_w, ded_char_h},	-- arrow up
	[125]	= {symbol['.']-20, ded_char_w, ded_char_h}, -- 14
	[126]	= {symbol[',']-20, ded_char_w, ded_char_h},
	[127]	= {symbol['!']-31, ded_char_w, ded_char_h},
	[128]	= {symbol['?']+128, ded_char_w, ded_char_h},
	[129]	= {symbol[':']-30, ded_char_w, ded_char_h}, -- 26
	[130]	= {symbol[';']+128, ded_char_w, ded_char_h}, -- 27
	[131]	= {symbol['&']-31, ded_char_w, ded_char_h},
	[132]	= {symbol['_']+128, ded_char_w, ded_char_h},
	[133]	= {symbol['\'']-31, ded_char_w, ded_char_h}, -- 7
	[134]	= {symbol['"']-31, ded_char_w, ded_char_h},
	[135]	= {symbol['%']-31, ded_char_w, ded_char_h},
	[136]	= {symbol['#']-31, ded_char_w, ded_char_h},
	[137]	= {symbol['@']+128, ded_char_w, ded_char_h},
	[138]	= {symbol[' ']-31, ded_char_w, ded_char_h},


    -- [99]	= {symbol['1']-32, ded_char_w, ded_char_h}, -- 17
	-- [100]	= {symbol['2']-32, ded_char_w, ded_char_h}, -- 18
	-- [101]	= {symbol['3']-32, ded_char_w, ded_char_h}, -- 19
	-- [102]	= {symbol['4']-32, ded_char_w, ded_char_h}, -- 20
	-- [103]	= {symbol['5']-32, ded_char_w, ded_char_h}, -- 21
	-- [104]	= {symbol['6']-32, ded_char_w, ded_char_h}, -- 22
	-- [105]	= {symbol['7']-32, ded_char_w, ded_char_h}, -- 23
	-- [106]	= {symbol['8']-32, ded_char_w, ded_char_h}, -- 24
	-- [107]	= {symbol['9']-32, ded_char_w, ded_char_h}, -- 25
	-- [108]	= {symbol['0']-32, ded_char_w, ded_char_h}, -- 16

	-- [109]	= {latin['z']+128, ded_char_w, ded_char_h},	-- small triangles up and down in the same symbol
	-- [110]	= {symbol['(']+128, ded_char_w, ded_char_h},
	-- [111]	= {symbol[')']+128, ded_char_w, ded_char_h},
	-- [112]	= {symbol['<']-32, ded_char_w, ded_char_h}, -- 28
	-- [113]	= {symbol['>']-32, ded_char_w, ded_char_h}, -- 30
	-- [114]	= {symbol['[']+128, ded_char_w, ded_char_h},
	-- [115]	= {symbol[']']+128, ded_char_w, ded_char_h},
	-- [116]	= {symbol['+']+128, ded_char_w, ded_char_h},
	-- [117]	= {symbol['-']+128, ded_char_w, ded_char_h},
	-- [118]	= {symbol['*']-32, ded_char_w, ded_char_h}, -- 10
	-- [119]	= {symbol['/']+128, ded_char_w, ded_char_h},
	-- [120]	= {symbol['=']-32, ded_char_w, ded_char_h}, -- 29
	-- [121]	= {symbol['°']-48, ded_char_w, ded_char_h},	-- degrees -- 128
	-- [122]	= {symbol['|']+128, ded_char_w, ded_char_h},
	-- [123]	= {latin['d']+128, ded_char_w, ded_char_h},	-- arrow down
	-- [124]	= {latin['u']+128, ded_char_w, ded_char_h},	-- arrow up
	-- [125]	= {symbol['.']-32, ded_char_w, ded_char_h}, -- 14
	-- [126]	= {symbol[',']+128, ded_char_w, ded_char_h},
	-- [127]	= {symbol['!']+128, ded_char_w, ded_char_h},
	-- [128]	= {symbol['?']+128, ded_char_w, ded_char_h},
	-- [129]	= {symbol[':']-32, ded_char_w, ded_char_h}, -- 26
	-- [130]	= {symbol[';']-32, ded_char_w, ded_char_h}, -- 27
	-- [131]	= {symbol['&']+128, ded_char_w, ded_char_h},
	-- [132]	= {symbol['_']+128, ded_char_w, ded_char_h},
	-- [133]	= {symbol['\'']-32, ded_char_w, ded_char_h}, -- 7
	-- [134]	= {symbol['"']+128, ded_char_w, ded_char_h},
	-- [135]	= {symbol['%']+128, ded_char_w, ded_char_h},
	-- [136]	= {symbol['#']+128, ded_char_w, ded_char_h},
	-- [137]	= {symbol['@']+128, ded_char_w, ded_char_h},
	-- [138]	= {symbol[' ']-1, ded_char_w, ded_char_h},
}

local ResourcesPath = LockOn_Options.script_path.."UFCP/Resources/"

fontdescription["font_DED"] = {
	texture		= ResourcesPath.."a29b_ded_font.dds",
	size		= {18, 8},	-- rows, columns
	resolution	= {512, 936},	-- [w, h] resolution of texture in pixels
	default		= {ded_char_w, ded_char_h},	-- [w,h] resolution for symbol in pixels
	chars		= font_DED_chars
}
fontdescription["font_DED_inv"] = {
	texture		= ResourcesPath.."ded_font_inv.dds",
	size		= {18, 8},	-- rows, columns
	resolution	= {512, 936},	-- [w, h] resolution of texture in pixels
	default		= {ded_char_w, ded_char_h},	-- [w,h] resolution for symbol in pixels
	chars		= font_DED_chars
}

materials["ufcp_material_def"] = {0, 255, 0, 240}
fonts["ufcp_font_def"]  = {fontdescription["font_DED"], 10, materials["ufcp_material_def"]}
