Line
Link Here
|
0 |
-- a/vcl/source/glyphs/graphite_layout.cxx |
0 |
++ b/vcl/source/glyphs/graphite_layout.cxx |
Lines 806-814
int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) c
Link Here
|
806 |
// (sometimes graphite doesn't seem to realise this!) |
806 |
// (sometimes graphite doesn't seem to realise this!) |
807 |
if (targetWidth > mnWidth) |
807 |
if (targetWidth > mnWidth) |
808 |
return STRING_LEN; |
808 |
return STRING_LEN; |
809 |
//int nBreak = mpSegment->findNextBreakPoint(mnMinCharPos, |
|
|
810 |
// gr::klbWordBreak, gr::klbLetterBreak, targetWidth, &width); |
811 |
|
809 |
|
|
|
810 |
#if 1 |
811 |
float fBreakWidth = 0; |
812 |
gr::RangeSegment aSegment( (gr::Font*)&mrFont, mpTextSrc, const_cast<gr::LayoutEnvironment*>(&maLayout), mnMinCharPos, mnEndCharPos ); |
813 |
int nBreak = aSegment.findNextBreakPoint( mnMinCharPos, |
814 |
gr::klbLetterBreak, gr::klbLetterBreak, targetWidth, &fBreakWidth ); |
815 |
#else |
812 |
// LineFillSegment seems to give better results that findNextBreakPoint |
816 |
// LineFillSegment seems to give better results that findNextBreakPoint |
813 |
// though it may be slower |
817 |
// though it may be slower |
814 |
gr::LayoutEnvironment aLE; |
818 |
gr::LayoutEnvironment aLE; |
Lines 816-821
int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) c
Link Here
|
816 |
mnMinCharPos, mpTextSrc->getContextLength(), |
820 |
mnMinCharPos, mpTextSrc->getContextLength(), |
817 |
targetWidth); |
821 |
targetWidth); |
818 |
int nBreak = lineSeg.stopCharacter(); |
822 |
int nBreak = lineSeg.stopCharacter(); |
|
|
823 |
#endif |
819 |
|
824 |
|
820 |
if (nBreak > mnEndCharPos) nBreak = STRING_LEN; |
825 |
if (nBreak > mnEndCharPos) nBreak = STRING_LEN; |
821 |
else if (nBreak < mnMinCharPos) nBreak = mnMinCharPos; |
826 |
else if (nBreak < mnMinCharPos) nBreak = mnMinCharPos; |