Lines 63-70
Link Here
|
63 |
void setCurrStreamPosition(le_int32 position); |
63 |
void setCurrStreamPosition(le_int32 position); |
64 |
void setCurrGlyphPositionAdjustment(const GlyphPositionAdjustment *adjustment); |
64 |
void setCurrGlyphPositionAdjustment(const GlyphPositionAdjustment *adjustment); |
65 |
void setCurrGlyphBaseOffset(le_int32 baseOffset); |
65 |
void setCurrGlyphBaseOffset(le_int32 baseOffset); |
66 |
void adjustCurrGlyphPositionAdjustment(float xPlacmentAdjust, float yPlacementAdjust, |
66 |
void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, |
67 |
float xAdvanceAdjust, float yAdvanceAdjust); |
67 |
float xAdvanceAdjust, float yAdvanceAdjust); |
|
|
68 |
|
69 |
void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, |
70 |
float xAdvanceAdjust, float yAdvanceAdjust); |
68 |
|
71 |
|
69 |
void setCursiveFirstExitPoint(); |
72 |
void setCursiveFirstExitPoint(); |
70 |
void resetCursiveLastExitPoint(); |
73 |
void resetCursiveLastExitPoint(); |
Lines 326-331
Link Here
|
326 |
glyphPositionAdjustments[position].adjustYAdvance(yAdvanceAdjust); |
326 |
glyphPositionAdjustments[position].adjustYAdvance(yAdvanceAdjust); |
327 |
} |
327 |
} |
328 |
|
328 |
|
|
|
329 |
void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, |
330 |
float xAdvanceAdjust, float yAdvanceAdjust) |
331 |
{ |
332 |
if (direction < 0) { |
333 |
if (position <= nextLimit || position >= prevLimit) { |
334 |
return; |
335 |
} |
336 |
} else { |
337 |
if (position <= prevLimit || position >= nextLimit) { |
338 |
return; |
339 |
} |
340 |
} |
341 |
|
342 |
glyphPositionAdjustments[position].setXPlacement(xPlacementAdjust); |
343 |
glyphPositionAdjustments[position].setYPlacement(yPlacementAdjust); |
344 |
glyphPositionAdjustments[position].setXAdvance(xAdvanceAdjust); |
345 |
glyphPositionAdjustments[position].setYAdvance(yAdvanceAdjust); |
346 |
} |
347 |
|
329 |
void GlyphIterator::setCursiveFirstExitPoint() |
348 |
void GlyphIterator::setCursiveFirstExitPoint() |
330 |
{ |
349 |
{ |
331 |
if (direction < 0) { |
350 |
if (direction < 0) { |
Lines 83-96
Link Here
|
83 |
glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); |
83 |
glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); |
84 |
|
84 |
|
85 |
if (glyphIterator->isRightToLeft()) { |
85 |
if (glyphIterator->isRightToLeft()) { |
86 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
86 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
87 |
} else { |
87 |
} else { |
88 |
LEPoint baseAdvance; |
88 |
LEPoint baseAdvance; |
89 |
|
89 |
|
90 |
fontInstance->getGlyphAdvance(baseGlyph, pixels); |
90 |
fontInstance->getGlyphAdvance(baseGlyph, pixels); |
91 |
fontInstance->pixelsToUnits(pixels, baseAdvance); |
91 |
fontInstance->pixelsToUnits(pixels, baseAdvance); |
92 |
|
92 |
|
93 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); |
93 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); |
94 |
} |
94 |
} |
95 |
|
95 |
|
96 |
return 1; |
96 |
return 1; |
Lines 89-102
Link Here
|
89 |
glyphIterator->setCurrGlyphBaseOffset(ligatureIterator.getCurrStreamPosition()); |
89 |
glyphIterator->setCurrGlyphBaseOffset(ligatureIterator.getCurrStreamPosition()); |
90 |
|
90 |
|
91 |
if (glyphIterator->isRightToLeft()) { |
91 |
if (glyphIterator->isRightToLeft()) { |
92 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
92 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
93 |
} else { |
93 |
} else { |
94 |
LEPoint ligatureAdvance; |
94 |
LEPoint ligatureAdvance; |
95 |
|
95 |
|
96 |
fontInstance->getGlyphAdvance(ligatureGlyph, pixels); |
96 |
fontInstance->getGlyphAdvance(ligatureGlyph, pixels); |
97 |
fontInstance->pixelsToUnits(pixels, ligatureAdvance); |
97 |
fontInstance->pixelsToUnits(pixels, ligatureAdvance); |
98 |
|
98 |
|
99 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY); |
99 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY); |
100 |
} |
100 |
} |
101 |
|
101 |
|
102 |
return 1; |
102 |
return 1; |
Lines 76-89
Link Here
|
76 |
glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); |
76 |
glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); |
77 |
|
77 |
|
78 |
if (glyphIterator->isRightToLeft()) { |
78 |
if (glyphIterator->isRightToLeft()) { |
79 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
79 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); |
80 |
} else { |
80 |
} else { |
81 |
LEPoint mark2Advance; |
81 |
LEPoint mark2Advance; |
82 |
|
82 |
|
83 |
fontInstance->getGlyphAdvance(mark2Glyph, pixels); |
83 |
fontInstance->getGlyphAdvance(mark2Glyph, pixels); |
84 |
fontInstance->pixelsToUnits(pixels, mark2Advance); |
84 |
fontInstance->pixelsToUnits(pixels, mark2Advance); |
85 |
|
85 |
|
86 |
glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY); |
86 |
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY); |
87 |
} |
87 |
} |
88 |
|
88 |
|
89 |
return 1; |
89 |
return 1; |