ANSI_VAR_FONT, again
ANSI_VAR_FONT, again
| vortic |
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 |
![]() ![]() ![]() |
| marcello |
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. |
| vortic |
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 ); withCODE 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. |
| ddiego |
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. |
| vortic |
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 |
vortic ANSI_VAR_FONT, again Aug 25 2004, 04:58 PM
ddiego OK I think I have fixed this.
There were errors ca... Aug 26 2004, 01:59 AM
vortic
Sounds good; I will try on ME and 2K tomorrow a.m... Aug 26 2004, 02:49 AM
vortic
Jim,
I built on Win2K and WinME today, and all l... Aug 27 2004, 01:21 AM
marcello I would wait one day or so.
By that time Jim shoul... Aug 25 2004, 08:26 PM
vortic
Hopefully we won't need it. Did you see my ed... Aug 25 2004, 08:42 PM
marcello It doesn't look good on XP !
The checkbox... Aug 27 2004, 10:04 PM
ddiego
I can fix it but I need to know which font works... Aug 27 2004, 11:16 PM
marcello Thank you very much !
It was simpler than I th... Aug 28 2004, 12:10 AM
vortic
Hi Marcello,
I didn't get a chance to check... Aug 28 2004, 12:42 AM
ddiego
Sorry I missed this earlier - thanks for that - ... Aug 31 2004, 01:26 AM
marcello
No. I will answer better tomorrow on that thread.... Aug 28 2004, 02:16 AM![]() ![]() ![]() |
| Lo-fi Version | : 18th May 2013 - 06:23 PM |