0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0136

This commit is contained in:
Bram Moolenaar
2005-08-24 22:16:11 +00:00
parent 5bcb2eba3d
commit 6e7c7f3a19
12 changed files with 162 additions and 59 deletions

View File

@@ -5328,6 +5328,9 @@ not_ascii:
int cluster_width;
int last_glyph_rbearing;
int cells = 0; /* cells occupied by current cluster */
#if 0
int monospace13 = STRICMP(p_guifont, "monospace 13") == 0;
#endif
/* Safety check: pango crashes when invoked with invalid utf-8
* characters. */
@@ -5446,10 +5449,17 @@ not_ascii:
* characters the canonical way. That is, setting the
* width of the previous glyph to 0. */
glyphs->glyphs[i - 1].geometry.width = 0;
width = cells * gui.char_width * PANGO_SCALE;
glyph->geometry.x_offset +=
MAX(0, width - cluster_width) / 2;
#if 0
/* Dirty hack: for "monospace 13" font there is a bug that
* draws composing chars in the wrong position. Add
* "width" to the offset to work around that. */
if (monospace13)
glyph->geometry.x_offset = width;
#endif
glyph->geometry.width = width;
}
else /* i == 0 "cannot happen" */