Skip to content

Conversation

@jvyden
Copy link

@jvyden jvyden commented Sep 24, 2025

Changes

This PR is large in scope, however the amount of actual changes are quite small. If you would like me to create 3 separate PRs each basing off the last for review purposes, I can do so, but I think one PR should be more efficient in this case.

The GDI libraries and examples are untested as I can't compile them but for GDI/Harfbuzz it should be okay as FrooxEngine doesn't use them anyways.

Update to SDK/.NET 9

I've migrated the solution to use SDK-style projects, gutting out unnecessary flags and files to make them tiny. This is the bulk of the number of lines changed (mostly removals).

I've also made the decision to target .NET 9 since I'm working from a Linux host and I found it unnecessary to keep framework compatibility. This isn't complicated code, so I highly doubt there are any relevant breaking changes.

Add unit tests

I've added some simple unit tests, making sure that at minimum, the library is functional, as in it can load and render glyphs. These can be made more robust at a later date, but for simplicity I opted to not add too many just yet.

Rework library loading

I've added a static constructor to the internal FreeType API class to set up a new DLL import resolver. This allows us to load the correct library name on Linux. It will try to load the existing freetype6.so/dll first, then try to load libfreetype.so.6.

This makes it so the system library is a fallback; it will try to load freetype6.so first, then try the system library. This makes it so if the user was already able to load freetype6, there are no changes. If not, they will use the system version which closes #1.

There's also a path for Mac but I don't have natives for Mac.

Tested Platforms

  • Arch Linux
  • Fedora 42
  • Ubuntu (via CI)
  • Windows 11
  • Windows Server 2025 (via CI)

@ProbablePrime
Copy link
Member

I'd appreciate a second review from YDMS so picked @jae1911.

Copy link
Member

@jae1911 jae1911 left a comment

Choose a reason for hiding this comment

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

Reviewing the changes and the pipelines in your fork, I think that's good.

Thanks for the PR!

@ProbablePrime
Copy link
Member

Alright we're merging!

There may be a short delay before we're able to integrate this into Resonite actual, but the work is now 10x easier than before \o/

@ProbablePrime ProbablePrime merged commit dc7f717 into Yellow-Dog-Man:master Sep 24, 2025
3 checks passed
@ProbablePrime
Copy link
Member

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.

LibBz2 Issues on Red Hat Linux

3 participants