diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 453c61bbbb2..10fd86ad62c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-12-11 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32uniscribe.c (uniscribe_encode_char): Increase glyph buffer | ||
| 4 | size for surrogates. | ||
| 5 | |||
| 1 | 2008-12-11 Juanma Barranquero <lekktu@gmail.com> | 6 | 2008-12-11 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * w32proc.c (Fw32_get_locale_info): Decode long form of locale name. | 8 | * w32proc.c (Fw32_get_locale_info): Decode long form of locale name. |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 25224302247..12870129776 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -490,13 +490,16 @@ uniscribe_encode_char (font, c) | |||
| 490 | if (SUCCEEDED (ScriptItemize (ch, len, 2, NULL, NULL, items, &nitems))) | 490 | if (SUCCEEDED (ScriptItemize (ch, len, 2, NULL, NULL, items, &nitems))) |
| 491 | { | 491 | { |
| 492 | HRESULT result; | 492 | HRESULT result; |
| 493 | /* Some Indic characters result in more than 1 glyph. */ | 493 | /* Surrogates seem to need 2 here, even though only one glyph is |
| 494 | WORD glyphs[1], clusters[1]; | 494 | returned. Indic characters can also produce 2 or more glyphs for |
| 495 | SCRIPT_VISATTR attrs[1]; | 495 | a single code point, but they need to use uniscribe_shape |
| 496 | above for correct display. */ | ||
| 497 | WORD glyphs[2], clusters[2]; | ||
| 498 | SCRIPT_VISATTR attrs[2]; | ||
| 496 | int nglyphs; | 499 | int nglyphs; |
| 497 | 500 | ||
| 498 | result = ScriptShape (context, &(uniscribe_font->cache), | 501 | result = ScriptShape (context, &(uniscribe_font->cache), |
| 499 | ch, len, 1, &(items[0].a), | 502 | ch, len, 2, &(items[0].a), |
| 500 | glyphs, clusters, attrs, &nglyphs); | 503 | glyphs, clusters, attrs, &nglyphs); |
| 501 | 504 | ||
| 502 | if (result == E_PENDING) | 505 | if (result == E_PENDING) |