Skip to content

Conversation

@nbuwe
Copy link
Contributor

@nbuwe nbuwe commented Jan 19, 2026

Move libXft glue to a separate module.

This brings the xlib glue back to the state it was in before the merge of 'doublec/linux_fonts' (modulo cleaning up a duplicate #include), with all the new xft code in its own files and included in all the right places.

I haven't yet figured out the subparts part of it so xft_wrappers.self is not loaded.

By default Xft is not enabled for now, you need to -DSELF_XFT=ON when configuring the build dir.

Review and feedback are appreciated.

doublec and others added 5 commits September 30, 2013 15:36
This is a work on progres to get better font support on linux.
This commit adds the primitives to access Xft but does not hook
into Self's font display mechanisms yet. It has only been
tested on Linux and isn't ready for widespread use.
This brings the xlib glue back to the state it was in before the merge
of 'doublec/linux_fonts' (modulo cleaning up a duplicate #include),
with all the new xft code in its own files and included in all the
right places.
@nbuwe
Copy link
Contributor Author

nbuwe commented Jan 19, 2026

A bit unrelated, but for the record - on a typical x86_64 linux machine with 32-bit support installed you should be able to configure the build dir with something like:

(export CC='cc -m32 -no-pie -fno-pie'; \
 export CXX='c++ -m32 -no-pie -fno-pie'; \
 export PKG_CONFIG_PATH='/usr/lib/i386-linux-gnu/pkgconfig:/usr/share/pkgconfig'; \
 export PKG_CONFIG_LIBDIR='/usr/lib/i386-linux-gnu'; \
 export PKG_CONFIG_SYSROOT_DIR='/'; \
 time cmake -B build-debug-xft -DSELF_XFT=ON -DCMAKE_BUILD_TYPE=Debug .)

and get all the magic flags right automatically.

@nbuwe
Copy link
Contributor Author

nbuwe commented Jan 19, 2026

As an aside, stuff like

set(SELF_X11_INIT ON)

in platform files doesn't seem to work, b/c platform files are included too late, I think. But that was not the red herring I was looking for, so I didn't try to address it in any way.

@russellallen
Copy link
Owner

common.cmake is setting SELF_X11_INIT - I'm not sure why the platform files also have it, they are included too late. I should remove that line from each platform file to reduce confusion.

@nbuwe
Copy link
Contributor Author

nbuwe commented Jan 20, 2026

I would imagine the intention might be to let platforms change the default. So, say, weirdix.cmake could set(SELF_X11_INIT OFF). I'm not sure if that level of super-flexibility is actually needed or wanted.

(OTOH, adding -m32 and warning to set pkg-config path variables might be a good and useful thing to do on 64-bit hosts I think).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants