Skip to content

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.


#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)

@stefan11111
Copy link
Contributor Author

stefan11111 commented Dec 19, 2024

Implemented @rofl0r 's suggestion.
There are still a few ifdef's in various source files, but they are no longer just symbols missing in linXfont2 that are there under a different name.

Will open a new PR with everything squashed in one single commit.

@stefan11111
Copy link
Contributor Author

Opened the new PR here: #14

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