Improve some debug messages

The current code did not give much information.

I am not sure why the <<FontInfo operator is not defined in
FontInfo.h, but I figured that it was not necessary to understand that
now.
This commit is contained in:
Jean-Marc Lasgouttes 2020-11-26 11:04:33 +01:00
parent 4c58315d4b
commit c68be9a9be
2 changed files with 5 additions and 2 deletions

View File

@ -119,6 +119,9 @@ private:
mutable bool open_encoding_;
};
///
std::ostream & operator<<(std::ostream & os, FontInfo const & f);
///
inline

View File

@ -14,7 +14,7 @@
#include "GuiFontLoader.h"
#include "FontLoader.h"
#include "FontInfo.h"
#include "Font.h"
#include "GuiFontMetrics.h"
#include "qt_helpers.h"
@ -129,8 +129,8 @@ GuiFontInfo & fontinfo(FontInfo const & f)
(f.size() < NUM_SIZE);
if (!fontIsRealized) {
// We can reset the font to something sensible in release mode.
LYXERR0("Unrealized font!" << f);
LATTEST(false);
LYXERR0("Unrealized font!");
FontInfo f2 = f;
f2.realize(sane_font);
GuiFontInfo * & fi = fontinfo_ptr(f2);