mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-01 08:17:38 +00:00
* nsfont.m (INVALID_GLYPH): New define.
(nsfont_encode_char): Use INVALID_GLYPH. (ns_uni_to_glyphs): Ditto, check for NSNullGlyph. Fixes: debbugs:15138
This commit is contained in:
parent
88527bc0a2
commit
0ce9f6de64
@ -1,3 +1,9 @@
|
||||
2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* nsfont.m (INVALID_GLYPH): New define.
|
||||
(nsfont_encode_char): Use INVALID_GLYPH.
|
||||
(ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
|
||||
|
||||
2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* xterm.c (x_last_mouse_movement_time): Revert last change.
|
||||
|
@ -61,6 +61,7 @@ static void ns_uni_to_glyphs (struct nsfont_info *font_info,
|
||||
static void ns_glyph_metrics (struct nsfont_info *font_info,
|
||||
unsigned char block);
|
||||
|
||||
#define INVALID_GLYPH 0xFFFF
|
||||
|
||||
/* ==========================================================================
|
||||
|
||||
@ -981,7 +982,7 @@ that causes need for cache in nsfont_open () */
|
||||
ns_uni_to_glyphs (font_info, high);
|
||||
|
||||
g = font_info->glyphs[high][low];
|
||||
return g == 0xFFFF ? FONT_INVALID_CODE : g;
|
||||
return g == INVALID_GLYPH ? FONT_INVALID_CODE : g;
|
||||
}
|
||||
|
||||
|
||||
@ -1354,8 +1355,8 @@ is false when (FROM > 0 || TO < S->nchars). */
|
||||
#else
|
||||
g = glyphStorage->cglyphs[i];
|
||||
/* TODO: is this a good check? maybe need to use coveredChars.. */
|
||||
if (g > numGlyphs)
|
||||
g = 0xFFFF; /* hopefully unused... */
|
||||
if (g > numGlyphs || g == NSNullGlyph)
|
||||
g = INVALID_GLYPH; /* hopefully unused... */
|
||||
#endif
|
||||
*glyphs = g;
|
||||
}
|
||||
@ -1483,7 +1484,7 @@ - (void)insertGlyphs: (const NSGlyph *)glyphs length: (NSUInteger)length
|
||||
characterIndex: (NSUInteger)charIndex
|
||||
{
|
||||
len = glyphIndex+length;
|
||||
for (i =glyphIndex; i<len; i++)
|
||||
for (i =glyphIndex; i<len; i++)
|
||||
cglyphs[i] = glyphs[i-glyphIndex];
|
||||
if (len > maxGlyph)
|
||||
maxGlyph = len;
|
||||
|
Loading…
Reference in New Issue
Block a user