﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
16433	Fix inkscape to build with poppler-22.04.0	Douglas R. Reno	Douglas R. Reno	"Wouldn't be a new version of Poppler without it breaking Inkscape.

{{{
[ 25%] Building CXX object src/CMakeFiles/inkscape_base.dir/extension/internal/filter/filter.cpp.o
[ 26%] Building CXX object src/CMakeFiles/inkscape_base.dir/extension/internal/pdfinput/pdf-input.cpp.o
[ 26%] Building CXX object src/CMakeFiles/inkscape_base.dir/extension/internal/pdfinput/pdf-parser.cpp.o
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp: In member function ‘void PdfParser::opSetFont(Object*, int)’:
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp:2161:34: error: cannot convert ‘std::shared_ptr<GfxFont>’ to ‘GfxFont*’ in initialization
 2161 |   GfxFont *font = res->lookupFont(args[0].getName());
      |                   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  std::shared_ptr<GfxFont>
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp:2182:9: error: ‘class GfxFont’ has no member named ‘incRefCnt’
 2182 |   font->incRefCnt();
      |         ^~~~~~~~~
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp:2183:18: error: cannot convert ‘GfxFont*’ to ‘std::shared_ptr<GfxFont>’
 2183 |   state->setFont(font, args[1].getNum());
      |                  ^~~~
      |                  |
      |                  GfxFont*
In file included from /usr/include/poppler/Gfx.h:40,
                 from /sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp:30:
/usr/include/poppler/GfxState.h:1588:43: note:   initializing argument 1 of ‘void GfxState::setFont(std::shared_ptr<GfxFont>, double)’
 1588 |     void setFont(std::shared_ptr<GfxFont> fontA, double fontSizeA);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp: In member function ‘void PdfParser::doShowText(const GooString*)’:
/sources/inkscape-1.1.2/inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-parser.cpp:2395:24: error: cannot convert ‘const std::shared_ptr<GfxFont>’ to ‘GfxFont*’ in assignment
 2395 |   font = state->getFont();
      |          ~~~~~~~~~~~~~~^~
      |                        |
      |                        const std::shared_ptr<GfxFont>
make[2]: *** [src/CMakeFiles/inkscape_base.dir/build.make:1553: src/CMakeFiles/inkscape_base.dir/extension/internal/pdfinput/pdf-parser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1475: src/CMakeFiles/inkscape_base.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
}}}

Patch found here: [https://gitlab.com/inkscape/inkscape/-/commit/d989cdf1059c78bc3bb6414330242073768d640b] . Going to test it and add it into the book."	enhancement	closed	normal	11.2	BOOK	git	medium	fixed		
