aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32font.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/w32font.c b/src/w32font.c
index 380bead2e74..9fdda5d7a5e 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -292,6 +292,8 @@ w32font_has_char (entity, c)
292 return -1; 292 return -1;
293 293
294 supported_scripts = assq_no_quit (QCscript, extra); 294 supported_scripts = assq_no_quit (QCscript, extra);
295 /* If font doesn't claim to support any scripts, then we can't be certain
296 until we open it. */
295 if (!CONSP (supported_scripts)) 297 if (!CONSP (supported_scripts))
296 return -1; 298 return -1;
297 299
@@ -299,7 +301,16 @@ w32font_has_char (entity, c)
299 301
300 script = CHAR_TABLE_REF (Vchar_script_table, c); 302 script = CHAR_TABLE_REF (Vchar_script_table, c);
301 303
302 return (memq_no_quit (script, supported_scripts)) ? -1 : 0; 304 /* If we don't know what script the character is from, then we can't be
305 certain until we open it. Also if the font claims support for the script
306 the character is from, it may only have partial coverage, so we still
307 can't be certain until we open the font. */
308 if (NILP (script) || memq_no_quit (script, supported_scripts))
309 return -1;
310
311 /* Font reports what scripts it supports, and none of them are the script
312 the character is from, so it is a definite no. */
313 return 0;
303} 314}
304 315
305/* w32 implementation of encode_char for font backend. 316/* w32 implementation of encode_char for font backend.