title: Concatenated NSAttributedString not rendering with correct formatting
body: <p>I render a chunk of text in a <code>NSAttributedString</code>, already formatted with attributes that render correctly, into a multicolumn, multipage format using TextKit as follows:</p>
  
  <pre><code>NSUInteger lastRenderedGlyph = 0;
  CGFloat currentXOffset = 0;
  
  float width = screenDimensions.size.width;
  float height = screenDimensions.size.height;
  
  NSInteger columnCount = 1;
  NSInteger pageCount = 1;
  NSInteger counter = 1;
  self.storage = [[NSTextStorage alloc] initWithAttributedString:self.attrString];
  self.manager = [[NSLayoutManager alloc] init];
  [self.manager setAllowsNonContiguousLayout:YES];
  [self.storage addLayoutManager:self.manager];
  
  // loop through glyphs and layout text in multicolumn, multipage layout
  while (lastRenderedGlyph &lt; self.manager.numberOfGlyphs) {
  
      if (columnCount == 3)
      {
          columnCount = 1;
          pageCount++;
      }
      float textViewFrame_y = 10.0;
      float textViewFrame_height = height - 70.0;
  
      CGRect textViewFrame = CGRectMake(currentXOffset, textViewFrame_y,
                                        width / 2,
                                        textViewFrame_height);
      CGSize columnSize = CGSizeMake(CGRectGetWidth(textViewFrame) - 20,
                                     CGRectGetHeight(textViewFrame) - 10);
  
      // Create text container for the column
      NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:columnSize];
  
      // add text container to the layout manager
      [self.manager addTextContainer:textContainer];
  
      // create the UITextView for this column        
      UITextView *textView = [[UITextView alloc] initWithFrame:textViewFrame
                                                 textContainer:textContainer];
  
      textView.font = [UIFont fontWithName:@"Georgia" size:currentFontSize];    
      textView.scrollEnabled = NO;
      textView.editable = NO;
      textView.dataDetectorTypes = UIDataDetectorTypeAll;
      textView.delegate = self;
      textView.selectable = YES;
  
      // Add the UITextView to the scrollview/page
      [self.scrollView addSubview:textView];
  
      // Increase the current offset so we know where to put the next column
      currentXOffset += CGRectGetWidth(textViewFrame);
  
      counter++;
      columnCount ++;
  
      // And find the index of the glyph we've just rendered
      lastRenderedGlyph = NSMaxRange([self.manager  glyphRangeForTextContainer:textView.textContainer]);
  }
  </code></pre>
  
  <p>Prior to doing this, however, I need to add two additional attributed strings into the existing <code>NSAttributedString</code> (<code>self.attrString</code> in this example), as follows:</p>
  
  <pre><code>UIFont *font_title = [UIFont fontWithName:@"Georgia" size:defaultFontSize+title_delta];
  NSDictionary *attributes_title = [NSDictionary dictionaryWithObject:font_title forKey:NSFontAttributeName];
  
  UIFont *font_author = [UIFont fontWithName:@"Georgia" size:authorFontSize];
  NSDictionary *attributes_author = [NSDictionary dictionaryWithObject:font_author forKey:NSFontAttributeName];
  
  // title attributed string
  NSString *fullTitle = [NSString stringWithFormat:@"%@%@",@"Moby Dick",@"\n"];
  
  NSMutableAttributedString *mainTitleAttributed = [[NSMutableAttributedString alloc] initWithString:fullTitle attributes:attributes_title];
  
  // author attributed string
  NSString *fullAuthor = [NSString stringWithFormat:@"%@%@", @"Herman Melville", @"\n"];
  NSMutableAttributedString *authorAttributed = [[NSMutableAttributedString alloc] initWithString:fullAuthor attributes:attributes_author];
  
  // put it all together
  [self.attrString insertAttributedString:authorAttributed atIndex:0];
  [self.attrString insertAttributedString:mainTitleAttributed atIndex:0];
  </code></pre>
  
  <p>When I review the contents of the attributed string that results, I get the following:</p>
  
  <blockquote>
    <p>Moby Dick {NSFont = " font-family: \"Georgia\";
    font-weight: normal; font-style:     normal; font-size:
    28.00pt";}Herman Melville{NSFont = " font-family: \"Georgia\"; font-weight: normal; font-style: normal; font-size:
    12.00pt"; }Lorem ipsum dolor et {
        NSColor = "UIDeviceWhiteColorSpace 0 1";
        NSFont = " font-family: \"Times New Roman\"; font-weight: normal; font-style: normal; font-size: 12.00pt";
        NSParagraphStyle = "Alignment 4, LineSpacing 0, ParagraphSpacing 12, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0,
    FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0,
    LineBreakMode 0, Tabs (\n    28L,\n    56L,\n    84L,\n    112L,\n<br>
    140L,\n    168L,\n    196L,\n    224L,\n    252L,\n    280L,\n<br>
    308L,\n    336L\n), DefaultTabInterval 36, Blocks (null), Lists
    (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor
    0, HeaderLevel 0"; }more lorem ipsum etc etc...</p>
  </blockquote>
  
  <p>i.e. it looks like the attributes have been added correctly. However, when this is rendered using TextKit (see the first chunk of code), the text size and different font of the merged text components (the title and author in this example) fail to render as such, and simply get assigned the same basic attributes as the following text. </p>
  
  <p>If, instead of using TextKit, I create a single UITextView and render the <code>NSAttributedString</code> directly into that view (i.e. not using a <code>NSLayoutManager</code>, etc), the font and size differences in the inserted attributed strings DO render correctly.</p>
  
  <p>My question: why does the added text fail to render correctly when using TextKit, but not when working directly with a UITextView? I need to work with TextKit for its multicolumn and exclusion path support.</p>