dobrograd-13-06-2022/garrysmod/gamemodes/darkrp/gamemode/modules/base/cl_fonts.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

110 lines
2.4 KiB
Lua

-----------------------------------------------------------------------------[[
/*---------------------------------------------------------------------------
The fonts that DarkRP uses
---------------------------------------------------------------------------*/
-----------------------------------------------------------------------------]]
local function loadFonts()
local tahoma = system.IsLinux() and "DejaVu Sans" or "Tahoma"
local tahomaSize = system.IsLinux() and fp{fn.Flip(fn.Add), 1} or fn.Id
surface.CreateFont("DarkRPHUD1", {
size = tahomaSize(16),
weight = 600,
antialias = true,
shadow = true,
font = "Arial"})
surface.CreateFont("DarkRPHUD2", {
size = 23,
weight = 400,
antialias = true,
shadow = false,
font = "Arial"})
surface.CreateFont("Trebuchet18", {
size = 18,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("Trebuchet20", {
size = 20,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("Trebuchet24", {
size = 24,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("TabLarge", {
size = tahomaSize(15),
weight = 700,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("UiBold", {
size = 16,
weight = 800,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("HUDNumber5", {
size = 30,
weight = 800,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("ScoreboardHeader", {
size = 32,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("ScoreboardSubtitle", {
size = 22,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("ScoreboardPlayerName", {
size = 19,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("ScoreboardPlayerName2", {
size = 15,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("ScoreboardPlayerNameBig", {
size = 22,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
surface.CreateFont("AckBarWriting", {
size = 20,
weight = 500,
antialias = true,
shadow = false,
font = "Default"})
end
loadFonts()
-- Load twice because apparently once is not enough
hook.Add("InitPostEntity", "DarkRP_LoadFonts", loadFonts)