gcompris / GCompris-qt

GCompris in Qt Quick - Mirror of https://invent.kde.org/education/gcompris
218 stars 167 forks source link

(Windows 7, 64bit) Font error, most of the material are unreadable #270

Closed marcogaio closed 2 years ago

marcogaio commented 3 years ago

Just installed version 1.1 64bit on Windows7 64bit PC.

But most of the activities are unusable, and are unusable the configuration page too, because seems that GCmopris choose the wrong font. Screenshot attached. Schermata da 2021-08-24 13-23-01

Tried normal and 'Safe' mode, same behaviour.

Thanks.

petitlapin commented 3 years ago

Hi,

can you please check in %LocalAppData%\gcompris\GCompris.conf (you can type this directly in the file explorer) the value of "font" under [%General] section please? If it it not "Andika-R.otf", can you please set it to this: font=Andika-R.otf and run again GCompris (you need to update the file whiile GCompris is not running).

By default, we use a font that we ship so it should be available on all systems.

If it does not work, can you go in the GCompris configuration (once GCompris is started, the blue tool on the bottom). There is one button that corresponds to the font selection: https://lafibre.info/testdebit/linux/202005_gcompris_20.png ("Choisir la police" in the image). Can you check if changing it here is better?

marcogaio commented 3 years ago

can you please check in %LocalAppData%\gcompris\GCompris.conf (you can type this directly in the file explorer) the value of "font" under [%General] section please? If it it not "Andika-R.otf", can you please set it to this: font=Andika-R.otf and run again GCompris (you need to update the file whiile GCompris is not running).

I confirm, in configuration file font is font=Andika-R.otf.

By default, we use a font that we ship so it should be available on all systems.

I've looked on disk, bu there's no Andika-R.otf font file anywhere... I've tried to set a different font (eg, Arial.ttf or another .otf font in disk) but nothing changed.

If it does not work, can you go in the GCompris configuration (once GCompris is started, the blue tool on the bottom). There is one button that corresponds to the font selection: https://lafibre.info/testdebit/linux/202005_gcompris_20.png ("Choisir la police" in the image). Can you check if changing it here is better?

This is the configuration screen i see... Schermata da 2021-08-25 12-34-54 Schermata da 2021-08-25 12-34-49

marcogaio commented 3 years ago

I've also tried 32bit version (on the same Win7 64bit machine), and also i've tried to enable Add gcompris-qt to the system PATH for al users install option; same behaviour.

Animtim commented 3 years ago

This is very weird, first time someone reports this.

Can you try, in the Font selection panel ("Selezione dei caratteri" in your screenshot), to select any different font, and then close the configuration page either with Enter key or pressing the green button at the top to validate your changes. Maybe try a few different ones to be sure.

marcogaio commented 3 years ago

It works! Schermata da 2021-08-25 14-19-36

Not all fonts seems to work (eg, some other fonts behave like Andika-R) but most do.

In config file i got:

font=Arial
isCurrentFontEmbedded=false

where the original/startup file had:

font=Andika-R.otf
isCurrentFontEmbedded=true
Animtim commented 3 years ago

Thanks for testing, good that it works with other fonts.

A wild guess is that it could be an issue with OTF fonts support on your system, either system-wide or specifically in GCompris.

As we didn't have other people reporting such issue (and I'm sure we have many other users using windows7), I would classify this as a local bug, unless more people report the same in the future.

marcogaio commented 3 years ago

Three question/point:

  1. this is a pretty standard Win7 Pro 64bit box, and i use some other OTF files. Could be a local bug, surely, but it is really strange...
  2. font could be incompatible, but surely it is not present on disk... i don't know how on this box the installer does not install that font, but surely does not...
  3. AFAI've understood, if gcompris does not find the font, it takes the first font in list, in this box Abaco, that is effectively a symbol font. I think could be smarter...

I've tried to look for the installer log, to found if there's some error (not copy font because...) but i've not found it...

Thanks.

marcogaio commented 3 years ago

I've just tried with a Win10 (20H2) 64bit box. Works as expected.

So seems at least a Win7 trouble here...

Animtim commented 3 years ago

Thanks for the investigation details.

The font is not copied as-is but, as for all the resources, is included inside an .rcc file, so it's normal that you can't find the file.

But I'm sure that at least it used to work on windows 7... I don't have anymore a windows7 system here to reproduce, maybe @petitlapin has one.

marcogaio commented 3 years ago

