FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post Reply
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Horizon »

Hi Antonio,

Thanks for adding _DEFAULT_CHARSET_ in font.prg.

I think I missed something. This define does not work, if I don't add the font.prg in my application make.

I have added to the _DEFAULT_CHARSET_=1 in xHarbour Builder's define and builded but fonts does not worked.

If I added the FWH\classes\font.prg in my make file, It is OK.

Is it possible to use _DEFAULT_CHARSET_ without adding font.prg?
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Antonio Linares »

Hakan,

Instead of a #define, a SetGet function should be required:

Code: Select all

function SetCharSet( nNewCharSet )

   local nOldCharSet

   static nCharSet := _DEFAULT_CHARSET_
 
   nOldCharSet = nCharSet

   if nNewCharSet != nil
      nCharSet = nNewCharSet
   else
      nCharSet = nOldCharSet
   endif

return nOldCharSet

From your application then you can do: SetCharSet( nMyCharSet )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Horizon »

Hi Antonio,

You mean I should delete the defines in my make files which is "_DEFAULT_CHARSET_=1", add this function to my own libs and call the SetCharSet(1) from the first line of my main procedure like.

Code: Select all

Procedure Main()
SetCharSet(1)
....
...
...
...
My Code
...
..
Return
Is It?
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Antonio Linares »

Hakan,

Yes, and modify font.prg to get the CharSet value calling SetCharSet() with no params:

nCurrentCharset = SetCharSet()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Horizon »

Hi Antonio,

Can we do it by using

font.prg

Code: Select all

CLASSDATA nCharSet.
Our application.

Code: Select all

TFont():nCharSet := 1
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Post by Antonio Linares »

Mr. Rao is going to implement it as you are proposing, thank you
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply