Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding Line height for text



Look at using ATSUGetGlyphBounds for something similar.

Quoting James Mitchell <email@hidden>:


Please bear with me. This is my first real dip into Gore Graphics.

Ok, I can't seem to find and answer to this. I need to get the height of a line of text that I need to write out to
a PDF document. Here is the old code that does it. I need to fidn out how to calculate the line height, either
with ATS or CG calls.


Are they any examples that show workign with some CG or ATS text.

void RecalcLineHt(void)
{
	FontInfo	fi;

	GetFontInfo(&fi);
	PrScrInfo.LineHt = fi.ascent + fi.descent + fi.leading;
}

Thanks in advance for any help.

Scott Mitchell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Finding Line height for text (From: James Mitchell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.