Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: vtns/FontLabel
base: master
...
head fork: booyah/FontLabel
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Sep 23, 2009
@kballard kballard Implement a new class ZAttributedString 317a7f2
@kballard kballard Start implementing attributed string drawing 7ad1433
Commits on Sep 27, 2009
@kballard kballard Start adding unit tests
Fix a few bugs found by these unit tests already.
52b3b8b
Commits on Oct 01, 2009
@kballard kballard Fix -attributedSubstringFromRange: dbc9ae1
@kballard kballard Add more tests and fix a few more bugs ba3250f
@kballard kballard Implement a couple more tests 19ed387
@kballard kballard Add test for -removeAttribute:range: 202a9e0
@kballard kballard Add +[ZFont fontWithUIFont:] c2fdaef
Commits on Oct 04, 2009
@kballard kballard Add URL-based font loading methods (fixes #7)
FontManager can now load ZFont objects from any arbitrary file URL.
The old name-based methods still work, but are translated to URLs internally.
059b55e
Commits on Oct 05, 2009
@kballard kballard Speed up mapping of format 12 glyphs by 22000% percent (fixes #6)
Use a hinted binary search heuristic to locate the glyph segments
in the format 12 cmap table instead of a linear search.
74c4115
@kballard kballard Rewrite the text layout algorithm to take attribute runs into account 4483454
@kballard kballard Add drawing methods that allow for numberOfLines
Standardize newline-to-space conversion to happen when numberOfLines
is given and is equal to 1.
e780cfe
@kballard kballard Obey the numberOfLines property again 8f7f222
@kballard kballard Fix an issue with truncation at a space character 789fe6a
@kballard kballard Fix some bugs with drawing multiple-run attributed strings 5f04458
@kballard kballard Add the attributedText property to FontLabel aff7012
@kballard kballard Clean up the sample labels a bit and demo the new attributed string s…
…upport
5171d83
@kballard kballard Rename the attributedText property to zAttributedText
This should prevent any potential collisions if UIKit introduces attributed strings.
5885ff7
@kballard kballard Merge branch 'attributed'
* attributed:
  Rename the attributedText property to zAttributedText
  Clean up the sample labels a bit and demo the new attributed string support
  Add the attributedText property to FontLabel
  Fix some bugs with drawing multiple-run attributed strings
  Fix an issue with truncation at a space character
  Obey the numberOfLines property again
  Add drawing methods that allow for numberOfLines
  Rewrite the text layout algorithm to take attribute runs into account
  Add +[ZFont fontWithUIFont:]
  Add test for -removeAttribute:range:
  Implement a couple more tests
  Add more tests and fix a few more bugs
  Fix -attributedSubstringFromRange:
  Start adding unit tests
  Start implementing attributed string drawing
  Implement a new class ZAttributedString

Conflicts:
	FontLabel/Classes/FontLabel/FontLabelStringDrawing.m
66d77e1
@kballard kballard When calculating the ellipsis position, adjust font accordingly
If we move past a font change when calculating the position of the ellipsis,
recalculate the glyph/width for the ellipsis.
be0d8e4
@kballard kballard Update the README 99d11c6
@kballard kballard Fix a bug with wrapping of a single word too long to fit on a line 61621aa
@kballard kballard Skip spaces properly when word-wrapping 7ddaf7d
@kballard kballard Implement more intelligent word-wrapping behavior 7727cfb
@kballard kballard Implement support for highlighted/highlightedTextColor
The highlighted property is not yet observed for attributed string drawing
6f06733
@kballard kballard Implement support for FontLabel.highlighted with attributed string dr…
…awing
7a3159f
@kballard kballard Turn on new warning flags and fix the resulting warnings
Turn on warning flags that cocos2d-iphone appears to be using. This helps us
prevent warnings when FontLabel is used within cocos2d.
Also add a couple of missing UIKit #imports.
11807fc
@kballard kballard Make -[ZAttributedString copy] perform a -retain instead
ZAttributedStrings are immutable, so copying is unnecessary. Only do a
real copy when calling -copy on ZMutableAttributedString.
61cbd27
@kballard kballard Fix handling of CRLF sequences when rendering strings with numberOfLi…
…nes == 1
337f379
@kballard kballard Add missing #import <CoreGraphics/CoreGraphics.h> fa02fe6
Commits on Aug 07, 2010
@kballard kballard Fix compiler warnings about -initWithAttributedString:
I don't know why the compiler is warning about -initWithAttributedString:.
For some reason it is assuming that the result of +allocWithZone: is an
NSAttributedString instead of a ZAttributedString. Casting it squelches
the warning.
74bd2bd
Commits on Jan 17, 2011
@kballard kballard Mark a wrap point before processing the glyph instead of after
When we encounter the need to wrap, we backtrack to the last wrap point and
insert a line break. If we find the need to wrap while processing a space,
we end up backtracking to the previous space instead. By inserting a wrap
point before checking the line length, we can wrap right at the current
space instead.
7a89562
@kballard kballard Update SDKROOT to Latest iOS 96e3d0d
@kballard kballard Fix remaining compiler warning about -initWithAttributedString:
Fix the one compiler warning about -initWithAttributedString: in the
unit tests.
03194cb
Commits on Jul 01, 2011
@fluff fluff Missing category at runtime for static lib
There's a bug (misfeature?) in the iOS development kit that causes object files containing only categories to be skipped, when the file in question is built as a static library. This results in runtime errors, of course.

This quick fix defines an empty class, which is enough to force the linker to include the category when building the final executable.
0642650
@kballard kballard Merge pull request #22 from fluff/libstatic-category-missing-fix
Missing category at runtime for static lib
e68e3fe
Commits on Oct 05, 2011
Jon Parise More explicit ZAttributeRun* access.
Instead of indirectly accessing the `attributes` property through
NSArray accessors (which return `id`), help out stricter compilers by
explicitly using the `ZAttributeRun` type.  This also makes the code
slighly easier to read.
fbb1d94
Commits on Oct 27, 2011
Brian Chapados Merge pull request #24 from 'booyah/explicit-zattributeruns' into booyah 1ed376d
Brian Chapados Add an Xcode-compatible gitignore file 1bf15da
Brian Chapados Fix NSUInteger test for attribute range search
runIndex is an NSUInteger, and will never be < 0. Instead test that runIndex < NSNotFound.
This fixes a potential (unlikely) bug that could occur when searching
backwards from the current run index.
ae9ad95
Brian Chapados Update project for Xcode 4.2, add default workspace for project. f02ca28
Brian Chapados Merge pull request #26 from 'booyah/llvm3-xcode42' into booyah/booyah 1246651
Commits on Oct 28, 2011
Brian Chapados Expose an API for setting the kCGTextDrawingMode when drawing ZFonts.
The CGTextDrawingMode can now either be set explicitly for each call,
or, a cached default value can be set, which will be used for all
font drawing. The default mode is kCGTextFill.
c3d9145
Brian Chapados Add support for setting a cached NSCharacterSet that will be used for…
… font drawing.

Some fonts require addition characters, and since customized NSCharacterSets are expensive
to create, we support setting a statically cached object that will be used for drawing Z fonts.
cc97b1c
Brian Chapados Merge pull request #27 from 'booyah/drawing-mode' into booyah/booyah cf40a14