FWH 8.12 Font.prg _DEFAULT_CHARSET_

FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Horizon » Fri Jan 02, 2009 10:52 am

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 & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Antonio Linares » Sat Jan 03, 2009 7:49 am

Hakan,

Instead of a #define, a SetGet function should be required:
Code: Select all  Expand view  RUN
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Horizon » Sat Jan 03, 2009 9:44 am

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  Expand view  RUN
Procedure Main()
SetCharSet(1)
....
...
...
...
My Code
...
..
Return


Is It?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Antonio Linares » Mon Jan 05, 2009 6:46 am

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Horizon » Sat Jun 06, 2020 6:03 pm

Hi Antonio,

Can we do it by using

font.prg
Code: Select all  Expand view  RUN
CLASSDATA nCharSet.


Our application.
Code: Select all  Expand view  RUN
TFont():nCharSet := 1
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 8.12 Font.prg _DEFAULT_CHARSET_

Postby Antonio Linares » Mon Jun 08, 2020 6:32 am

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: dutch, Google [Bot] and 61 guests