schwa/CoreTextToy — pull request #49 by bencochran (2012-02-25 19:16:05+00:00)
Title: Added kMarkupFontNameAttributeName

Another one for ya…

Sometimes you want to be able to have a tag be a different font family. This adds the `kMarkupFontNameAttributeName` attribute allowing that while still playing nicely with `kMarkupBoldAttributeName`, `kMarkupItalicAttributeName` and `kMarkupSizeAdjustmentAttributeName`

e.g.

BTagHandler thePrettyFontHandler = ^(CSimpleHTMLTag *inTag) {
NSDictionary *theAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
@"Papyrus", kMarkupFontNameAttributeName,
NULL];
return(theAttributes);
};
[label.markupValueTransformer addHandler:thePrettyFontHandler forTag:@"pretty"];

(I also added an example of its use to the example project)