Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

It's not a game...

This topic is 5519 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I''ve written a quit smoking app/meter/companion in my days off coding my game. I have a problem, in that, on the 2 XP machines I have run it on, the fonts did not size correctly. I''m trying to get some help, but I need a screenshot of the fonts on an XP machine (I only run W98). I would be grateful if someone with XP, could download the app, run it, and send me a screenshot of the error. The app is here My email is reaction@optionalreaction.net Also, I have not seen it at all on a 2000 machine. If someone could help me here too, I would be grateful. Also also, if someone could tell me why it''s happenning at all, I would buy them a beer. Thanx, Keith
>OptionalReaction
I have answered my own question many times

Share this post


Link to post
Share on other sites
Advertisement
Since you are not posting code i can assume you are doing a text using a default size , try to use a custom font explicity declared and sized , using the parameter tha comes with the api member, maybe that is the glitch ....
sorry for my english


Share this post


Link to post
Share on other sites
Sorry, I should have posted some code... I''m creating the font like this ...


mp.hDC = CreateDC("DISPLAY", NULL, NULL, NULL);

mp.hFont = CreateFont(-MulDiv(8, GetDeviceCaps(mp.hDC, LOGPIXELSY), 72),
0,0,0,FW_EXTRABOLD,
FALSE,
FALSE,
FALSE,
ANSI_CHARSET,
OUT_TT_ONLY_PRECIS,
CLIP_DEFAULT_PRECIS,
PROOF_QUALITY,
VARIABLE_PITCH | FF_DONTCARE,
"Tahoma");



... this code, from MSDN, should adjust the font to the current DISPLAY DC ...


-MulDiv(8, GetDeviceCaps(mp.hDC, LOGPIXELSY), 72)


... but it dosn''t appear to work.

Keith


>OptionalReaction
I have answered my own question many times

Share this post


Link to post
Share on other sites
it should work, try to remove the muldiv and force to a known value , then retest the code, plus, there are 4 parameters that can set the size both in x and y direction for the font to be displayed, remove the muldiv, set to a value and try different caling values, i always use this method and it works for me.
byez

Share this post


Link to post
Share on other sites
Thanks, v71,

I made the mods, and have uploaded a test version.

MSDN did say that the MulDiv is for MM_TEXT mapping mode, whatever that is, I think this may have been my bad.

EDIT: The latest version is here if anyone has time to do a test on XP/2K, again, I would be grateful.

R

>OptionalReaction
I have answered my own question many times


[edited by - reaction on February 8, 2003 8:32:17 PM]

[edited by - reaction on February 14, 2003 12:20:07 PM]

Share this post


Link to post
Share on other sites
Hi,

I managed to get to a XP machine today, and with the alterations v71 suggested, the problems is the same...

XP



If anyone knows any other way of fixing this ...

Keith

>OptionalReaction
I have answered my own question many times

Share this post


Link to post
Share on other sites
FIX: basically a code rewrite, moving the location and timing of font creation fixed the problem.

It could have been something to do with the speed of the machine (and thread startup time).

R

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!