[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src w32uniscribe.c
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] emacs/src w32uniscribe.c |
Date: |
Thu, 11 Dec 2008 13:01:23 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 08/12/11 13:01:23
Modified files:
src : w32uniscribe.c
Log message:
(uniscribe_encode_char): Increase glyph buffer size for surrogates.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/w32uniscribe.c?cvsroot=emacs&r1=1.27&r2=1.28
Patches:
Index: w32uniscribe.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32uniscribe.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- w32uniscribe.c 23 Nov 2008 15:06:44 -0000 1.27
+++ w32uniscribe.c 11 Dec 2008 13:01:22 -0000 1.28
@@ -490,13 +490,16 @@
if (SUCCEEDED (ScriptItemize (ch, len, 2, NULL, NULL, items, &nitems)))
{
HRESULT result;
- /* Some Indic characters result in more than 1 glyph. */
- WORD glyphs[1], clusters[1];
- SCRIPT_VISATTR attrs[1];
+ /* Surrogates seem to need 2 here, even though only one glyph is
+ returned. Indic characters can also produce 2 or more glyphs for
+ a single code point, but they need to use uniscribe_shape
+ above for correct display. */
+ WORD glyphs[2], clusters[2];
+ SCRIPT_VISATTR attrs[2];
int nglyphs;
result = ScriptShape (context, &(uniscribe_font->cache),
- ch, len, 1, &(items[0].a),
+ ch, len, 2, &(items[0].a),
glyphs, clusters, attrs, &nglyphs);
if (result == E_PENDING)
- [Emacs-diffs] emacs/src w32uniscribe.c,
Jason Rumney <=