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

Corrupt text rendering #140

Open
Zac610 opened this issue Nov 24, 2023 · 3 comments
Open

Corrupt text rendering #140

Zac610 opened this issue Nov 24, 2023 · 3 comments

Comments

@Zac610
Copy link

Zac610 commented Nov 24, 2023

I have installed a new version of my favorite linux distro; now my working simple2d project does not work anymore, as text is not rendered correctly. Here is a simple code:

#include <simple2d.h>

S2D_Text *txt;

void render() {
  S2D_DrawTriangle(
    320,  50, 1, 0, 0, 1,
    540, 430, 0, 1, 0, 1,
    100, 430, 0, 0, 1, 1
  );
	S2D_DrawText(txt);
}

int main() {

  S2D_Window *window = S2D_CreateWindow(
    "Hello Triangle", 640, 480, NULL, render, 0
  );
	
	txt = S2D_CreateText("Menu.ttf", "A", 20);

	txt->x = 100;
	txt->y = 100;
	
  S2D_Show(window);
  return 0;
}

The result is as follows:
Schermata del 2023-11-24 18-49-29

The distro is Linux Mint 21.2

How can I find where is the problem?

@smlavine
Copy link

I can corroborate this on Arch. This is what the testcard looks like:

screenshot2023-12-12 603874141

I am on SDL version 2.28.5, which looks like it released on November 2nd. What version are you on, @Zac610 ? Does downgrading change things?

@Zac610
Copy link
Author

Zac610 commented Dec 13, 2023

My version is quite old:
libsdl2 v. 2.0.20
libsdl2-ttf 2.0.18
before updating to Mint 21 I was on Mint 20, and it worked flawlessly. I don't know which version had there.

@5quinque
Copy link

5quinque commented Apr 7, 2024

If you're still looking for a solution, I have a PR here: #141

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

No branches or pull requests

3 participants