bb.donnay-software.com

Donnay Software Web Forums
It is currently Sun Nov 17, 2019 5:30 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 30, 2019 3:47 am 
Offline
User avatar

Joined: Sat Feb 04, 2012 2:23 am
Posts: 1305
Location: Russia, Southern federal district, city of Krasnodar
Where to write Russian fonts, so that everything is correctly written under a foreign Windows?

Where to write Russian fonts, so that everything is correctly written under a foreign Windows? On a computer with Windows multi-language all is written normally, and on foreign gibberish

_________________
http://sj.kubsau.ru/editorialboard
http://sj.kubsau.ru/authors/521
http://translate.google.ru/translate?hl ... ubagro.ru/
http://lc.kubagro.ru/


Top
 Profile  
 
PostPosted: Thu Oct 31, 2019 12:50 am 
Offline
User avatar

Joined: Sat Feb 04, 2012 2:23 am
Posts: 1305
Location: Russia, Southern federal district, city of Krasnodar
Is it possible to hard-code used fonts into an exe module or something like that. For example, in the library

_________________
http://sj.kubsau.ru/editorialboard
http://sj.kubsau.ru/authors/521
http://translate.google.ru/translate?hl ... ubagro.ru/
http://lc.kubagro.ru/


Top
 Profile  
 
PostPosted: Thu Oct 31, 2019 6:07 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4002
Location: Boise, Idaho USA
Yes. There are software programs that let you create your own .FNT files with custom fonts.

Bobby Drakos uses custom fonts in his application.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Thu Oct 31, 2019 6:11 am 
Offline
User avatar

Joined: Sat Feb 04, 2012 2:23 am
Posts: 1305
Location: Russia, Southern federal district, city of Krasnodar
Hi, Roger. Always a pleasure to chat with you!
I need to use standard fonts, but in a way that doesn't depend on the ones installed in Windows

_________________
http://sj.kubsau.ru/editorialboard
http://sj.kubsau.ru/authors/521
http://translate.google.ru/translate?hl ... ubagro.ru/
http://lc.kubagro.ru/


Top
 Profile  
 
PostPosted: Mon Nov 04, 2019 9:44 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 818
Location: Sijsele, Belgium
Hi,

You can put all the needed fonts is a subfolder of your application. Then load them when you start.

Code:
function installfonts()
*************************
Local aList := directory(".\fonts\*.ttf")
Local i , cFont , cPath:="path of your application"
for i := 1 to len(aList)
   cFont := cPath+'\fonts\'+aList[i][F_NAME]
   DllCall("GDI32.DLL", DLL_STDCALL, "AddFontResourceA", cFont )
next
return nil


It is also a good idea to remove them when you close your application.

Code:
function removefonts()
***********************
Local aList := directory(".\fonts\*.ttf")
Local i , cFont , cPath:=amain(5,2) , nGo , nteller := 1
for i := 1 to len(aList)
   cFont := cPath+'\fonts\'+aList[i][F_NAME]
   nTeller := 1
   nGo := 999
   do while nGo > 0 .and. nTeller < 20   // try up to 20 times to remove is the result 'ngo' is bigger than nul.
      nGo := DllCall("GDI32.DLL", DLL_STDCALL, "RemoveFontResourceA", cFont )
      nTeller ++
   enddo
next
return nil


The nGo and Counter system is because you can't remove if the font is still in use. For example, if you application was started twice, and you want to close one session. With the counter (nTeller) it is tried up to 20 times.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
PostPosted: Wed Nov 06, 2019 10:21 am 
Offline
User avatar

Joined: Sat Feb 04, 2012 2:23 am
Posts: 1305
Location: Russia, Southern federal district, city of Krasnodar
Hi, Chris! At the beginning of my program, I started the function of loading my own fonts. After the end of the program, I turned off my own fonts, as you advised. However, unfortunately, the program works exactly as before. That is, it displays all text elements of the interface and output forms with the wrong additional page. Maybe Windows itself can not display the Russian font?

_________________
http://sj.kubsau.ru/editorialboard
http://sj.kubsau.ru/authors/521
http://translate.google.ru/translate?hl ... ubagro.ru/
http://lc.kubagro.ru/


Top
 Profile  
 
PostPosted: Thu Nov 07, 2019 6:27 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 818
Location: Sijsele, Belgium
Hi,

I have no experience with Russian fonts. I expected that only someone with a 'Russian' Windows would also like to use Russian fonts?

If you double click on a font, it is opened with the sample so you can install it. If it is not well displayed in that screen, it won't be correctly displayed in your software.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group