This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-04
Channels
- # announcements (7)
- # aws (5)
- # babashka (72)
- # beginners (43)
- # calva (12)
- # cider (9)
- # clara (3)
- # clj-kondo (12)
- # cljdoc (32)
- # cljs-dev (10)
- # cljsrn (1)
- # clojure (78)
- # clojure-dev (50)
- # clojure-europe (17)
- # clojure-gamedev (8)
- # clojure-nl (1)
- # clojure-spec (30)
- # clojure-uk (3)
- # clojurescript (52)
- # core-async (1)
- # cursive (5)
- # datomic (8)
- # emacs (58)
- # events (2)
- # fulcro (5)
- # graalvm (7)
- # holy-lambda (37)
- # honeysql (9)
- # jobs (5)
- # leiningen (3)
- # lsp (7)
- # lumo (2)
- # malli (3)
- # meander (13)
- # membrane-term (64)
- # missionary (19)
- # music (3)
- # nextjournal (8)
- # off-topic (29)
- # pathom (16)
- # polylith (14)
- # portal (16)
- # re-frame (2)
- # reagent (5)
- # sci (14)
- # shadow-cljs (20)
- # spacemacs (6)
- # sql (1)
- # tools-deps (58)
- # vim (14)
I’m still doing a bit of playing with nerd font glyphs. Lots of “huh?” and “but…” and “why?…” and “oh…” and “ugh…” etc. Stumbled on a pretty cool Glyph Inspector: https://opentype.js.org/glyph-inspector.html if you are into that kind of thing.
yea, I've seen that one
I actually use it for membrane's web graphics backend, https://github.com/phronmophobic/membrane/blob/master/src/deps.cljs#L1
My current understanding is that glyphs can exceed lineheight (and advance width) and terminals take various approaches to deal with this.
it's pretty strange to me that most UI frameworks don't expose font information anywhere even though it's required for rendering
or if they do, they only expose a subset
I would say anytime you care about layout and text
there are lots of "inner platform" work arounds
I hadn't though about large glyphs in term.
I think some terminals try to scale down the large glyphs to line height and advance width.
Looking at nerd font glyphs used in fancy terminal prompts, I find it strange that they aren’t already scaled to appropriately.
I mean… they were created for terminal use I think… why not scale them to line height in the font itself?
(BTW, the above are from https://github.com/romkatv/powerlevel10k/blob/master/font.md)
there's a place to announce new channels, but I don't remember which channel that is
done! https://github.com/phronmophobic/membrane.term/commit/ca0e28fcc000f611a6a2a35d6341879d707212e4
@smith.adriane, do you have any dev setup docs if I want to do a little REPLing in membrane?
for membrane itself?
I don't, but I'm not actually sure what should be in there
what kind of docs do you think would be useful? a walk-through of my workflow?
Ya maybe a docs/dev.md
with enough info of how to get setup after cloning the git repo.
Like I see csource
do I need to compile that? How should I do that? I see java source, how do I compile that. etc.
right now, you just need lein javac
to compile the java file
if you're going to use membrane.skia
, you just need one of the skialib dependencies
that should be taken care for lein, but you'll need the :skialib
alias for clj
Nobody has really expressed interest in dev, but I can improve that documentation if you are. Are you interested in also hacking on the skialib part, membrane itself, or both?
there is a #membrane channel as well
Yeah, just exploring the workings and trying to see what font/text size info I can access. Also wanted to explore if I maybe found a bug.
I assume you're referring to the skialib backend, which would require recompiling skialib to test changes
the membrane.ui
namespace is the "what" and the various backends are the "how"
similar to clojure, each platform should "match" the others, but exact duplication is a non-goal
Maybe eventually. But right now I was wondering about the translation back from skia for font metrics. https://github.com/phronmophobic/membrane/blob/f99efeb2a09170c5abf7a7db1b7b1c4c803eb8a6/src/membrane/skia.clj#L688-L693?
In the skia source (which I don’t know how to link to yet) that flag is kBoundsInvalidFlag
it could be, yea
;; kBoundsInvalid_Flag = 1 << 4, //!< set if fTop, fBottom, fXMin, fXMax invalid
yep, that looks wrong
I’m not sure what I’d do with fTop fBottom fXMin fXMax, tho… was just curious what those values might be for nerd font I am testing against. I think we’d still just use line height like other terminals seem to be doing.
If I want to scale down glyphs, I’m also interested in learning their actual dimensions. I guess I could explore all of this kind of stuff directly in skia.
yea, another option is to try the bindings in skija
for skialib, I just try to create subset of necessary bindings
skija is a full java wrapper for skia, https://github.com/JetBrains/skija/
there is a skija backend. The main bummer is that it's not as repl friendly at the moment
I believe the glfw integration that skija works with crashes if you try to open multiple windows
I've been meaning to create my glfw bindings for use with skija to fix it
Oh on another note: looks like pty4j is now on maven central: https://mvnrepository.com/artifact/org.jetbrains.pty4j/pty4j
> Error building classpath. Could not find artifact org.jetbrains.pty4j:purejavacomm:jar:0.0.11.1 in central (https://repo1.maven.org/maven2/) Seems like it's still missing a dependency in maven
yea, it's always good to see things moving
I see in the github issue that it was closed and then reopened
maybe they noticed it
membrane should actually be multiple libraries, but it's pretty difficult to find functional libraries that implement the different pieces necessary to make a UI
I think https://github.com/phronmophobic/membrane/commit/c8862d3cbd3f4abc31911eb7820c325ce3b62e5b should fix the invalid flag issue. It will be available in the next release of membrane.