GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nsc/NSAttributedString-Additions-for-HTML: Methods to allow using HTML code with CoreText

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

472 Commits
472 Commits

Folders and files

NameName
Last commit message
Last commit date
Classes
Classes
 
 
CoreTextExtensions.xcodeproj
CoreTextExtensions.xcodeproj
 
 
DTWebArchive @ dc2400e
DTWebArchive @ dc2400e
 
 
Other Sources
Other Sources
 
 
Resources
Resources
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
Readme.markdown
Readme.markdown
 
 
UnitTest-Info.plist
UnitTest-Info.plist
 
 

Repository files navigation

NSAttributedString HTML Additions

This project aims to duplicate the methods present on Mac OSX which allow creation of NSAttributedString from HTML code on iOS.

This is useful for drawing simple rich text like any HTML document without having to use a UIWebView.

Please read the Q&A.

Your help is much appreciated. Please send pull requests for useful additions you make or ask me what work is required.

If you find brief test cases where the created NSAttributedString differs from the version on OSX please send them to us!

Follow @cocoanetics on Twitter.

KNOWN ISSUES

CoreText has a problem prior to iOS 5 where it takes around a second on device to initialize its internal font lookup table. You have two workarounds available:

  • trigger the loading on a background thread like shown in http://www.cocoanetics.com/2011/04/coretext-loading-performance/
  • if you only use certain fonts then add the variants to the DTCoreTextFontOverrides.plist, this speeds up the finding of a specific font face from the font family

Some combinations of fonts and unusual list types cause an extra space to appear. e.g. 20 px Courier + Circle

About

Methods to allow using HTML code with CoreText

Resources

Readme
BSD-2-Clause license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.