PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Fonts not appearing on other PCs
Fonts not appearing on other PCs
Iniciado por Paul Turner, 06,feb. 2015 09:19 - 8 respuestas
Publicado el 06,febrero 2015 - 09:19
Hi

A strange problem has started with a piece of software I'm developing. It uses standard Windows fonts, which show on the development PC, but for some reason on any other PC the fonts are not shown correctly (For example Old English Script just shows as standard characters). This even applies to static text controls which are given a different font. However this all used to work fine. I obviously changed something inadvertently, but have no idea what.

Anyone have any ideas?

Rgds
Paul
Publicado el 06,febrero 2015 - 10:54
Ok now I'm really confused. I installed Windev on another PC, and made a single window project where the window had a static control in Vivaldi font. The corresponding EXE running on another PC has the static appearing in standard characters (arial or something similar).

Anyone have any ideas - please!!

Rgds
Paul
Publicado el 06,febrero 2015 - 12:02
Turns out the fonts were somehow removed.

Should have checked first - oh well it is friday!!
Publicado el 06,febrero 2015 - 13:07
Hi Paul,

if your application uses special fonts which are not installed as a standard by Windows (Arial, Times, Consolas etc) then you have to supply these foints in the install package and install these fonts during the install process of the application. I'm using Innosetup for making the installation package, it has a command to install font/s too. We still miss a custom font installation from the WinDev installer. Quite some time ago, I spent some hours to get a font install from the WinDev installer, no joy. It is possible to copy the fonts into the Windows\onts directory, but the fonts will work after the first restart of the computer only. There are API-calls for font installation too, but as I remember, I had difficulties to get over the rights-issue with them.
Publicado el 06,febrero 2015 - 13:57
Thanks for the tip Guenter. I'll check it out.

Rgds
Paul
Publicado el 09,febrero 2015 - 18:01
Hi Guenter,

We use another very simple approach to this problem. We simply package the required fonts in a /Fonts subfolder in our application installation directory. (i.e. the Fonts folder is relative to the EXE location as ./Fonts).

Then we call Windows API at program start to temporarily declare the fonts to the OS by using AddFontResourceA and call RemoveFontResourceA when we close the application. What is nice is that it works in all cases with no administrative accounts required. Also, the fonts can be updated anytime or changed.

API("Gdi32.dll","AddFontResourceA or RemoveFontResourceA","Full path to the font file.")

Best regards,
Alexandre Leclerc
Publicado el 09,febrero 2015 - 19:13
Hi Alexandre, thank you!
Publicado el 10,febrero 2015 - 00:54
Thanks Alexandre, great tip!
Miembro registrado
32 mensajes
Publicado el 07,febrero 2024 - 23:05
Hi Alexandre, solution parfaite. merci.

--
-----------------------------
Cordialement
yves