en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en nl en en en en en en en en en en es de de en en en en nl en de en en en en en en en en en nl en de ta en en en en en en es en en fr en en en en nl en en en en fr en en fr pt en en en en en en en nl en en en en en en en en en en en en es en en en en en en en nl en en en en en en en en en en en en en nl vi en zh en en en en en en en en fr en en en en en en en en en en en en nl en de en en en en en en es en en en en en en en nl fr en zh en fr en en en en en en en en en en en nl en en en en en en en en en en en en en en en en en en en en en en en sv en en en sv en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
Bold is defined by weight, so maybe the problem is there.
Do you set it to 400 (= normal)?
Join Date: Feb 1999
10 Jan 2000, 08:58 AM
The problem is not with selecting the font, but if I create the same font multiple times, sometimes the font will come back bold and sometimes it will come back normal. I use 400 for a normal font.
What I want to know is, is Win2000 more sensitive in selecting a font, so with certain values passed in CreateFont, sometimes it returns a bold and sometimes it won't.
Join Date: Aug 1998
11 Jan 2000, 04:18 AM
Chris, I'm running Win2K here, so if you want to post or email me a short app to demo your problem, I'll see what I can find out. I've done extensive testing of DOSPRINT with Win2K (using test files containing hundreds of font changes within a single Print Preview window) and I've not seen the problem as you describe it.
( mailto:[email protected][email protected]  )
Join Date: Feb 1999
11 Jan 2000, 07:04 AM
Here is the code I use for Creating a Font. Is there anything here that could "confuse" Win 2000 and cause to return a Bold Font, when Bold was Not asked for:
Sub EZ_DefFont (byval N&, byval TFace$, byval PSize&, byval FProp$) EXPORT Local hFont as Long Local W&, E&, O&, FW&, I&, U&, ST&, CS&, PR&, CL&, Q&, PF&, FF& Local zTemp as AsciiZ*80, OKFlag& Local PT! ' PT!=abs(PSize&) ' PT!=int(PT!*App_EZ_PointOffSet!) ' PSize&=-int(PT!) ' a negative value defines by character height, not cell height PSize&=-MulDiv(PSize&, App_EZ_PixelSY&, 72) if (N&>5 and N& 5 then if AppFont(N&)=0 then OKFlag&=1 end if if OKFlag& then W&=0 E&=0 O&=0 FW&=%FW_NORMAL I&=0 U&=0 ST&=0 CS&=%ANSI_CHARSET PR&=%OUT_DEFAULT_PRECIS CL&=%CLIP_DEFAULT_PRECIS Q&=%DRAFT_QUALITY PF&=%DEFAULT_PITCH if instr(FProp$,"B") then FW&=%FW_BOLD if instr(FProp$,"X") then FW&=%FW_HEAVY if instr(FProp$,"I") then I&=1 if instr(FProp$,"U") then U&=1 if instr(FProp$,"-") then ST&=1 if instr(FProp$,"D") then CS&=%DEFAULT_CHARSET if instr(FProp$,"S") then CS&=%SYMBOL_CHARSET if instr(FProp$,"O") then CS&=%OEM_CHARSET if instr(FProp$,"Q") then Q&=%PROOF_QUALITY ' letter quality if instr(FProp$,"F") then PF&=%FIXED_PITCH if instr(FProp$,"V") then PF&=%VARIABLE_PITCH FF&=%FF_DONTCARE ' I can add choices for Font Families later PF&=PF& or FF& if len(TFace$)>31 then TFace$=left$(TFace$,31) zTemp=TFace$+chr$(0) ' Remember this font in LOGFONT structure if N&=-1 then App_EZ_LastFont.lfHeight=PSize& App_EZ_LastFont.lfWidth=W& App_EZ_LastFont.lfEscapement=E& App_EZ_LastFont.lfOrientation=O& App_EZ_LastFont.lfWeight=FW& App_EZ_LastFont.lfItalic=I& App_EZ_LastFont.lfUnderline=U& App_EZ_LastFont.lfStrikeOut=ST& App_EZ_LastFont.lfCharSet=CS& App_EZ_LastFont.lfOutPrecision=PR& App_EZ_LastFont.lfClipPrecision=CL& App_EZ_LastFont.lfQuality=Q& App_EZ_LastFont.lfPitchAndFamily=PF& App_EZ_LastFont.lfFaceName=TFace$+chr$(0) else hFont=CreateFont(PSize&,W&, E&, O&, FW&, I&, U&, ST&, CS&, PR&, CL&, Q&, PF&, zTemp) if hFont>0 then AppFont(N&)=hFont end if end if end if End Sub
Note: While the code above does come from a CopyRighted program (EZGUI), please feel free to modify it for your own use and use it as you please !
The Subroutine is very easy to use, since you just pass it the Font Name, Point size and a simple Property string with single characters for properties (ie. B=Bold, X=Heavy, Q=Quality, F=Fixed Width, V=Variable width, I=Italics, U=Underlined, etc.).
There are some other features in the code , you can remove since it is for use with other EZGUI functions (ie. the LOGFONT UDT is a Global for use with other EZGUI functions). You may want to convert the sub to a Function to return the font handle.
Join Date: Aug 1998
11 Jan 2000, 07:21 AM
I believe the last 4 or 5 fields (not including lfFacename) are defined
as BYTE in the LOGFONT udt. You are using LONG's.
Join Date: Oct 1987
11 Jan 2000, 07:50 AM
> Are there any "differences" between Win 95/98 and NT/2000
> when using CreateFont that I should know about ?
I can't give you any concrete answers, but it has been my experience that fonts are not very consistent between 95/98 and NT. Even within one version of Windows, the results of creating a font are not always what you might expect. For example, when increasing the size of a font by a small amount, I often perceive a difference in the boldness of the resulting font.
For an example of this effect on NT, use the Control Panel's "Fonts" applet to look at the Arial font. To my eye, the 12-point font is much less bold than the 18-point font. On the other hand, Courier New seems very consistent to me.
I've never looked into it in detail, but here are a few thoughts. Let's say that you have a relatively small font, and Windows draws it with lines that are one pixel wide and high. Increase the width/height by a small amount and Windows will continue to use one-pixel lines, until a certain size-threshhold is reached and it starts using 2-pixel lines. (I'm not accurately describing the way characters are drawn, but you get the idea.) It is impossible for Windows to draw with a one-point-five-pixel line, so it has to jump abruptly from 1 to 2 pixels, and the resulting font looks very different. Not many fonts are drawn with 1-pixel fonts... I'm just trying to communicate the fact that Windows must deal with "integers only" is some unexpected places, and (I'm guessing) it could affect font creation.
I have often noticed that a certain font will appear to become significantly bolder when the size is increased beyond a certain threshold. I don't know what the mechanism is that makes it happen, but it is a real and hard-to-predict effect.
I'm not certain, but I think that monitor resolution has an effect as well. I have designed a number of menus using one screen resolution, and when the programs were run on another machine with a different resolution, the relative boldness of certain fonts did appear to change.
Generally speaking, I have obtained much more consistent results with TrueType fonts than with other types. But all Windows fonts suffer from these effects to some degree.
Perfect Sync: Perfect Sync Development Tools
Email: mailto:[email protected][email protected]
[This message has been edited by Eric Pearson (edited January 11, 2000).]
"Not my circus, not my monkeys."
Join Date: Feb 1999
11 Jan 2000, 08:58 AM
The problem that my Beta testers have experienced is that on Win NT or 2000 that a bunch of controls can be defined with the same Font (using my code above) , and yet the first control displays with Bolder text. The Font is the same (different handle, but defined with the same attributes).
The first time Win 2000 creates the font it is bolder, than the next time it creates it.
Join Date: Oct 1987
11 Jan 2000, 09:19 AM
Yes, sorry, you said that in a previous message and I missed it.
Perfect Sync: Perfect Sync Development Tools
Email: mailto:[email protected][email protected]
"Not my circus, not my monkeys."
Join Date: Aug 1998
11 Jan 2000, 10:03 AM
nEscapment and nOrientation should be same value
If graphics mode is set to GM_COMPATIBLE, nEscapement specifies both
the escapement and orientation.
You should set nEscapement and nOrientation to the same value
If graphic mode is set to GM_ADVANCED, you can specify the escapement
angle of the string independently
This does not explain the inconsistent behaviors in WinNT/2000
But perhaps would help to get the same inconsistency in Win95
It was a yoke!
Character quality of the font is more important than exact matching
of the logical-font attributes. For GDI raster fonts, scaling is disabled
and the font closest in size is chosen. Although the chosen font size may
not be mapped exactly when PROOF_QUALITY is used, the quality of the font
is high and there is no distortion of appearance. Bold, italic, underline,
and strikeout fonts are synthesized, if necessary.
[This message has been edited by Fred Oxenby (edited January 11, 2000).]
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 09:52 PM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.