tags 487623 + patch tags 487623 + fixed-upstream thanks [EMAIL PROTECTED] scrisse:
> OK, please notify me via Debian's BTS if you have an update on that. > If I have problem in backporting it, I'll ask for help. Well, I've got no reply from Gail, so this patch will probably remain as is for some time. If you haven't yet backported the patch, you can find it attached here. > Thanks, > Wolfi Ciao, Luca -- .''`. ** Debian GNU/Linux ** | Luca Bruno (kaeso) : :' : The Universal O.S. | lucab (AT) debian.org `. `'` | GPG Key ID: 3BFB9FB3 `- http://www.debian.org | Debian GNU/Linux Developer
Index: src/libnrtype/FontFactory.cpp =================================================================== --- src/libnrtype/FontFactory.cpp (revisione 19753) +++ src/libnrtype/FontFactory.cpp (copia locale) @@ -821,7 +821,8 @@ res->Ref(); AddInCache(res); } - res->InitTheFace(); + if(res) + res->InitTheFace(); return res; } Index: src/libnrtype/Layout-TNG-Output.cpp =================================================================== --- src/libnrtype/Layout-TNG-Output.cpp (revisione 19753) +++ src/libnrtype/Layout-TNG-Output.cpp (copia locale) @@ -116,22 +116,24 @@ _getGlyphTransformMatrix(glyph_index, &glyph_matrix); NR::Matrix total_transform = glyph_matrix; total_transform *= transform; - NR::Maybe<NR::Rect> glyph_rect = _glyphs[glyph_index].span(this).font->BBox(_glyphs[glyph_index].glyph); - if (glyph_rect) { - NR::Point bmi = glyph_rect->min(), bma = glyph_rect->max(); - NR::Point tlp(bmi[0],bmi[1]), trp(bma[0],bmi[1]), blp(bmi[0],bma[1]), brp(bma[0],bma[1]); - tlp *= total_transform; - trp *= total_transform; - blp *= total_transform; - brp *= total_transform; - *glyph_rect = NR::Rect(tlp,trp); - glyph_rect->expandTo(blp); - glyph_rect->expandTo(brp); - if ( (glyph_rect->min())[0] < bounding_box->x0 ) bounding_box->x0=(glyph_rect->min())[0]; - if ( (glyph_rect->max())[0] > bounding_box->x1 ) bounding_box->x1=(glyph_rect->max())[0]; - if ( (glyph_rect->min())[1] < bounding_box->y0 ) bounding_box->y0=(glyph_rect->min())[1]; - if ( (glyph_rect->max())[1] > bounding_box->y1 ) bounding_box->y1=(glyph_rect->max())[1]; - } + if(_glyphs[glyph_index].span(this).font) { + NR::Maybe<NR::Rect> glyph_rect = _glyphs[glyph_index].span(this).font->BBox(_glyphs[glyph_index].glyph); + if (glyph_rect) { + NR::Point bmi = glyph_rect->min(), bma = glyph_rect->max(); + NR::Point tlp(bmi[0],bmi[1]), trp(bma[0],bmi[1]), blp(bmi[0],bma[1]), brp(bma[0],bma[1]); + tlp *= total_transform; + trp *= total_transform; + blp *= total_transform; + brp *= total_transform; + *glyph_rect = NR::Rect(tlp,trp); + glyph_rect->expandTo(blp); + glyph_rect->expandTo(brp); + if ( (glyph_rect->min())[0] < bounding_box->x0 ) bounding_box->x0=(glyph_rect->min())[0]; + if ( (glyph_rect->max())[0] > bounding_box->x1 ) bounding_box->x1=(glyph_rect->max())[0]; + if ( (glyph_rect->min())[1] < bounding_box->y0 ) bounding_box->y0=(glyph_rect->min())[1]; + if ( (glyph_rect->max())[1] > bounding_box->y1 ) bounding_box->y1=(glyph_rect->max())[1]; + } + } } } Index: src/libnrtype/Layout-TNG-Compute.cpp =================================================================== --- src/libnrtype/Layout-TNG-Compute.cpp (revisione 19753) +++ src/libnrtype/Layout-TNG-Compute.cpp (copia locale) @@ -478,9 +478,9 @@ new_span.in_input_stream_item = unbroken_span.input_index; new_span.baseline_shift = _y_offset; new_span.block_progression = _block_progression; - if (_flow._input_stream[unbroken_span.input_index]->Type() == TEXT_SOURCE) { - new_span.font = para.pango_items[unbroken_span.pango_item_index].font; - new_span.font->Ref(); + if ((_flow._input_stream[unbroken_span.input_index]->Type() == TEXT_SOURCE) && (new_span.font = para.pango_items[unbroken_span.pango_item_index].font)) + { + new_span.font->Ref(); new_span.font_size = unbroken_span.font_size; new_span.direction = para.pango_items[unbroken_span.pango_item_index].item->analysis.level & 1 ? RIGHT_TO_LEFT : LEFT_TO_RIGHT; new_span.input_stream_first_character = Glib::ustring::const_iterator(unbroken_span.input_stream_first_character.base() + it_span->start.char_byte); @@ -565,7 +565,7 @@ new_glyph.x = x + unbroken_span.glyph_string->glyphs[glyph_index].geometry.x_offset * font_size_multiplier; new_glyph.y = _y_offset + unbroken_span.glyph_string->glyphs[glyph_index].geometry.y_offset * font_size_multiplier; new_glyph.width = unbroken_span.glyph_string->glyphs[glyph_index].geometry.width * font_size_multiplier; - if (new_glyph.width == 0) + if ((new_glyph.width == 0) && (para.pango_items[unbroken_span.pango_item_index].font)) new_glyph.width = new_span.font_size * para.pango_items[unbroken_span.pango_item_index].font->Advance(unbroken_span.glyph_string->glyphs[glyph_index].glyph, false); // for some reason pango returns zero width for invalid glyph characters (those empty boxes), so go to freetype for the info } @@ -906,7 +906,8 @@ line_height->setZero(); *line_height_multiplier = 1.0; } - font->FontMetrics(line_height->ascent, line_height->descent, line_height->leading); + else + font->FontMetrics(line_height->ascent, line_height->descent, line_height->leading); *line_height *= font_size; // yet another borked SPStyle member that we're going to have to fix ourselves
pgpUONicB87Sk.pgp
Description: PGP signature