PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Fonts not appearing on other PCs
Fonts not appearing on other PCs
Started by Paul Turner, Feb., 06 2015 9:19 AM - 8 replies
Posted on February, 06 2015 - 9:19 AM
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
Posted on February, 06 2015 - 10:54 AM
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
Posted on February, 06 2015 - 12:02 PM
Turns out the fonts were somehow removed.

Should have checked first - oh well it is friday!!
Posted on February, 06 2015 - 1:07 PM
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.
Posted on February, 06 2015 - 1:57 PM
Thanks for the tip Guenter. I'll check it out.

Rgds
Paul
Posted on February, 09 2015 - 6:01 PM
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
Posted on February, 09 2015 - 7:13 PM
Hi Alexandre, thank you!
Posted on February, 10 2015 - 12:54 AM
Thanks Alexandre, great tip!
Registered member
32 messages
Posted on February, 07 2024 - 11:05 PM
Hi Alexandre, solution parfaite. merci.

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