FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Font shift during program execution
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Font shift during program execution
Posted: Thu Jul 24, 2014 04:26 PM

I have had a problem reported, on some computers, that the font shifts during program execution. As an example, the program font is usually set to the system font. When working in the program, sometimes when entering a function, the font suddenly changes to a much larger one. That is then held within the program.

I noted that there was a problem with button bitmaps, but it does not appear that there is a resolution posted yet.

This has only been occurring with 14.06, compiled with xHarbour ( .com )

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Font shift during program execution
Posted: Thu Jul 24, 2014 04:30 PM

Hello ,

I have the same problem with 14.06 Harbour and MSVC 2013 .
Now I want to try with BCC .

Maurizio

www.nipeservice.com

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Thu Jul 24, 2014 07:23 PM

Tim, Mauricio,

We recently did some changes in FWH fonts management to have a better control of them and it seems as still it requires some fine tunning.

We are going to review our changes and find what there may be missing, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Font shift during program execution
Posted: Thu Jul 24, 2014 07:31 PM

Antonio,

The problem is that this problem is happening live in the hands of our clients. They are not always sympathetic to our programming challenges, and as a result they get very angry. When enough of these things happen, they start shopping for other software.

I saw this was brought up early in the month, and it appears nothing was done for the past two weeks. ( Based on the earlier posts ). Resolving this would be greatly appreciated.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Font shift during program execution
Posted: Fri Jul 25, 2014 05:34 AM

Antonio, i see this problem, i try using the btnbmp.prg of version 14.02
and work ok.

please include this prg in you project and recompile, and comment please.

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Fri Jul 25, 2014 09:23 AM

Tim, Carlos,

We have already located the source of the problem, it has been fixed and we will publish a FWH 14.07 in a day or two, thanks

We apologize for these inconveniencies, but as you are aware we do our best to react asap to solve whatever problem is detected :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Fri Jul 25, 2014 09:54 AM

Tim,

The libs that I have sent you today include the fonts fixes :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Font shift during program execution
Posted: Fri Jul 25, 2014 05:06 PM

Finally back at my desk ... the build went OK ... testing now.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 2
Joined: Wed Aug 27, 2014 08:53 PM
Re: Font shift during program execution
Posted: Thu Aug 28, 2014 07:50 PM
Hi,

The SetFont of TWindow is still with bug.... look the test..

For reproduce the error, click on button, close the dialog and click on button again.....


Thanks....

Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()

    public oFonteGets

    DEFINE FONT oFonteGets NAME "COURIER NEW" SIZE 0, -50 BOLD


   SET _3DLOOK ON

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75




    @ 5, 30 BUTTON "Open Window"       OF oWnd SIZE 200, 100 ACTION Customers()


   ACTIVATE WINDOW oWnd MAXIMIZED

return nil
function Customers()

   local oDlg
   local aTeste := {'1','2','3'}
   Local oCbx, cItem

    cItem := aTeste[1]

   DEFINE DIALOG oDlg FROM 6, 7 TO 21, 72 ;
      TITLE "Close and Open Again"

   @ 2, 7  ComboBox oCbx VAR cItem ITEMS ateste of oDlg

   oCbx:oFont := oFonteGets

  ACTIVATE DIALOG oDlg CENTER


return nil
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Font shift during program execution
Posted: Thu Aug 28, 2014 10:10 PM

OK ... I can confirm that, even with the latest release of FWH, the fonts are still a MAJOR problem.

First, I use the System Font:

cSysFont := GetSysFont( )
DEFINE FONT oMfont NAME cSysFont SIZE 0,-12 BOLD

The font is the default for everything ... it goes to oWnd, and then is inherited everywhere else:

oWnd:SetFont( oMFont )

All dialogs inherit the font from oWnd.

From the button bar on the main window, sometimes ( not every time ), when clicking a button to start a procedure ( Dialog ), the font shifts to a larger one, and it will not go back unless the user exits the program. Entering reinitializes all of the fonts.

This is making my clients very ANGRY and they are letting me know it. I think I would have to go back to 14.04 to get properly working fonts again. That negates all other improvements.

PLEASE ... can you address this and give us a fix ?

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Fri Aug 29, 2014 08:16 AM

Tim,

Never assign The font directly modifying oFont. Instead allways call oObject:SetFonf( oFont )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2
Joined: Wed Aug 27, 2014 08:53 PM
Re: Font shift during program execution
Posted: Fri Aug 29, 2014 12:19 PM

My problem solved with oObject:SetFont(oFont)

Thanks....

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Fri Aug 29, 2014 03:26 PM

very good :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Font shift during program execution
Posted: Fri Aug 29, 2014 03:40 PM
Antonio,

I'm a bit confused. If you look at the 3 lines of code above.

Code (fw): Select all Collapse
    cSysFont := GetSysFont( )
   DEFINE FONT oMfont NAME cSysFont SIZE 0,-12 BOLD
   oWnd:SetFont( oMFont )


The first line finds the font style used by the Windows system
The second line creates the font in a larger size
The third line then assigns the font to the MAIN( ) window.

How is that incorrect ? It has been that way for many many years.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Font shift during program execution
Posted: Fri Aug 29, 2014 09:31 PM

Tim,

That code is fine. No problems in it.

regards, saludos

Antonio Linares
www.fivetechsoft.com