git diff TextOutputDev.cc diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 442ace2..9686cc1 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -1988,6 +1988,11 @@ void TextPage::beginWord(GfxState *state, double x0, double y0) { rot = (m[2] > 0) ? 1 : 3; } + if (!curFont) { + curFont = new TextFontInfo(state); + fonts->append(curFont); + } + curWord = new TextWord(state, rot, x0, y0, charPos, curFont, curFontSize); }