summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorRichard Hughes <cyreve@gmail.com>2007-03-09 20:09:37 +0000
committercyreve <cyreve@users.sourceforge.net>2007-03-09 20:09:37 +0000
commit17ae7fba34caa630dc2a50483ab05cfad3d7bb72 (patch)
tree576f92d2d22ad199c3294f7de73251f2bd330704 /src/libnrtype
parentAdd some code cleanup (diff)
downloadinkscape-17ae7fba34caa630dc2a50483ab05cfad3d7bb72.tar.gz
inkscape-17ae7fba34caa630dc2a50483ab05cfad3d7bb72.zip
roll back a part of revision 12016, in an attempt to fix bug 1496718
(bzr r2592)
Diffstat (limited to 'src/libnrtype')
-rwxr-xr-xsrc/libnrtype/Layout-TNG-Compute.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp
index dfbc282c8..c1897e066 100755
--- a/src/libnrtype/Layout-TNG-Compute.cpp
+++ b/src/libnrtype/Layout-TNG-Compute.cpp
@@ -832,10 +832,12 @@ void Layout::Calculator::_buildPangoItemizationForPara(ParagraphInfo *para) cons
} else if (_flow._input_stream[input_index]->Type() == TEXT_SOURCE) {
Layout::InputStreamTextSource *text_source = static_cast<Layout::InputStreamTextSource *>(_flow._input_stream[input_index]);
- PangoFontDescription *temp_descr = text_source->styleGetFontDescription();
- PangoAttribute *attribute_font_description = pango_attr_font_desc_new(temp_descr);
- pango_font_description_free(temp_descr);
+ // create the font_instance
+ font_instance *font = text_source->styleGetFontInstance();
+ if (font == NULL)
+ continue; // bad news: we'll have to ignore all this text because we know of no font to render it
+ PangoAttribute *attribute_font_description = pango_attr_font_desc_new(font->descr);
attribute_font_description->start_index = para_text.bytes();
para_text.append(&*text_source->text_begin.base(), text_source->text_length); // build the combined text
attribute_font_description->end_index = para_text.bytes();