IPB SourceForge.net Logo

Welcome Guest ( Log In | Register )

[ Outline ] · Standard · Linear+

> ANSI_VAR_FONT, again

vortic
post Aug 25 2004, 04:58 PM
Post #1


Advanced Member
***

Group: Members
Posts: 1026
Joined: 13-April 04
Member No.: 42



Hey,

Although the recent change from ANSI_VAR_FONT to DEFAULT_GUI_FONT in Win32Font.cpp seems to work on WinME and WinXP, it doesn't work for TextControl on Win2K. I get a really tiny little font in TextControl on Win2K. So, I will probably set it back to ANSI_VAR_FONT, but am not quite sure what to do about Win9x.

Doug
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topicStart Poll
Replies
marcello
post Aug 25 2004, 05:12 PM
Post #2


Advanced Member
***

Group: Members
Posts: 965
Joined: 6-April 04
From: Montreal ( Canada ) in this moment of my life !
Member No.: 39



Maybe we need to add a flag, like isUnicodeEnabled(), telling us at runtime which Platform we are on, in order to resolve this kind of problems.

It is also generally useful for a user to have access to that information, so we might provide a function accessible to the user for it.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
vortic
post Aug 25 2004, 05:39 PM
Post #3


Advanced Member
***

Group: Members
Posts: 1026
Joined: 13-April 04
Member No.: 42



QUOTE(marcello @ Aug 25 2004, 11:12 AM)
Maybe we need to add a flag, like isUnicodeEnabled(), telling us at runtime which Platform we are on, in order to resolve this kind of problems.
*


So, is it ok to replace
CODE
HFONT defFont = (HFONT)GetStockObject( ANSI_VAR_FONT );
with
CODE
HFONT defFont = NULL;
if ( System::isUnicodeEnabled() ) {
 defFont = (HFONT)GetStockObject( ANSI_VAR_FONT );
}
else {
 defFont = (HFONT)GetStockObject( DEFAULT_GUI_FONT );
}


QUOTE
It is also generally useful for a user to have access to that information, so we might provide a function accessible to the user for it.

Not sure of how that would be implemented.

Well, I won't make any changes yet, as Jim appears to be messin 'round with Win32Font.cpp (and I am seeing some odd font stuff elsewhere also).



[EDIT]

Ah, I went back and built a version of 066 that I had last updated on about the 15th or 16, and DEFAULT_GUI_FONT does NOT cause a problem on Win2000. So, I think the problems is likely due to more recent changes somewhere.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ddiego
post Aug 25 2004, 08:53 PM
Post #4


VCF Lead Developer
***

Group: Lead Developer
Posts: 2834
Joined: 2-August 03
Member No.: 2



Doug,

In the code were you use ANSI_VAR_FONT just call
CODE

OSVERSIONINFO osVersion = {0};
osVersion.dwOSVersionInfoSize = sizeof(osVersion);

GetVersionEx( &osVersion );



and check at runtime if it's win2k, or Win9x, and use whatever is best. Wouldn't that work?

I am pretty much done with the printing stuff now, or at least the worst of it. Is there a little test case I can look at to see where this screws stuff up?

I would like to have a function(s) on the System class to identify the platform, os version etc.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
vortic
post Aug 25 2004, 09:22 PM
Post #5


Advanced Member
***

Group: Members
Posts: 1026
Joined: 13-April 04
Member No.: 42



QUOTE(ddiego @ Aug 25 2004, 02:53 PM)
and check at runtime if it's win2k, or Win9x, and use whatever is best. Wouldn't that work?

I am pretty much done with the printing stuff now, or at least the worst of it. Is there a little test case I can look at to see where this screws stuff up?


I saw the problem today in TextControls and TitledBorders (after CVS update this morning).

Just build the Copy&Paste or ListBoxControl examples and look at text in the TextControls. Mine looked very very very tiny (unreadable).

I also had a problem with some RadioButtonControls that had their height set with getPreferredHeight(). They didn't show up at all (I thing their height = 0). This was all with DEFAULT_GUI_FONT on Win2K.

Doug
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicTopic OptionsStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
 

Lo-fi Version : 18th May 2013 - 06:23 PM