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

No texts in TuxMath and TuxType Arch Linux #14

Open
pedroprieto opened this issue Feb 6, 2022 · 9 comments
Open

No texts in TuxMath and TuxType Arch Linux #14

pedroprieto opened this issue Feb 6, 2022 · 9 comments

Comments

@pedroprieto
Copy link

Hi,

TuxMath does not render texts in menus nor in game. It seems a problem with SDL.

I've submitted a fix to address it here:

I am no expert in SDL: the only thing I've done is return white_letters instead of bg in T4K_BlackOutline:

t4kcommon/src/t4k_sdl.c

Lines 1444 to 1454 in f36ec17

SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
SDL_FreeSurface(white_letters);
/* --- Convert to the screen format for quicker blits --- */
SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
out = SDL_DisplayFormatAlpha(bg);
SDL_FreeSurface(bg);
DEBUGMSG(debug_sdl, "\nLeaving T4K_BlackOutline(): \n");
return out;

Best!!

@andy5995
Copy link

andy5995 commented Feb 6, 2022

I think I have the same problem with tuxtype (I haven't tried tuxmath) on Manjaro, using v1.8.3 installed from the AUR

Screenshot_2022-02-06_14-36-46

@pedroprieto
Copy link
Author

Hi, @andy5995 ,

You can try building the page from https://github.com/pedroprieto/archlinux.t4kcommon.

Just clone the repo, build it as if it were from the AUR (makepkg), install the package and see if it works.

Best!!

@andy5995
Copy link

andy5995 commented Feb 8, 2022

Thanks @pedroprieto .

The AUR package was updated earlier today by frealgagu with a missing_texts patch

diff --git a/src/t4k_sdl.c b/src/t4k_sdl.c
index bba1a53..99653f9 100644
--- a/src/t4k_sdl.c
+++ b/src/t4k_sdl.c
@@ -1441,17 +1441,18 @@ SDL_Surface* T4K_BlackOutline(const char* t, int size, SDL_Color* c)
 
   dstrect.x = 1;
   dstrect.y = 1;
-  SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
-  SDL_FreeSurface(white_letters);
+  /*SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
+  SDL_FreeSurface(white_letters);*/
 
   /* --- Convert to the screen format for quicker blits --- */
-  SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
-  out = SDL_DisplayFormatAlpha(bg);
+  /*SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
+  out = SDL_DisplayFormatAlpha(bg);*/
   SDL_FreeSurface(bg);
 
   DEBUGMSG(debug_sdl, "\nLeaving T4K_BlackOutline(): \n");
 
-  return out;
+  /*return out;*/
+  return white_letters;
 }

@andy5995
Copy link

andy5995 commented Feb 8, 2022

Thanks @pedroprieto .

The AUR package was updated earlier today by frealgagu with a missing_texts patch

Oh, that patch was originally submitted by @pedroprieto ! My mistake (I found after reviewing the OP)

@pedroprieto
Copy link
Author

No problem! @frealgagu was really quick accepting the PR and updating the AUR.

Glad to help!!

@andy5995
Copy link

andy5995 commented Feb 9, 2022

I reinstalled t4kcommon and tuxtype from the AUR, but that didn't change anything for me. Still no text even with the patch applied.

@pedroprieto
Copy link
Author

Ok, same problem, but in different repo. The problem is in tuxtype, not in t4kcommon:
https://github.com/tux4kids/tuxtype/blob/86bfd1ea0e4adb68d4492862bfd796f5361fbbd3/src/SDL_extras.c#L1352-L1360

I have created the same patch for tuxtype. You can check it here:
https://github.com/pedroprieto/archlinux.tuxtype

Clone the repo and compile and install it from there. See if it works. I'll contact AUR tuxtype maintainer to fix it up.

Best!

@pedroprieto
Copy link
Author

I leave the issue open so that @tux4kids can fix it.

Summing up, there are 2 repos affected.

  • t4kcommon
  • tuxtype

Best!

@pedroprieto pedroprieto reopened this Feb 10, 2022
@pedroprieto pedroprieto changed the title No texts in TuxMath Arch Linux No texts in TuxMath and TuxType Arch Linux Feb 10, 2022
@andy5995
Copy link

Ok, same problem, but in different repo. The problem is in tuxtype, not in t4kcommon: https://github.com/tux4kids/tuxtype/blob/86bfd1ea0e4adb68d4492862bfd796f5361fbbd3/src/SDL_extras.c#L1352-L1360

I have created the same patch for tuxtype. You can check it here: https://github.com/pedroprieto/archlinux.tuxtype

Clone the repo and compile and install it from there. See if it works. I'll contact AUR tuxtype maintainer to fix it up.

Best!

@pedroprieto I built the tuxtype package using the PKGBUILD from your repo and it's working now. Thanks again.

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

2 participants