2019-12-28 12:16:32 +01:00
|
|
|
local common = require "core.common"
|
|
|
|
local style = {}
|
|
|
|
|
2020-04-25 10:57:35 +02:00
|
|
|
style.padding = { x = common.round(14 * SCALE), y = common.round(7 * SCALE) }
|
|
|
|
style.divider_size = common.round(1 * SCALE)
|
|
|
|
style.scrollbar_size = common.round(4 * SCALE)
|
|
|
|
style.caret_width = common.round(2 * SCALE)
|
|
|
|
style.tab_width = common.round(170 * SCALE)
|
2019-12-28 12:16:32 +01:00
|
|
|
|
2020-12-04 16:15:54 +01:00
|
|
|
-- The function renderer.font.load can accept an option table as a second optional argument.
|
|
|
|
-- It shoud be like the following:
|
|
|
|
--
|
|
|
|
-- {antialiasing= "grayscale", hinting = "full"}
|
|
|
|
--
|
|
|
|
-- The possible values for each option are:
|
2020-12-06 11:23:33 +01:00
|
|
|
-- - for antialiasing: grayscale, subpixel
|
2020-12-04 16:15:54 +01:00
|
|
|
-- - for hinting: none, slight, full
|
|
|
|
--
|
2020-12-06 11:23:33 +01:00
|
|
|
-- The defaults values are antialiasing subpixel and hinting slight for optimal visualization
|
2020-12-04 16:15:54 +01:00
|
|
|
-- on ordinary LCD monitor with RGB patterns.
|
|
|
|
--
|
2020-12-06 11:23:33 +01:00
|
|
|
-- On High DPI monitor or non RGB monitor you may consider using antialiasing grayscale instead.
|
|
|
|
-- The antialiasing grayscale with full hinting is interesting for crisp font rendering.
|
2020-12-02 00:23:15 +01:00
|
|
|
style.font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 14 * SCALE)
|
|
|
|
style.big_font = renderer.font.load(DATADIR .. "/fonts/font.ttf", 34 * SCALE)
|
2020-12-04 16:15:54 +01:00
|
|
|
style.icon_font = renderer.font.load(DATADIR .. "/fonts/icons.ttf", 14 * SCALE, {antialiasing="grayscale", hinting="full"})
|
2020-12-02 00:23:15 +01:00
|
|
|
style.code_font = renderer.font.load(DATADIR .. "/fonts/monospace.ttf", 13.5 * SCALE)
|
2019-12-28 12:16:32 +01:00
|
|
|
|
2020-05-09 12:10:19 +02:00
|
|
|
style.background = { common.color "#2e2e32" }
|
|
|
|
style.background2 = { common.color "#252529" }
|
|
|
|
style.background3 = { common.color "#252529" }
|
|
|
|
style.text = { common.color "#97979c" }
|
|
|
|
style.caret = { common.color "#93DDFA" }
|
|
|
|
style.accent = { common.color "#e1e1e6" }
|
|
|
|
style.dim = { common.color "#525257" }
|
|
|
|
style.divider = { common.color "#202024" }
|
|
|
|
style.selection = { common.color "#48484f" }
|
|
|
|
style.line_number = { common.color "#525259" }
|
|
|
|
style.line_number2 = { common.color "#83838f" }
|
|
|
|
style.line_highlight = { common.color "#343438" }
|
|
|
|
style.scrollbar = { common.color "#414146" }
|
|
|
|
style.scrollbar2 = { common.color "#4b4b52" }
|
2019-12-28 12:16:32 +01:00
|
|
|
|
|
|
|
style.syntax = {}
|
2020-05-09 12:10:19 +02:00
|
|
|
style.syntax["normal"] = { common.color "#e1e1e6" }
|
|
|
|
style.syntax["symbol"] = { common.color "#e1e1e6" }
|
|
|
|
style.syntax["comment"] = { common.color "#676b6f" }
|
2019-12-28 12:16:32 +01:00
|
|
|
style.syntax["keyword"] = { common.color "#E58AC9" }
|
|
|
|
style.syntax["keyword2"] = { common.color "#F77483" }
|
|
|
|
style.syntax["number"] = { common.color "#FFA94D" }
|
|
|
|
style.syntax["literal"] = { common.color "#FFA94D" }
|
2020-05-09 12:10:19 +02:00
|
|
|
style.syntax["string"] = { common.color "#f7c95c" }
|
2019-12-28 12:16:32 +01:00
|
|
|
style.syntax["operator"] = { common.color "#93DDFA" }
|
|
|
|
style.syntax["function"] = { common.color "#93DDFA" }
|
|
|
|
|
|
|
|
return style
|