Page 1 of 1

Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 5:11 am
by jdsoft
Hello,

Windows 11
xpp 2.00.2209
Expresss build 268

I experience weird behaviour in display buttons in a customers computer.

Code: Select all

nButtons := DCGUI_BUTTON_CANCEL + DCGUI_BUTTON_OK

DCGETOPTIONS   ;
             SAYWIDTH nWidth ;
             NORESIZE     ;
             SAYOPTIONS XBPSTATIC_TEXT_BOTTOM ;
             NOMINBUTTON ;
             NOMAXBUTTON ;
             TABSTOP ;
             BUSY LANG_SYS_MES226                         ;
             ROWSPACE ROWHEIGHT ;
             DISABLEDCOLOR GRA_CLR_WHITE ;
             CLOSEQUERY MSG bAbortQuery ;
             EXITQUERY 	MSG bExitQuery  ;
             ABORTQUERY MSG bAbortQuery ;
             NOSUPERVISE                                  ;
             TOOLTIPCOLOR GRA_CLR_BLACK, GRA_CLR_YELLOW  ;
             BORDER XBPDLG_RECESSEDBORDERTHICK_FIXED     

DCREAD GUI                 ;
      TO lOk                  ;
      PARENT       @oDlg      ;
      TITLE cTitle            ;
      BUTTONS nButtons        ;
      FIT                     ;
      OPTIONS GetOptions      ;
      HANDLERBLOCK bHandler   ;
      ENTEREXIT               ;
      MODAL                   ;
      SAVE                    ;
      SETAPPWINDOW           
First the way it looks on all other computers, and this is the expected correct display.
Image

Now how it looks on the customers computer.
Image

Notice the difference in font type and font size.

The app is exactly identical on both computers.
Also same screen dimensions (1920 x 1080) and Windows 11

How can i fix this ?

Re: Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 6:06 am
by rdonnay
Did the customer select a special windows theme?

Re: Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 6:36 am
by jdsoft
Hello Roger,

I just checked:
- Default windows theme
- No contrast scheme

Also notice the length of the DCGET, it is much longer then required.
The font for the dialog title and menu appear to be ok.

I also compared the installed fonts, these are identical on both computers.
- Courier New
- Arial, Arial.Nova, Arial Rounded MT
- Microsoft Sans Serif, Ms Reference Sans Serif, Sans Serif Collection

Image

Re: Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 9:06 am
by rdonnay
I don't have Windows 11.
Has this been tried on any other Windows 11 computers?

Do you use RESIZE SCALEFONT anywhere?

Re: Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 11:35 am
by jdsoft
Hello Roger,

I checked. a few computers with the same version of my app.
They all look ok, on Windows-11 and also on a few windows-10 machines.

I just installed font "Courier" on the customer machine.
The size of the DCGET is calculated correctly now, but the typeface looks somewhat different.

Re: Unexpected font in BUTTONS

Posted: Thu Nov 07, 2024 2:33 pm
by rdonnay
I just installed font "Courier" on the customer machine.
GETS are based on the DC_XbpGet() class and the default is '10.Courier' because we need a fixed length font to properly size the GET.

You could try using a different non-proportional font like Lucida Console.

DCGETOPTIONS GETFONT "10.Lucida Console"