Skip to content

Commit

Permalink
Update Programming Guide-template.markdown
Browse files Browse the repository at this point in the history
Updated the Programming Guide to include -coretext-fontname as part of the documentation.
  • Loading branch information
amol-c committed Feb 12, 2016
1 parent 7f454eb commit 7778d5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/Programming Guide-template.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,12 @@ NSData* descriptionData = [html dataUsingEncoding:NSUTF8StringEncoding];
NSAttributedString* attributedDescription = [[NSAttributedString alloc] initWithHTMLData:descriptionData options:options documentAttributes:NULL];
```

Adding Custom Font with FontFaceName
--------------------------------
When you want to add a custom font to the HTML being rendered using FontFaceName, you can add ```-coretext-fontname: SourceSansPro-Light;``` to the stylesheet.
An example would be:
```
let customStyleSheet = DTCSSStylesheet(styleBlock: "body { -coretext-fontname: SourceSansPro-Light; }")
DTCSSStylesheet.defaultStyleSheet().mergeStylesheet(customStyleSheet)
```

0 comments on commit 7778d5a

Please sign in to comment.