diff --git a/gfx/thebes/gfxFT2FontBase.cpp b/gfx/thebes/gfxFT2FontBase.cpp index e8b53b7a9767..fc76c1ee5522 100644 --- a/gfx/thebes/gfxFT2FontBase.cpp +++ b/gfx/thebes/gfxFT2FontBase.cpp @@ -116,7 +116,7 @@ gfxFT2FontBase::GetHorizontalMetrics() if (MOZ_UNLIKELY(GetStyle()->size <= 0.0)) { new(&mMetrics) gfxFont::Metrics(); // zero initialize - mSpaceGlyph = 0; + mSpaceGlyph = GetGlyph(' '); } else { gfxFT2LockedFace face(this); face.GetMetrics(&mMetrics, &mSpaceGlyph); @@ -144,8 +144,6 @@ gfxFT2FontBase::GetHorizontalMetrics() uint32_t gfxFT2FontBase::GetSpaceGlyph() { - NS_ASSERTION(GetStyle()->size != 0, - "forgot to short-circuit a text run with zero-sized font?"); GetHorizontalMetrics(); return mSpaceGlyph; }