Rewrite WINGs wfont.c in Rust #9
Reference in New Issue
Block a user
Delete Branch "trurl/wmaker:refactor/wings-rs-font"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a step towards getting rid of all uses of WMHashTable and, more importantly, a first crack at rewriting WINGs itself.
y(ascent) fields of W_Font behind accessors. 8457fd61f0@@ -0,0 +41,4 @@NonNull::new(unsafe {x11::xft::XftXlfdParse(name.as_ptr(),/*ignore_scalable=*/ 0,Instead of the comments, why not give these proper names via
letbindings?I like the Google C++ style guide's prescription on this, but we don't have a lint, so... sure.
This is certainly an improvement! I'm a bit surprised there aren't crates providing better bindings to both Xft and pango, but that's a separate matter.
There are crates that provide pango bindings, but there's some weird provenance (https://github.com/yeslogic/fontconfig-rs/issues/52), and nothing seems like a drop-dead obvious thing to drop into the existing WINGs API.
Switching to a dedicated Xft/Pango crate, or something else entirely for managing fonts and drawing to the screen (to provide independence from X11), is definitely in the cards.