diff --git a/src/fontgen/fontgen.cc b/src/fontgen/fontgen.cc index 786f61ffc..557ac6c64 100644 --- a/src/fontgen/fontgen.cc +++ b/src/fontgen/fontgen.cc @@ -20,11 +20,11 @@ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -55,14 +55,14 @@ main (int argc, char *argv []) sprintf (b, " FixedFont (ff%d_height, ff%d_line_height, ff%d_width, ff%d_first_char, sizeof (ff%d_data) / sizeof (uint32_t) / (ff%d_height * ff%d_stride), ff%d_data, ff%d_stride),\n", os, os, os, os, os, os, os, os, os); table += b; - QFont f (QString::fromAscii ("Liberation Mono"), r * sz[s]); + QFont f (QString::fromLatin1 ("Liberation Mono"), r * sz[s]); f.setStyleStrategy(QFont::StyleStrategy ((f.styleStrategy() & ~QFont::PreferAntialias) | QFont::NoAntialias)); QFontMetrics fm (f); - int w = fm.width (QChar::fromAscii ('W')); + int w = fm.width (QChar::fromLatin1 ('W')); - printf ("\n// Font: %s\n", f.toString ().toAscii ().constData ()); + printf ("\n// Font: %s\n", f.toString ().toLatin1 ().constData ()); printf ("const unsigned int ff%d_height = %d;\nconst unsigned int ff%d_line_height = %d;\nconst unsigned int ff%d_width = %d;\nconst unsigned int ff%d_stride = %d;\n", os, fm.height (), os, fm.lineSpacing (), os, w, os, (w + 31) / 32); diff --git a/src/fontgen/fontgen.pro b/src/fontgen/fontgen.pro index ac61bce36..1485dd641 100644 --- a/src/fontgen/fontgen.pro +++ b/src/fontgen/fontgen.pro @@ -2,5 +2,6 @@ TEMPLATE = app TARGET = fontgen +QT += gui core widgets SOURCES = fontgen.cc