Mercurial Hosting > editor
diff src/luan_editor/Window.luan @ 76:1beb4c57c269 default tip
monospaced sans-serif
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 18 Jun 2025 20:20:21 -0600 |
parents | 7f5b3824f4d4 |
children |
line wrap: on
line diff
--- a/src/luan_editor/Window.luan Wed Jun 18 18:57:34 2025 -0600 +++ b/src/luan_editor/Window.luan Wed Jun 18 20:20:21 2025 -0600 @@ -37,6 +37,7 @@ local Clipboard = require "luan:swing/Clipboard.luan" local Swing_runner = require "luan:swing/Swing_runner.luan" local swing_run = Swing_runner.run or error() +local Font = require "luan:swing/Font.luan" local Java = require "classpath:luan_editor/Java.luan" local Logging = require "luan:logging/Logging.luan" local logger = Logging.logger "editor/Window" @@ -44,6 +45,13 @@ local Window = {} +local fonts = {} +for _, font in ipairs( Font.get_available_font_family_names() ) do + fonts[font] = font +end +local monospaced = fonts["Lucida Console"] or fonts["Monospaced"] or error() +-- logger.info(monospaced) + local n_windows = 0 local documents = {} @@ -146,7 +154,7 @@ whitespace_visible = config.whitespace_visible tab_size = config.tab_size --font = { family="Monospaced", size=13 } - font_changes = { family="Monospaced" } + font_changes = { family=monospaced } } window.text_area = text_area local title = file and file.canonical().to_string() or "new"