Thanks for the investigation details.

Thanks to you!

The font is not copied as-is but, as for all the resources, is included inside an .rcc file, so it's normal that you can't find the file.

Ah! This explain also isCurrentFontEmbedded=true... ;-)

But I'm sure that at least it used to work on windows 7... I don't have anymore a windows7 system here to reproduce, maybe @petitlapin has one.

OK, i'll wait for feedback... indeed, because Win7 is currently EOL, i think that a safe options would be also simply deprecate Win7 support...

petitlapin commented 3 years ago

I've just tested in a clean VM Win7 32bits and it displays fine. (I can only test "Safe mode" because no openGL but as you said it does not impact...).

I'm not sure if we want to dig more, but if we want, the next step would be to compile again GCompris in Console mode and check if there are output logs that could help.

marcogaio commented 3 years ago

I've just tested in a clean VM Win7 32bits and it displays fine. (I can only test "Safe mode" because no openGL but as you said it does not impact...).

In Font Selection screen, what is the first font listed? Could be that the error is the same, but your first font is not a symbol one?

I'm not sure if we want to dig more, but if we want, the next step would be to compile again GCompris in Console mode and check if there are output logs that could help.

If you can provide a binary, i can do some tests...

petitlapin commented 3 years ago

Font selector: font-selector with Andika: andika with Aharoni (first font): aharoni

If you can provide a binary, i can do some tests... Unfortunately, on my side, I can't build a Windows binary, @Animtim is it something you want to investigate more? Removing the WIN32 in https://invent.kde.org/education/gcompris/-/blob/master/src/core/CMakeLists.txt#L94 should do the job to have a CONSOLE executable (and thus logs).

marcogaio commented 3 years ago

Font selector:

OK, but if you remove %LocalAppData%\gcompris\GCompris.conf and rerun gcompris, what font get selected? Andika (embedded one) or Aharoni (the first non-embedded font, that in this case is a normal, non-symbol font)?

Unfortunately, on my side, I can't build a Windows binary, @Animtim is it something you want to investigate more? Removing the WIN32 in https://invent.kde.org/education/gcompris/-/blob/master/src/core/CMakeLists.txt#L94 should do the job to have a CONSOLE executable (and thus logs).

If you can provide a binary, say me Thanks.

Animtim commented 3 years ago

Here is a debug build. It's maybe not perfect as I tested it once and it got stuck when closing the application (I had to force-quit it), but at least it starts in a console with the logs, so it should be enough to see if there's any relevant error in the log. https://gcompris.net/download/qt/windows/debug/gcompris-qt-1.1-win64-gcc-debug.exe

marcogaio commented 3 years ago

Done, screenshot with error attached. Schermata da 2021-08-30 13-25-43

petitlapin commented 3 years ago

OK, but if you remove %LocalAppData%\gcompris\GCompris.conf and rerun gcompris, what font get selected? Andika (embedded one) or Aharoni (the first non-embedded font, that in this case is a normal, non-symbol font)?

Andika.

Looking at the log you provided, it does not manage to load the Andika font. Can you try OpenDyslexic on your system? Both otf and ttf? If both fail, it may be an issue with embedded fonts. If only otf fails, it may be an issue with otf on your system. If both works, I don't know :)

Also, can you install Andika on your system (from https://software.sil.org/andika/download/) and select this one too to double check if it comes from the font or the embed part?

marcogaio commented 3 years ago

Looking at the log you provided, it does not manage to load the Andika font. Can you try OpenDyslexic on your system? Both otf and ttf? If both fail, it may be an issue with embedded fonts. If only otf fails, it may be an issue with otf on your system. If both works, I don't know :)

Only OpenDyslexic TTF seems to work... screen attached. Schermata da 2021-09-02 13-15-16

Also, can you install Andika on your system (from https://software.sil.org/andika/download/) and select this one too to double check if it comes from the font or the embed part?

Installed, i can see it on font control panel but not show up in GCompris font list...

Mah...

petitlapin commented 2 years ago

We don't do anything special to get the system fonts (except excluding symbol fonts). We ship both openDyslexicFonts so except the fact that one is ttf and the other is otf, I don't think we changed anything on them.

marcogaio commented 2 years ago

Boh. It is really strange. Sorry but i don't know.

But on next year i've to complete the migration to Win10, so... i'll solve the problem anyway.

Thanks to all.

petitlapin commented 2 years ago

Let's close this issue as there is a solution. Feel free to reopen if needed