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
Where to write Russian fonts?
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Where to write Russian fonts?
Is it possible to hard-code used fonts into an exe module or something like that. For example, in the library
Re: Where to write Russian fonts?
Yes. There are software programs that let you create your own .FNT files with custom fonts.
Bobby Drakos uses custom fonts in his application.
Bobby Drakos uses custom fonts in his application.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Where to write Russian fonts?
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
I need to use standard fonts, but in a way that doesn't depend on the ones installed in Windows
Re: Where to write Russian fonts?
Hi,
You can put all the needed fonts is a subfolder of your application. Then load them when you start.
It is also a good idea to remove them when you close your application.
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.
You can put all the needed fonts is a subfolder of your application. Then load them when you start.
Code: Select all
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
Code: Select all
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
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Where to write Russian fonts?
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?
Re: Where to write Russian fonts?
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.
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.