Skip to content

add libXfont2 support with a compile-time switch - #13

Closed
stefan11111 wants to merge 6 commits into
tinycorelinux:masterfrom
stefan11111:optional-libXfont2
Closed

add libXfont2 support with a compile-time switch#13
stefan11111 wants to merge 6 commits into
tinycorelinux:masterfrom
stefan11111:optional-libXfont2

Conversation

@stefan11111

Copy link
Copy Markdown
Contributor

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

Defaults to libXfont1

@stefan11111stefan11111 mentioned this pull request Nov 14, 2024
@stefan11111

Copy link
Copy Markdown
ContributorAuthor

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.

Comment threadXext/xf86bigfont.c Outdated

#ifdef XFONT2
FontShmdescIndex = xfont2_allocate_font_private_index();
#else

@rofl0rrofl0rNov 15, 2024

Copy link
Copy Markdown

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

#ifdefXFONT2#defineAllocateFontPrivateIndex 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

stefan11111 commented Dec 19, 2024

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Opened the new PR here: #14

Sign up for freeto 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

@stefan11111@rofl0r