Mailing Lists: Apple Mailing Lists

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

Can't draw diacritical marks using ATSUI



I'm developing on OSX 10.4 and I need to draw accented chars like: à,è,é,ì,ò,ù. I'm using char arrays with UTF-8 encoding.

Here's the code:

ATSUFindFontFromName(fontName, strlen(fontName),
						kFontFamilyName,
						kFontNoPlatformCode,
						kFontNoScript,
						kFontNoLanguage, &font);

ATSUCreateStyle(style);

// setting bold/italic/condensed...
ATSUSetAttributes(style, iAttributeCount, iTag, iValueSize, iValue);

// set on kDiacriticsType flag
ATSUSetFontFeatures(style, 1, &type, &sel);

ATSUCreateTextLayoutWithTextPtr((ConstUniCharArrayPtr)myString,
											 kATSUFromTextBeginning,
											 kATSUToTextEnd, length, 1, &length, style, layout);

This is what I get from various ATSUGetAll...

ATSUGetAllAttributes(6): 256,257,259,260,261,262,
ATSUGetAllFontFeatures(1): (9, 1)
ATSUGetAllFontVariations(0):
ATSUGetAllLayoutControls(0):


On drawing I get only a couple of boxes for each accented chars. This happens for several font type.


I know that one solution could be overlapping the diacritical glyph on the char glyph like:

è = e + '

but this solution fails on char 'i' because the accent doesn't overlap fine the point on the char 'i'

ì = i + '

So can anyone help me?

Thanks,

Paolo. _______________________________________________
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


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.