Lets Talk Type

String Widths and Heights

In addition to retrieving character-width data for individual characters, applications also need to compute the width and height of entire strings. Two functions retrieve string-width and height measurements: GetTextExtentPoint32, and GetTabbedTextExtent. If the string does not contain tab characters, an application can use the GetTextExtentPoint32 function to retrieve the width and height of a specified string. If the string contains tab characters, an application should call the GetTabbedTextExtent function.

Applications can use the GetTextExtentExPoint function for word-wrapping operations. This function returns the number of characters from a specified string that fit within a specified space.

Font Ascenders and Descenders

Some applications determine the line spacing between text lines of different sizes by using a font’s maximum ascender and descender. An application can retrieve these values by calling the GetTextMetrics function and then checking the tmAscent and tmDescent members of the TEXTMETRIC.

The maximum ascent and descent are different from the typographic ascent and descent. In TrueType and OpenType fonts, the typographic ascent and descent are typically the top of the f glyph and bottom of the g glyph. An application can retrieve the typographic ascender and descender for a TrueType or OpenType font by calling the GetOutlineTextMetrics function and checking the values in the otmMacAscent and otmMacDescent members of the OUTLINETEXTMETRIC structure.

The following figure shows the difference between the vertical text metric values returned in the NEWTEXTMETRIC and OUTLINETEXTMETRIC structures. (The names beginning with otm are members of the OUTLINETEXTMETRIC structure.)

Vertical values returned by NEWTEXTMETRIC and OUTLINETEXTMETRIC

Font Dimensions

An application can retrieve the physical dimensions of a TrueType or OpenType font by calling the GetOutlineTextMetrics function. An application can retrieve the physical dimensions of any other font by calling the GetTextMetrics function. To determine the dimensions of an output device, an application can call the GetDeviceCaps function. GetDeviceCaps returns both physical and logical dimensions.

A logical inch is a measure the system uses to present legible fonts on the screen and is approximately 30 to 40 percent larger than a physical inch. The use of logical inches precludes an exact match between the output of the screen and printer. Developers should be aware that the text on a screen is not simply a scaled version of the text that will appear on the page, particularly if graphics are incorporated into the text.

1. 5th Creative Directors and Art Directors club awards

5th-creative-directors-and-art-directors-club-awards-nephew

2. Brighton Language School

brighton-language-school-espanol

3. Bushmills Irish Whiskey

bushmills-irish-whiskey-america

4. Cancer Patients Aid Association

cancer-patients-aid-association-weight-loss

5. Cesradyston : Plumbing

cesradyston-plumbing

6. Coronita : Talk

coronita-talk

7. Amazon : Rock

amazon-rock

8. Khadims Shoes : Squirrel

khadims-shoes-squirrel

9. Intermountain Guitar and Banjo : Spoon

intermountain-guitar-and-banjo-spoon

10. FedEx

fedex-success-3

11. Amnesty International : Darfur rape

amnesty-international-darfur-rape

12. Double A paper : Peace

double-a-paper-peace

13. Emmi caffélatte : Drink different

emmi-caffelatte-drink-different-1

14. Fabrika

fabrika-self-promotion

15. Harley Davidson Nightster

harley-davidson-nightster-horsemen

16. Honda Sports ATV

honda-sports-atv-fear

17. HSBC Systematic Investment Plan

hsbc-systematic-investment-plan-car

18. IKEA : Decorate for the holidays

ikea-decorate-for-the-holidays

19. Khadims Shoes : Addiction

khadims-shoes-addiction

20. Les Jardins de Colette

les-jardins-de-colette-bench

21. Masterfoods Skittles

masterfoods-skittles-rainbow-5

22. mylotto.co.nz

mylottoconz-noodles

23. NRDC : Trees

nrdc-trees

24. Ojus Digestive Tablets

ojus-digestive-tablets-dad

25. Panasonic DVD Theater : Crash

panasonic-dvd-theater-crash

26. Pattex : Plastic

pattex-plastic

27. Peugeot 107 :Adult Entertainment

peugeot-107-adult-entertainment

28. Peugeot 107 : Dinosaur

peugeot-107-dinosaur

29. PS2 : Girlfriend

ps2-girlfriend-2

30. Sensodyne

sensodyne-teeth-1

31. Skoda Sweden

skoda-sweden-woman

32. Sun-Rype : Fruit

sun-rype-fruit

33. The Economist

the-economist-spider

34. Think : Mobile

think-mobile

35. Turmepa : Keep oceans clean

turmepa-keep-oceans-clean

36. United Nations Population Fund

united-nations-population-fund-population-day

37. US Preventive Medicine  The Prevention Plan

us-preventive-medicine-the-prevention-plan-shark

38. Vodafone : Trainshopping

vodafone-trainshopping

39. Volkswagen Touareg : Sharks

volkswagen-touareg-sharks

40. YoSi Sideral Radio 90.1 FM : Homework

yosi-sideral-radio-901-fm-homework

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.