Skip to content
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

add libXfont2 support with a compile-time switch #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefan11111
Copy link
Contributor

Same as #12, but with a compile time switch between libXfont1 and libXfont2.

Defaults to libXfont1

@stefan11111 stefan11111 mentioned this pull request Nov 14, 2024
@stefan11111
Copy link
Contributor Author

while doing this, I also found that there is a function 'miImageGlyphBlt' in mi/miglblt.c, which is declared static(_X_EXPORT), only referenced in mi/mi.h, and never called anywhere.

@@ -179,7 +179,11 @@ XFree86BigfontExtensionInit()
+ (unsigned int) (65536.0 / (RAND_MAX + 1.0) * rand());
/* fprintf(stderr, "signature = 0x%08X\n", signature); */

#ifdef XFONT2
FontShmdescIndex = xfont2_allocate_font_private_index();
#else
Copy link

@rofl0r rofl0r Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since all xfont2 specific functions seem to behave identically, except for the name, i'd add a xfont2_compat.h which looks like

#ifdef XFONT2
#define AllocateFontPrivateIndex xfont2_allocate_font_private_index
...
#endif

that way the ifdefs are in a single place and not littered all over the code.
(one could also use function-like macros)

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.

2 participants