Interesting. I never thought it was an FB translation issue.
I just concluded that I was overlooking something simple. I've
played with this example and the CoreText Arc example. It's sad
to say but since I haven't done any real Mac programming in a few
years, I'm forgetting to do some things to help troubleshoot, such
as using the C examples. I've been so focused on getting up to
speed in FB again, (having to use Java for school) that I didn't
think to modify the C examples that I have.
Thanks for confirming that I wasn't really lost, it just didn't work.
W.
-----Original Message-----
From: Robert Purves [mailto:listrp@...]
Sent: Tuesday, August 18, 2009 2:57 AM
To: futurebasic@...
Subject: Re: [FB] CoreText font style problems
Waverly wrote:
> I've been working on a project that uses CoreText. Everything has
> been going well until I attempted to change font styles.
> I've been unsuccessful and havent figured out why. I've been trying
> to set as examples bold, italic and underline types
> A single underline shows but there are supposed to be three
> different types displayed which means to me that I must have lucked
> out in getting the single underline working.
Experimenting with C instead of FB, by hacking this demo:
<http://developer.apple.com/samplecode/CoreTextTest/index.html>
shows that kCTFontWeightTrait, kCTFontSlantTrait and kCTFontWidthTrait
do nothing.
kCTUnderlineStyleAttributeName works but ignores kCTUnderlineStyleXXX
and kCTUnderlinePatternXXX.
These are exactly the results you get. The conclusion, reached with
some reluctance, is that there's nothing wrong with your code or
FBtoC's translation of it. Maybe it will work in Snow Leopard?
In the meantime, you may have to settle for colour instead of
'styles'; kCTForegroundColorAttributeName works.
Robert P.
--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@...