VL.RichtextKit

image

a small wip, that demoes some richtext thingys and also comes with a hyphenator.
based on a fork of TopTen.RichTextKit and NHunspell

Make sure to have the original nuget of TopTen.RichTextKit not installed.

let’s have a chat about these things in general and this implementation in particular!

VL.RichTextKit.7z (415.4 KB)

7 Likes

Hey, looks really cool in your demo. I have some problems getting this to work. There is one missing nuget that cant load and a bunch of nodes that try to reference VL.Richstring.vl, MeasureParagraphs for example. tried in gamma 3.2 and latest preview.


image

No idea what’s exactly wrong there. Maybe try opening the VL.richtextkit.vl and see if that one has red nodes and fix those (by installing dependencies)

Hey, so the VL.RichString.vl file is not included in the zip, theres only a helpfile called TEST-RichString.vl. When i open the helpfile it opens new skia windows every frame. The missing nugets ive been able to install.

ah, i just discovered, that also on my pc it only opens with 2021.4 previews. can you confirm that?

VL.RichString.vl isn’t a thing. where did you read it? the lib is in VL.RichTextKit.vl. if there are no red nodes, it should work

this is where it expects the missing VL.RichString.vl

grafik

dlls.zip (885.2 KB)
can you try to add those dlls into the folder and replace the existing ones?

somehow the dlls in the zip werent the latest ones i guess. and also, the harfbuzzsharp can be placed next to those, so you don’t need to add the nuget (in case that also failed)

Hi, @sebl,
I just gave it a try with dlls.Everything looks okay except the hyphentor for me too. I had to install the nuget to get rid of the red nodes:

yes, i didn’t assume the hnhunspell nuget installs automatically, since all of this isn’t a nuget where dependencies get installed automatically.

glad it works now and please share your opinions

also note that this is 2 projects badly packed into one. the hyphenator has nothing to do with the richtext. i just needed both of them for a project so they are bundled fere and for now.

First impression: great! (But how do I - oh! But what about - Oh!)

Setting fonts is maybe a bit of an issue, though. In the example The fonts needed to be known by name to be called and from the system-installed fonts(I assume). If I compile an application and want to include a font in a folder I can use ‘Skia.Text.TypefaceFromFile()’.

So there’s that, but in general this is a very useful tool for setting text. I’ll have to play with it more to find some holes…

Maybe vertical alignment. Your example concentrates on DIP screen spaces from the top left. If a maximum height has been set perhaps text can appear in the middle of that space

revoking this old thread…

There’s a repo containing everything for current VVVV gamma 5.3:

and a small teaser
RTK

11 Likes

some quirks here and there (i probably won’t ever fix) but all in all it’s fun and quite workey:
RTK3

maybe some testers can give it a testrun before spamming nuget.org?

5 Likes

works for me with preview 0377, but did no fancy stuff