Are text modifications like border or shadow possible?
It’s possible to add a shadow to all of the contents. I’d do so by creating a shader that blurs and tints a copy of the prompter’s viewport and displays it right behind the contents, all in one pass.
It should also be possible to apply shadows only to selected text, tho I don’t know yet how to achieve that. It would be considerably more complex than what I’ve just described because there exists no shadow-like properties in Qt’s TextEdit, meaning we’d need to extend this class, which may end up leading into a deep rabbit hole, depending on how those parts of Qt are structured internally.
The only thing holding me back from implementing global shadows today is that the way shaders are written in Qt changed vastly between versions 5 and 6 of the framework. QPrompt is still on Qt 5 because of compatibility with KDE Frameworks. Once on Qt 6 it should be possible to add features like these without incurring in duplicate efforts.
Global shadows would be very useful when using background opacity. Adding borders or shadows to the selected text would be solving the same problem as highlighting text does, but in a way that could be more pleasing to the eyes. I like the idea, but I’m not sure that it’s worth the effort…
Here’s the GitHub issue on adding blurred shadows to all of the contents.
Can Linux and your app handle fonts like these?
Yes. Tho it seems like the Opentype-SVG type isn’t fully supported. The inside of the font doesn’t get filled, but it can still be used; it just falls back to render as a more traditional Opentype.
All you must do is either copy the fonts to ~/.fonts or install them systemwide to a different location which I currently can’t remember. Double clicking on the font will usually give you install options.
On QPrompt, click on the letter A at the editor, then on “Choose System Font” to get a system dialog for font choosing. The dialog you get will depend on your OS. Not all configuration options on these dialogs are supported, but you should be able to use all of your fonts with QPrompt.
Is the SVG issue system-wide to the OS?
It’s a bit hard to tell because it depends on the toolkits and font rendering libraries used by Desktop Environments and individual apps. Since most Linux DE’s are written in either GTK or Qt, looking at how well apps written in these toolkits render would give us the best idea of how well it is supported. To which I would say “not very well” yet, apps written in different toolkits all render the same way or not at all… Curiously the one that failed to load is an app written in Qt (like QPrompt), so I don’t know why it didn’t load.
For reference, this the library used by Qt to draw fonts in one of the text renderers used in QPrompt. Any fonts supported by Freetype should be well supported by QPrompt.
Thank you. I will check it out.