-
Fonts and the CDC
Ok from experiments and other tests, I have a query that may seem strange.
Ok what I have is x-fonts with n-height for text on a single line.
I also have set the TA_BASELINE|TA_UPDATECP in the SetTextAlign of the cdc.
what I have learned by doing all this is that when move to a point on the cdc and start drawing text, the base line of the text, regardless of font, is that point. Base line is defined as the base of the charcters with 'y' and 'g' tails droping below the base line.
The question I have, with the information above, How do I determin the next comfortable base line/ base point, for the next line text?
Thanks in advance :)
Shawn
-
Re: Fonts and the CDC
try GetTextExtent member function. it will give your lines width and height, given the selected font.
yalcin
-
Re: Fonts and the CDC
Read the question clearly, obviously I already know about this function.
In other words this isn't what I asked for.
-
Re: Fonts and the CDC
Search for "otmMacAscent" in VC++ help files. then look into Strings widths and heights. I think the picture there explaining the OUTLINETEXTMETRIC structure will help you.
You could be a bit polite in your response. Your original message was less than obvious. At least to me.
If this does not even come close to help do not reply to me please.
yalcin
-
Re: Fonts and the CDC
If you're such a know it all then why are you posting questions on this board to begin with? Your response was freaking rude, the guy was only trying to help you.
The guy even wrote back after you snapped at him! Jeeze! How many people in this world continue to help someone after being snapped at? Should teach you a bit about -character-.
-
Re: Fonts and the CDC
I didn't feel my repsonce was rude, I do feel yours was rude to me. I thought I posted enough to get a clear answer the first time. In his second answer it gave me enough to trace back to what I needed.
I apologize for being rude to any one, and I am no know-it-all and I apperciate all the answers I get, even though I am suprised at how many questions on this board go unanswered, but some of them I have understood why.
Shawn
-
Re: Fonts and the CDC
OK, if you really were not trying to be rude, then I'm sorry too. I understand that sometimes what is written can sound different than what is thought. It was just that your message really rubbed me the wrong way.
-
Re: Fonts and the CDC
Hi Shawn,
the reason for the unanswered questions is fairly simple. We are all developers around the world sharing our knowledge with others. But sometimes we don't have the knowledge to answer a question, or, in my case, I don't have the time to answer some more complicated questions.
This discussion board is independent. Noone gets money for answering, and noone is kept away from answering. If you see a question where you know the solution, simply answer it.
Martin