projects
/
platform
/
upstream
/
pango.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ded299c
)
Guard for an accumulated glyph count of zero in CoreText shape engine
author
Kristian Rietveld
<kris@lanedo.com>
Sun, 18 Mar 2012 09:40:50 +0000
(10:40 +0100)
committer
Kristian Rietveld
<kris@lanedo.com>
Sun, 18 Mar 2012 09:41:41 +0000
(10:41 +0100)
modules/basic/basic-coretext.c
patch
|
blob
|
history
diff --git
a/modules/basic/basic-coretext.c
b/modules/basic/basic-coretext.c
index
baacec6
..
edbef40
100644
(file)
--- a/
modules/basic/basic-coretext.c
+++ b/
modules/basic/basic-coretext.c
@@
-225,7
+225,15
@@
run_iterator_create (struct RunIterator *iter,
iter->total_ct_i = 0;
iter->glyph_count = run_iterator_get_glyph_count (iter);
- run_iterator_set_current_run (iter, 0);
+
+ /* If CoreText did not render any glyphs for this string (can happen,
+ * e.g. a run solely consisting of a BOM), glyph_count will be zero and
+ * we immediately set the iterator variable to indicate end of glyph list.
+ */
+ if (iter->glyph_count > 0)
+ run_iterator_set_current_run (iter, 0);
+ else
+ iter->total_ct_i = -1;
}
static void