File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1037,19 +1037,16 @@ - (void)batchDrawData:(NSData *)data
10371037gatherGlyphs (CGGlyph glyphs[], UniCharCount count)
10381038{
10391039 // Gather scattered glyphs that was happended by Surrogate pair chars
1040- UniCharCount glyphLength = 0 ;
1041- NSUInteger pos = NSIntegerMax ;
1040+ UniCharCount glyphCount = 0 ;
1041+ NSUInteger pos = 0 ;
10421042 NSUInteger i;
10431043 for (i = 0 ; i < count; ++i) {
1044- if (glyphs[i] == 0 ) {
1045- pos = i;
1046- } else {
1047- ++glyphLength;
1048- if (pos != NSIntegerMax)
1049- glyphs[pos++] = glyphs[i];
1044+ if (glyphs[i] != 0 ) {
1045+ ++glyphCount;
1046+ glyphs[pos++] = glyphs[i];
10501047 }
10511048 }
1052- return glyphLength ;
1049+ return glyphCount ;
10531050}
10541051
10551052 static void
You can’t perform that action at this time.
0 commit comments