mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 09:21:22 +00:00
When steping forward at the end of the glyph runs, correctly handle the case where the current run is extended.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16345 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
60c44310e2
commit
74704f51e3
3 changed files with 25 additions and 24 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-04-03 20:28 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Headers/gnustep/gui/GSLayoutManager_internal.h,
|
||||||
|
Source/GSLayoutManager.m: When stepping forward at the end of the
|
||||||
|
glyph runs, correctly handle the case where the current run is
|
||||||
|
extended.
|
||||||
|
|
||||||
2003-04-02 15:26 Alexander Malmberg <alexander@malmberg.org>
|
2003-04-02 15:26 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/GSHorizontalTypesetter.m: Tweak glyph caching parameters
|
* Source/GSHorizontalTypesetter.m: Tweak glyph caching parameters
|
||||||
|
|
|
@ -246,18 +246,23 @@ the last run and i==r->head.glyph_length. */
|
||||||
#define GLYPH_STEP_FORWARD(r, i, pos, cpos) \
|
#define GLYPH_STEP_FORWARD(r, i, pos, cpos) \
|
||||||
{ \
|
{ \
|
||||||
i++; \
|
i++; \
|
||||||
while (i==r->head.glyph_length) \
|
while (i == r->head.glyph_length) \
|
||||||
{ \
|
{ \
|
||||||
if (!r->head.next || !r->head.next->complete) \
|
if (!r->head.next || !r->head.next->complete) \
|
||||||
{ \
|
{ \
|
||||||
if (cpos+r->head.char_length==[_textStorage length]) \
|
if (cpos + r->head.char_length == [_textStorage length]) \
|
||||||
break; \
|
break; \
|
||||||
[self _generateGlyphsUpToCharacter: cpos+r->head.char_length]; \
|
/* This call might lead to the current run being extended, so \
|
||||||
|
we make sure that we check r->head.glyph_length again. */ \
|
||||||
|
[self _generateGlyphsUpToCharacter: cpos + r->head.char_length]; \
|
||||||
|
} \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
pos += r->head.glyph_length; \
|
||||||
|
cpos += r->head.char_length; \
|
||||||
|
r = (glyph_run_t *)r->head.next; \
|
||||||
|
i = 0; \
|
||||||
} \
|
} \
|
||||||
pos+=r->head.glyph_length; \
|
|
||||||
cpos+=r->head.char_length; \
|
|
||||||
r=(glyph_run_t *)r->head.next; \
|
|
||||||
i=0; \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ static glyph_run_t *run_insert(glyph_run_head_t **context)
|
||||||
pos += new->head.char_length;
|
pos += new->head.char_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [self _glyphDumpRuns];
|
[self _sanityChecks];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -858,22 +858,11 @@ static glyph_run_t *run_insert(glyph_run_head_t **context)
|
||||||
cadj = cpos;
|
cadj = cpos;
|
||||||
while (r2->glyphs[i].char_offset + cadj == j)
|
while (r2->glyphs[i].char_offset + cadj == j)
|
||||||
{
|
{
|
||||||
i++;
|
GLYPH_STEP_FORWARD(r2,i,adj,cadj)
|
||||||
while (i == r2->head.glyph_length)
|
if (i==r2->head.glyph_length)
|
||||||
{
|
{
|
||||||
if (!r2->head.next || !r2->head.next->complete)
|
last = cadj + r2->head.char_length;
|
||||||
{
|
goto found;
|
||||||
if (cadj + r2->head.char_length == [_textStorage length])
|
|
||||||
{
|
|
||||||
last = cadj + r2->head.char_length;
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
[self _generateGlyphsUpToCharacter: cadj + r2->head.char_length];
|
|
||||||
}
|
|
||||||
adj += r2->head.glyph_length;
|
|
||||||
cadj += r2->head.char_length;
|
|
||||||
r2 = (glyph_run_t *)r2->head.next;
|
|
||||||
i = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last = r2->glyphs[i].char_offset + cadj;
|
last = r2->glyphs[i].char_offset + cadj;
|
||||||
|
@ -998,7 +987,7 @@ places where we switch.
|
||||||
*actualRange = range;
|
*actualRange = range;
|
||||||
|
|
||||||
|
|
||||||
// printf("range=(%i+%i) lengthChange=%i\n", range.location, range.length, lengthChange);
|
// printf("\n +++ range=(%i+%i) lengthChange=%i\n", range.location, range.length, lengthChange);
|
||||||
[self _sanityChecks];
|
[self _sanityChecks];
|
||||||
// [self _glyphDumpRuns];
|
// [self _glyphDumpRuns];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue