Font shift during program execution

Font shift during program execution

Postby TimStone » Thu Jul 24, 2014 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Font shift during program execution

Postby Maurizio » Thu Jul 24, 2014 4: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
User avatar
Maurizio
 
Posts: 825
Joined: Mon Oct 10, 2005 1:29 pm

Re: Font shift during program execution

Postby Antonio Linares » Thu Jul 24, 2014 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Font shift during program execution

Postby TimStone » Thu Jul 24, 2014 7: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Font shift during program execution

Postby carlos vargas » Fri Jul 25, 2014 5: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)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Font shift during program execution

Postby Antonio Linares » Fri Jul 25, 2014 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Font shift during program execution

Postby Antonio Linares » Fri Jul 25, 2014 9:54 am

Tim,

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

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

Re: Font shift during program execution

Postby TimStone » Fri Jul 25, 2014 5: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Font shift during program execution

Postby henning » Thu Aug 28, 2014 7: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: Select all  Expand view  RUN

#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
 
henning
 
Posts: 2
Joined: Wed Aug 27, 2014 8:53 pm

Re: Font shift during program execution

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Font shift during program execution

Postby Antonio Linares » Fri Aug 29, 2014 8:16 am

Tim,

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

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

Re: Font shift during program execution

Postby henning » Fri Aug 29, 2014 12:19 pm

My problem solved with oObject:SetFont(oFont)

Thanks....
henning
 
Posts: 2
Joined: Wed Aug 27, 2014 8:53 pm

Re: Font shift during program execution

Postby Antonio Linares » Fri Aug 29, 2014 3:26 pm

very good :-)
regards, saludos

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

Re: Font shift during program execution

Postby TimStone » Fri Aug 29, 2014 3:40 pm

Antonio,

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

Code: Select all  Expand view  RUN

    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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Font shift during program execution

Postby Antonio Linares » Fri Aug 29, 2014 9:31 pm

Tim,

That code is fine. No problems in it.
regards, saludos

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 101 guests