From c1ec4554bdcff69a4e633d79f83a5545452a5906 Mon Sep 17 00:00:00 2001 From: cyreve Date: Fri, 9 Mar 2007 20:09:37 +0000 Subject: [PATCH] roll back a part of revision 12016, in an attempt to fix bug 1496718 --- src/libnrtype/Layout-TNG-Compute.cpp | 8 +++++--- 1 file 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(_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(); -- 2.30.2