Font shift during program execution

User avatar
TimStone
Posts: 2956
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Font shift during program execution

Post by TimStone »

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
Maurizio
Posts: 827
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Font shift during program execution

Post by Maurizio »

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
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

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
TimStone
Posts: 2956
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Font shift during program execution

Post by TimStone »

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
carlos vargas
Posts: 1723
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Font shift during program execution

Post by carlos vargas »

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
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

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: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

Tim,

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

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2956
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Font shift during program execution

Post by TimStone »

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

Re: Font shift during program execution

Post by henning »

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


#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
 
User avatar
TimStone
Posts: 2956
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Font shift during program execution

Post by TimStone »

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
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

Tim,

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

Antonio Linares
www.fivetechsoft.com
henning
Posts: 2
Joined: Wed Aug 27, 2014 8:53 pm

Re: Font shift during program execution

Post by henning »

My problem solved with oObject:SetFont(oFont)

Thanks....
User avatar
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2956
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Been thanked: 2 times
Contact:

Re: Font shift during program execution

Post by TimStone »

Antonio,

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

Code: Select all | Expand


    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
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: Font shift during program execution

Post by Antonio Linares »

Tim,

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

Antonio Linares
www.fivetechsoft.com
Post Reply