reveal 2021-03-22

@skuro has joined the channel

just started reveal/ui but on my system font size seems a bit on the teeny weenie side

how do I increse the font size in the reveal window?

https://vlaaad.github.io/reveal/ and look for "Look and feel customization". The headings dont have anchors so i can't directly link to it

You can pass this in as a java property, i.e., -J-Dvlaaad.reveal.prefs='{:font-family "JetBrains Mono Medium" :font-size 14}'

alright so I can't pass it in from a running jvm

no, you can πŸ™‚

Just showing another way of doing it

(so you don't have to remind yourself each time πŸ™‚ )

I have that as part of my clj alias.

Actually, you can’t pass it in from a running JVM, it has to be a system property

the reason for this is lazyness β€” too much stuff I needed to change to make fonts and stuff dynamic

I'm trying some hacks here and there, such as

(System/setProperty "vlaaad.reveal.prefs" (pr-str {:font-family "Roboto" :font-size 22}))
;; recompile the vlaaad.reveal.prefs ns
@prefs
=> {:font-family [:system-font "Roboto"], :font-size 22}

but font doesn't change

there are actually varying stages of customisation dynamicity, I could have done it customisable live when window is already open, or (easier) customisable when window is created, but I thought that’s not as important since customisation is usually much rarer than actual use for output, so I should focus on that

@skuro prefs is a delay, you can mess with the system property before requiring reveal namespaces, but once they are required, reveal will read the property once and then persist the prefs

yeah I just in-ns into the prefs ns and re-eval the prefs definition, so the delay got reset

other stuff that refers to prefs is also wrapped in delays

so.. it’s easier to try out various reveal prefs using throw-away JVMs

e.g. clj -Sdeps '{:deps {vlaaad/reveal {:mvn/version "1.3.196"}}}' -J-Dvlaaad.reveal.prefs='{:font-size 20}' -X vlaaad.reveal/repl

yep definitely quicker πŸ™‚