Mercurial Hosting > editor
changeset 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 | |
files | scripts/windows/launcher.vbs src/luan_editor/Window.luan |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
diff -r 7f5b3824f4d4 -r 1beb4c57c269 scripts/windows/launcher.vbs --- a/scripts/windows/launcher.vbs Wed Jun 18 18:57:34 2025 -0600 +++ b/scripts/windows/launcher.vbs Wed Jun 18 20:20:21 2025 -0600 @@ -36,7 +36,7 @@ classpath = """" & scriptDir & "\jars\*.jar""" ' include all .jar files dictionaries = """" & scriptDir & "\dictionaries\\""" cmd = "cmd /c """"" & jdkHome & "\bin\java.exe"" -Dconfig=" & configFile & " -Ddictionaries=" & dictionaries & " -cp """ & scriptDir & "\jars\*"" luan.Luan classpath:luan_editor/editor.luan > """ & logFile & """ 2>&1""" -Set f = fso.OpenTextFile(logDir & "\debug_command.txt", 2, True) -f.WriteLine cmd -f.Close +' Set f = fso.OpenTextFile(logDir & "\debug_command.txt", 2, True) +' f.WriteLine cmd +' f.Close shell.Run cmd, 0, False
diff -r 7f5b3824f4d4 -r 1beb4c57c269 src/luan_editor/Window.luan --- 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"