Revision: 7220
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7220&view=rev
Author:   hofman
Date:     2011-05-04 17:23:21 +0000 (Wed, 04 May 2011)

Log Message:
-----------
fix font attributes after changing, don't need longest effective range

Modified Paths:
--------------
    trunk/PDFDisplayView_SKExtensions.m

Modified: trunk/PDFDisplayView_SKExtensions.m
===================================================================
--- trunk/PDFDisplayView_SKExtensions.m 2011-05-04 11:46:05 UTC (rev 7219)
+++ trunk/PDFDisplayView_SKExtensions.m 2011-05-04 17:23:21 UTC (rev 7220)
@@ -129,15 +129,14 @@
                 NSUInteger i = 0, l = [mutableAttrString length];
                 NSRange range;
                 while (i < l) {
-                    NSFont *font = [mutableAttrString 
attribute:NSFontAttributeName atIndex:i longestEffectiveRange:&range 
inRange:NSMakeRange(i, l - i)];
+                    NSFont *font = [mutableAttrString 
attribute:NSFontAttributeName atIndex:i effectiveRange:&range];
                     if (font) {
                         font = [[NSFontManager sharedFontManager] 
convertFont:font toSize:round(scale * [font pointSize])];
                         [mutableAttrString addAttribute:NSFontAttributeName 
value:font range:range];
-                        i = NSMaxRange(range);
-                    } else {
-                        i++;
                     }
+                    i = NSMaxRange(range);
                 }
+                [mutableAttrString fixFontAttributeInRange:NSMakeRange(0, l)];
                 attributedString = mutableAttrString;
             }
         }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to