-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move renderer to WebKitGtk #66
Comments
I know WebKit is more powerful, but it's also more resource intensive. We are using gemini to stay away from the bloat brought up by the web. I feel WebKit goes against the gemini values. I won't use WebKit sorry. Thanks anyway for proposing an improvement. |
Yea, I agree. WebKit would be a overkill for a Gemini browser and a big bloat, because of many features which will never be used in any Gemini website. It can also get more memory intensive than Firefox when many tabs are opened simultaneously (~600MB with 7 tabs of Markdown document converted to HTML). However, I found an alternative which you might like. GemView is a Gemtext (and not only) GTK 4 renderer written in Rust. It's the same approach as a current Geopard renderer, because it uses an inherited Gtk.TextView widget to render Gemini, Gopher, Finger and Spartan pages. Here's a full feature list. |
That's great, thanks for linking it. I will look and learn from that project, but I'm not going to use it directly. I'm going forward on another path. I plan on replacing the TextView with a SourceView, like the one used inside the gnome builder IDE. SourceView extends the TextView by adding search/replace, highlighting, and other useful stuff. |
Description
The current solution of using TextView for rendering Gemini documents is quite ingenious I must say, but it also limits things that can be done in Geopard. For example images can't be rendered in normal TextView and long text in preformatted mode makes whole webview horizontally longer (which could be resolved in WebKit by adding a frame to preformatted text with horizontal scrollbar).
WebKitGtk has a broad range of functions and classes which allow for complete customization to make it as integrated in Gtk apps as possible. WebKit has built-in TLS certificates support (access to website's TLS information available in this function) which would resolve issue #19. It has find controller for implementing text search in WebView (possibly resolves #42). There is also an extensive Settings class which allows to modify or disable almost every feature of WebKit.
For possible implementation, Dev Toolbox and Apostrophe uses WebViewGtk for rendering Markdown preview. For Dev Toolbox implementation, you can look here, and here on how it converts Markdown to HTML. For Apostrophe, you can look here and here.
The text was updated successfully, but these errors were encountered: