xBrowse Font Problem

xBrowse Font Problem

Postby betoncu » Wed Jan 04, 2017 11:13 pm

After I have upgrade to December 2016, I faced with a font problem.
The fonts are changing when I use a xbrowse on dialog.
Please look at the example below.
When I double click on the xbrowse the fonts are both "Ms Sans Serif" with build May 2016
But, with build December 2016 both are "Segoe UI".
Because of this all of my Turkish characters have been changed by meaningless characters.
Also the Turkish characters in static text, and read only fields have been changed.
Please help

Code: Select all  Expand view

#include "FiveWin.ch"
#include "xbrowse.ch"

function Main()

   local oDlg, oBrw, aData:={}

   aadd(aData, {'aüğıx ', 'aşçöğüx ', 'aşiğüçöx '})
   aadd(aData, {'bugix ', 'ascogux ', 'asigucox '})
   aadd(aData, {'aÜĞİx ', 'aŞÇÖĞÜx ', 'aŞİĞÜÇÖx '})
   aadd(aData, {'bUGIx ', 'aSCOGUx ', 'aSIGUCOx '})

   DEFINE DIALOG oDlg SIZE 270,300 PIXEL //FONT oFont

   @ 10, 10 XBROWSE oBrw ;
            HEADERS 'ŞNoş', 'ĞNameğ', 'İTextı' ;
            SIZE 120, 70 PIXEL ;
            OF oDlg ;
            ARRAY aData AUTOCOLS ;
            LINES ;
            ON DBLCLICK msginfo( 'xBrowse Font: '+oBrw:oFont:cFaceName + CRLF + ;
                                 'Dialog Font: '+oDlg:oFont:cFaceName  )

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil
 
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: xBrowse Font Problem

Postby nageswaragunupudi » Thu Jan 05, 2017 6:58 am

This is the change made in FWH 16.07
Extract from whatsnew.txt
* Enhancement: function GetSysFont() now returns "Segoe UI" if Windows
10 or 8 is being used:

viewtopic.php?p=193067

thanks to James!

With this change Segoe UI is used as sysfont ( default for all dialogs/controls,etc) if the OS is Windows 8 or 10.

Do the Turkish characters look different on Segoe UI and MS Sans Serif ?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby nageswaragunupudi » Thu Jan 05, 2017 7:24 am

I tried this program on Windows 10.
This is the result with Segoe UI font

Image

It appears the Turkish characters are shown correctly
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby betoncu » Thu Jan 05, 2017 2:07 pm

Yes you are right. It appears that the characters are shown correctly.
Can you double click on xbrowse please. I want to see the oFont:cFaceName.
If it is Segoe UI, I will check my windows settings.
Temporarily I have solved my problem by changing GetSysFont() in getsysin.prg
Thanks for your help.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: xBrowse Font Problem

Postby cnavarro » Thu Jan 05, 2017 4:17 pm

betoncu wrote:Yes you are right. It appears that the characters are shown correctly.
Can you double click on xbrowse please. I want to see the oFont:cFaceName.
If it is Segoe UI, I will check my windows settings.
Temporarily I have solved my problem by changing GetSysFont() in getsysin.prg
Thanks for your help.


What Operating System do you use?
What language is your system configured with?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: xBrowse Font Problem

Postby nageswaragunupudi » Thu Jan 05, 2017 5:38 pm

If it is Segoe UI, I will check my windows settings.

Yes, it is Segoe UI.
But what is the difference? Both fonts show Turkish characters correctly.

If you have a personal preference for MS Sans Serif, that is upto you.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby Enrico Maria Giordano » Thu Jan 05, 2017 6:35 pm

Somewhat off-topic: I personally like Segoe UI but unfortunately it is slightly wider than MS Sans Serif. So dialogs have to be redesigned (or at least, all checked - anyway, not so easy).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8343
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xBrowse Font Problem

Postby nageswaragunupudi » Fri Jan 06, 2017 10:56 pm

Enrico Maria Giordano wrote:Somewhat off-topic: I personally like Segoe UI but unfortunately it is slightly wider than MS Sans Serif. So dialogs have to be redesigned (or at least, all checked - anyway, not so easy).

EMG

Yes. Not so easy.

In fact, while testing the above sample, I had to increase the width of dialog and browse.

We produce software to run on all OS. If we do not assign our own font to the dialog, then for each dialog and control, we need to define the width conditionally on the basis of the OS.

For example, the above code needs to be changed something like:
Code: Select all  Expand view

   DEFINE DIALOG oDlg SIZE If( IsWindows10() .or. IsWin8(), 360, 300 ),300 PIXEL
   @ 10, 10 XBROWSE oBrw ;
            HEADERS 'ŞNoş', 'ĞNameğ', 'İTextı' ;
            SIZE If( IsWindows10() .or. IsWin8(), 160, 120 ), 70 PIXEL ;
            OF oDlg ;
 


What is your advice?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby Enrico Maria Giordano » Fri Jan 06, 2017 11:11 pm

Sorry, I have no advice. I'm still using MS Sans Serif.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8343
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xBrowse Font Problem

Postby nageswaragunupudi » Fri Jan 06, 2017 11:12 pm

Enrico Maria Giordano wrote:Sorry, I have no advice. I'm still using MS Sans Serif.

EMG

But if you run the software on windows8 or win10, the default font is Segoe UI. What are you doing?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby betoncu » Fri Jan 06, 2017 11:15 pm

Mr Navarro
My operating system is Windows 10 and it is configured with Turkish.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: xBrowse Font Problem

Postby Enrico Maria Giordano » Fri Jan 06, 2017 11:23 pm

nageswaragunupudi wrote:But if you run the software on windows8 or win10, the default font is Segoe UI. What are you doing?


Almost all my dialogs are from resources so they use the font defined there.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8343
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xBrowse Font Problem

Postby betoncu » Fri Jan 06, 2017 11:26 pm

It is very strange. This problem occurs only if I use a xbrowse on a dialog.
The Turkish characters in read only fields and static text fields are also not shown correctly.
If I dont use xbrowse, read only and staic text fields are ok.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: xBrowse Font Problem

Postby nageswaragunupudi » Fri Jan 06, 2017 11:41 pm

Temporarily I have solved my problem by changing GetSysFont() in getsysin.prg

Do you still have the problem after changing GetSysFont()?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10267
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Font Problem

Postby betoncu » Sat Jan 07, 2017 3:48 am

No, I am using MS Sans Serif and no problem.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)


Return to FiveWin for Harbour/xHarbour

Who is online

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