| 656 | | static UniCharArrayOffset BreakOneLineSpan(ATSUTextLayout layout, SubRenderDiv *div, TextBreakLocatorRef breakLocator, |
|---|
| 657 | | ATSLayoutRecord *records, ItemCount lineLen, Fixed idealLineWidth, Fixed originalLineWidth, Fixed maximumLineWidth, unsigned numBreaks, unichar *uline) |
|---|
| | 656 | static UniCharArrayOffset BreakOneLineSpan(ATSUTextLayout layout, SubRenderDiv *div, unsigned char *breakOpportunities, |
|---|
| | 657 | ATSLayoutRecord *records, ItemCount lineLen, Fixed idealLineWidth, Fixed originalLineWidth, Fixed maximumLineWidth, unsigned numBreaks) |
|---|
| 663 | | declare_bitfield(breakOpportunities, lineLen); |
|---|
| 664 | | |
|---|
| 665 | | FindAllPossibleLineBreaks(breakLocator, uline, lineLen, breakOpportunities); |
|---|
| 666 | | |
|---|
| 667 | | #if 0 |
|---|
| 668 | | { |
|---|
| 669 | | NSMutableString *nss = [NSMutableString string]; |
|---|
| 670 | | int i; |
|---|
| 671 | | |
|---|
| 672 | | for (i = 0; i < [div->text length]; i++) { |
|---|
| 673 | | if (bitfield_test(breakOpportunities, i)) |
|---|
| 674 | | [nss appendFormat:@"%c", '|']; |
|---|
| 675 | | |
|---|
| 676 | | [nss appendFormat:@"%C", [div->text characterAtIndex:i]]; |
|---|
| 677 | | } |
|---|
| 678 | | |
|---|
| 679 | | NSLog(@"breaks (div): \"%@\"", nss); |
|---|
| 680 | | } |
|---|
| 681 | | |
|---|
| 682 | | { |
|---|
| 683 | | NSMutableString *nss = [NSMutableString string]; |
|---|
| 684 | | int i; |
|---|
| 685 | | |
|---|
| 686 | | for (i = 0; i < lineLen; i++) { |
|---|
| 687 | | if (bitfield_test(breakOpportunities, i)) |
|---|
| 688 | | [nss appendFormat:@"%c", '|']; |
|---|
| 689 | | |
|---|
| 690 | | [nss appendFormat:@"%C", uline[i]]; |
|---|
| 691 | | } |
|---|
| 692 | | |
|---|
| 693 | | NSLog(@"breaks (uline): \"%@\"", nss); |
|---|
| 694 | | } |
|---|
| 695 | | #endif |
|---|
| 696 | | |
|---|
| | 663 | |
|---|
| 765 | | UniCharArrayOffset res = BreakOneLineSpan(layout, div, breakLocator, records, numRecords, idealBreakWidth, fixLineWidth, breakingWidth, idealSplitLines-1, &utext[thisBreak]); |
|---|
| | 734 | UniCharArrayOffset res = BreakOneLineSpan(layout, div, breakOpportunities, records, numRecords, idealBreakWidth, fixLineWidth, breakingWidth, idealSplitLines-1); |
|---|