dunno, changes and stuff

This commit is contained in:
2022-07-17 14:47:21 +02:00
parent 331f9f3e6c
commit 07917fe5ba
19 changed files with 1449 additions and 192 deletions

View File

@@ -0,0 +1,333 @@
#ifndef FONTBUILDER_H
#define FONTBUILDER_H
#include <vector>
#include <cstdint>
#include <cmath>
#include <QString>
#include <QPainter>
#include <QImage>
#include <QFont>
#include <QFontDatabase>
#include <QIcon>
#include <QSvgRenderer>
#include <iostream>
struct FontBuilder {
/** resulting font */
struct Result {
/** pixel data */
std::vector<uint8_t> data;
/** character x offset in pixel */
std::vector<uint16_t> offsets;
uint16_t w;
uint8_t h;
QImage img;
void dump(const char* name) const {
std::cout << "static const uint8_t " << name << "_data[] = {";
for (uint8_t i : data) {
std::cout << (int) i << ",";
}
std::cout << "};" << std::endl;
std::cout << "static const uint16_t " << name << "_offsets[] = {";
for (uint16_t i : offsets) {
std::cout << (int) i << ",";
}
std::cout << "};" << std::endl;
//std::cout << "out size: " << w << ":" << h << std::endl;
std::cout << "static const FontWrap fnt_" << name << "(" << (int)w << "," << (int)h << "," << name << "_data," << name << "_offsets);" << std::endl;
std::cout << "--------------------" << std::endl;
}
};
Result res;
uint16_t curX = 0;
FontBuilder(const int h) {
//if ( (w%8) != 0 ) {
// throw "width must be multiple of 8";
//}
res.w = 1024;
res.h = h;
res.img = QImage(res.w, res.h, QImage::Format_Mono);
QPainter p(&res.img);
p.fillRect(0, 0, res.w, res.h, Qt::white);
p.end();
}
void addDummy() {
// update
res.offsets.push_back(curX);
curX += 0;
}
void addIcon(QString file, float w, float h, int atHeight) {
// //QImage img = QIcon("filepath.svg").pixmap(QSize()).toImage();
// QSvgRenderer renderer(file);
// QImage img(pixelSize, pixelSize, QImage::Format_ARGB32);
// //pm.fill(Qt::blue);
// QPainter painter(&img);
// painter.fillRect(0, 0, pixelSize, pixelSize, Qt::blue);
// renderer.render(&painter, img.rect());
// // renderer
// QPainter p(&res.img);
// p.setRenderHint(QPainter::Antialiasing, false);
// p.setRenderHint(QPainter::TextAntialiasing, false);
// //p.setPen(Qt::white);
// // render
// p.drawImage(curX, atHeight, img);
// p.end();
// renderer
QPainter p(&res.img);
p.setRenderHint(QPainter::Antialiasing, false);
p.setRenderHint(QPainter::TextAntialiasing, false);
p.setRenderHint(QPainter::SmoothPixmapTransform, false);
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
// render the image
QSvgRenderer renderer(file);
//QImage img(pixelSize, pixelSize, QImage::Format_RGB888);
QRect rect(curX, 0, w, h);
//p.fillRect(rect, Qt::blue);
renderer.render(&p, rect);
// update
res.offsets.push_back(curX);
curX += w+1;
}
void addCharsMonoFromImage(QString file, const int charW, unsigned char cFirst, unsigned char cLast) {
// renderer
// QPainter p(&res.img);
// p.setRenderHint(QPainter::Antialiasing, false);
// p.setRenderHint(QPainter::TextAntialiasing, false);
int stride = 1;
QImage img;
img.load(file);
res.img = img;
res.w = img.width();
res.h = img.height();
// p.drawImage(0, 0, img);
// draw letters
for (unsigned char c = cFirst; c < cLast; ++c) {
int x1 = (c-cFirst) * (charW+stride);
int w = charW;
int y1 = 0;
int h = res.h;
QRect rect = QRect(x1, y1, w, h);
res.offsets.push_back(curX);
curX += std::ceil(rect.width()) + 1;
}
// p.end();
}
void addChars(QString fontFile, float pixelSize, int atHeight, unsigned char cFirst, unsigned char cLast, std::function<void(char, QRect&)> fixFunc = nullptr) {
// renderer
QPainter p(&res.img);
p.setRenderHint(QPainter::Antialiasing, false);
p.setRenderHint(QPainter::TextAntialiasing, false);
p.setPen(Qt::black);
// the font
int id = QFontDatabase::addApplicationFont(fontFile);
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
QFont fnt(family);
if (pixelSize == -1) {
;
} else if (pixelSize > 100) {
fnt.setPointSize(pixelSize-100);
} else {
fnt.setPixelSize(pixelSize);
}
QFontMetrics fm(fnt);
// enable
p.setFont(fnt);
// draw letters
for (unsigned char c = cFirst; c < cLast; ++c) {
QRect rect = fm.boundingRect(c);
QString str = ""; str += c;
res.offsets.push_back(curX);
int drawOffsetX = 0;
// apply rectangle fixing function?
if (fixFunc) {
fixFunc(c, rect);
// hack for some chars
if (rect.x() < 0) {drawOffsetX = -rect.x();}
}
std::cout << " " << c << " : " << rect.width() << " cur: " << curX << std::endl;
p.drawText(curX+drawOffsetX, atHeight, str);
curX += std::ceil(rect.width()) + 1; // 1 pixel space between chars
}
p.end();
}
const Result& get() {
// crop image (only used region)
res.w = (curX/8+1)*8;
res.img = res.img.copy(0,0,res.w,res.h);
// convert to bitfield
const unsigned int bytes = res.w/8 * res.h;
res.data.resize(bytes);
for (int y = 0; y < res.h; ++y) {
for (int x = 0; x < res.w; ++x) {
const QColor pixel = res.img.pixelColor(x,y);
bool set = pixel.red() + pixel.green() + pixel.blue() == 0;
if (set) {
const unsigned int idx = (x/8) + (y*res.w/8);
res.data[idx] |= (1 << (x%8));
}
}
}
return res;
}
/*
Result build(const QString& fontFile, int maxChar, float pixelSize, const int oh) {
// the font
int id = QFontDatabase::addApplicationFont(fontFile);
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
QFont fnt(family); fnt.setPixelSize(pixelSize);
QFontMetrics fm(fnt);
// first chars are unused
std::vector<uint16_t> offsets;
for (unsigned char c = 0; c <= 32; ++c) {
offsets.push_back(0);
}
// estimate total width and remember character offsets
int mx = 0;
for (unsigned char c = 32; c < maxChar; ++c) {
QRect rect = fm.boundingRect(c);
mx += std::ceil(rect.width()) + 1;
//if (c < 128 && rect.height() > my) {my = rect.height();}
offsets.push_back(mx);
}
// width/height
int w = mx;
int h = oh;
// width/height next multiple of 8
int ow = ((w-1)/8+1)*8;
//int oh = h;
QImage img = QImage(ow, oh, QImage::Format_RGB888);
QPainter p(&img);
p.setRenderHint(QPainter::Antialiasing, false);
p.setRenderHint(QPainter::TextAntialiasing, false);
p.setPen(Qt::white);
p.setFont(fnt);
p.fillRect(0, 0, w, h, Qt::black);
// draw image
std::vector<uint8_t> data;
for (unsigned char c = 32; c < maxChar; ++c) {
QRect rect = fm.boundingRect(c);
QString str = ""; str += c;
int x = offsets[c];
p.drawText(x, h, str);
}
p.end();
// convert to bitfield
const unsigned int bytes = ow/8 * oh;
data.resize(bytes);
for (int y = 0; y < oh; ++y) {
for (int x = 0; x < ow; ++x) {
bool set = img.pixelColor(x,y).red() > 128;
if (set) {
const unsigned int idx = (x/8) + (y*ow/8);
data[idx] |= (1 << (x%8));
}
}
}
// remove initial empty offsets
offsets.erase(offsets.begin(), offsets.begin()+32);
//img.save("/tmp/1.png");
//int i = 0; (void) i;
Result res;
res.data = data;
res.offsets = offsets;
res.w = ow;
res.h = oh;
res.img = img;
return res;
}
*/
};
#endif // FONTBUILDER_H

View File

@@ -0,0 +1,125 @@
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include <QPainter>
#include <QImage>
#include <QFontDatabase>
#include <ESP8266lib/ext/lcd/Draw.h>
#include <iostream>
#include <FontBuilder.h>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {// ui(new Ui::MainWindow) {
//ui->setupUi(this);
setMinimumSize(1500,300);
//QFont fnt("/apps/esp/test/04B_03__.TTF"); fnt.setPixelSize(7);
}
MainWindow::~MainWindow() {
//delete ui;
}
void MainWindow::paintEvent(QPaintEvent* e) {
QString fontPath="/apps/ESP8266lib/tools/PixelFontGen/fonts/";
//FontBuilder::Result res = fb.build("/apps/esp/test/04B_03__.TTF");
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/PixelOperator.ttf", 16, 9, 32, 126);
//FontBuilder fb(8); fb.addChars("/apps/esp/PixelFont/04B_03__.TTF", 8, 6, 32, 126); // OK
//FontBuilder fb(8); fb.addChars("/apps/esp/PixelFont/Minecraft.ttf", 7.5, 6, 32, 126); // ugly
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/EnterCommand.ttf", 15, 8, 32, 126);
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/PIXELADE.TTF", 13, 8, 32, 126);
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/C&C Red Alert [LAN].ttf", 110, 8, 32, 126); // ugly
//FontBuilder fb(11); fb.addChars("/apps/esp/PixelFont/LeviWindows.ttf", 21, 9, 32, 126);
//FontBuilder fb(9); fb.addChars("/apps/esp/PixelFont/SadMachine.ttf", 16, 8, 32, 126);
//FontBuilder fb(7); fb.addChars("/apps/esp/PixelFont/bitdust1.ttf", 8, 6, 32, 126); // NICE
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/pixeljosh6.ttf", 8, 7, 32, 126);
//FontBuilder fb(9); fb.addChars("/apps/esp/PixelFont/BitPotionExt.ttf", 16, 7, 32, 126);
//FontBuilder fb(10); fb.addChars("/apps/esp/PixelFont/PIXEARG_.TTF", 8, 8, 32, 126);
//FontBuilder fb(10); fb.addChars(fontPath+"/Volter__28Goldfish_29.ttf", 9, 8, 32, 126);
//FontBuilder fb(10); fb.addChars(fontPath+"/ti-83-plus-large.ttf", 8, 8, 32, 126);
//FontBuilder fb(10); fb.addChars(fontPath+"/EXEPixelPerfect.ttf", 16, 8, 32, 126);
//FontBuilder fb(10); fb.addChars(fontPath+"/new-gen.ttf", 9, 8, 32, 126);
//FontBuilder fb(10); fb.addChars(fontPath+"/Comicoro.ttf", 16, 8, 32, 126, [](char c, QRect& r) { if(c=='1'){r.setX(-2); r.setWidth(5);} if(c=='-'){r.setX(-1); r.setWidth(5);} });
//FontBuilder fb(9); fb.addChars(fontPath+"/Nineteen Ninety Six.otf", 9, 7, 32, 126);
//FontBuilder fb(15); fb.addChars(fontPath+"/Mario64.ttf", 12, 12, 32, 126);
//FontBuilder fb(7); fb.addChars(fontPath+"/RNTG Larger.ttf", 7, 7, 32, 126, [](char c, QRect& r) {if(c=='1'){r.setX(0); r.setWidth(5);}});
//FontBuilder fb(8); fb.addChars(fontPath+"/Bonni-Africa.ttf", 8, 7, 32, 126);
//FontBuilder fb(8); fb.addCharsMonoFromImage("/apps/esp/PixelFont/res/fnt1.png", 3, 32, 126);
// test for icons
FontBuilder fb(9);
// for (int i = 0; i < 10; ++i) {
fb.addDummy();
//fb.addIcon("/apps/esp/PixelFont/res/icon/wifi.svg", 12, 0);
fb.addIcon("/apps/esp32/BoatRemote/icon/remote.svg", 11, 9, 0);
fb.addIcon("/apps/esp32/BoatRemote/icon/boat.svg", 12, 9, 0);
fb.addDummy();
// }
const FontBuilder::Result& res = fb.get();
//res.dump("f1");
res.dump("fIcon");
struct F {
QPainter&p;
F(QPainter& p ) : p(p) {;}
void setPixel(int x, int y) {
p.drawPoint(QPointF(x,y));
}
void fillRect(int x, int y, int w, int h) {
p.fillRect(x,y,w,h, Qt::blue);
}
};
QPainter p(this);
p.setPen(Qt::black);
p.translate(10,10);
F dst(p);
// uint8_t data[] = {171,40,153,86,0,208,190,163,183,55,131,200,57,59,223,239,121,206,196,180,179,243,103,198,204,31,22,4,1,4,66,52,2,0,0,128,0,0,0,124,138,0,251,29,133,41,1,40,69,180,8,204,92,23,198,204,100,18,41,172,236,205,204,12,101,214,76,38,44,232,103,55,249,33,191,179,243,250,51,107,243,85,69,1,161,134,88,217,115,36,53,171,59,50,39,160,245,188,228,223,47,156,212,206,204,52,101,85,115,69,4,144,153,236,103,182,214,204,204,141,50,171,146,146,64,1,240,89,36,9,1,34,13,124,76,73,92,23,212,207,100,146,169,172,196,204,203,67,101,213,196,132,4,144,153,28,101,246,214,204,204,176,178,148,82,84,32,2,161,78,90,6,136,193,252,163,51,49,147,136,184,60,223,227,121,203,199,180,176,60,153,168,180,15,199,227,103,55,121,54,215,180,243,28,93,84,253,125,224,3,};
// uint16_t offsets[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,9,13,18,23,24,26,28,31,34,36,39,40,45,49,51,55,59,63,67,71,75,79,83,84,85,88,91,94,98,103,107,111,114,118,121,124,128,132,135,139,143,146,151,155,159,163,167,171,175,178,182,186,191,195,199,202,204,209,211,214,218,220,224,228,231,235,239,242,246,250,251,253,257,258,263,267,271,275,279,282,286,289,293,297,302,305,309,313,316,317,320,324,330,};
FontWrap fnt(res.w, res.h, res.data.data(), res.offsets.data());
Draw<int16_t, F> d(dst);
const char* txt = "!! ## AABBCCDD aabbccdd";
p.save();
p.scale(6,6);
p.drawImage(0, 0, res.img);
p.restore();
for (int i = 1; i <= 2; ++i) {
p.save();
p.scale(i,i);
fnt.draw<int16_t, F>("--!\"#$%&'()*+,-./--", 20, 100, dst);
fnt.draw<int16_t, F>("--0123456789--", 20, 110, dst);
fnt.draw<int16_t, F>("--abcdefghijklmnopqrstuvwxyz--", 20, 120, dst);
fnt.draw<int16_t, F>("--ABCDEFGHIJKLMNOPQRSTUVWXYZ--", 20, 130, dst);
p.restore();
}
// d.drawRect(10,10, 30, 20);
// uint8_t data = {255,255,255,255};
// uint16_t offsets = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
p.end();
}

View File

@@ -0,0 +1,25 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
//Ui::MainWindow *ui;
void paintEvent(QPaintEvent* e) override;
};
#endif // MAINWINDOW_H

View File

@@ -0,0 +1,24 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>MainWindow</string>
</property>
<widget class="QMenuBar" name="menuBar" />
<widget class="QToolBar" name="mainToolBar" />
<widget class="QWidget" name="centralWidget" />
<widget class="QStatusBar" name="statusBar" />
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,43 @@
#-------------------------------------------------
#
# Project created by QtCreator 2018-09-24T20:35:06
#
#-------------------------------------------------
QT += core gui widgets svg
TARGET = test
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++11
SOURCES += \
main.cpp \
MainWindow.cpp
HEADERS += \
MainWindow.h \
FontBuilder.h \
../../ext/lcd/Draw.h \
FORMS += \
MainWindow.ui
INCLUDEPATH += \
/apps
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

View File

@@ -0,0 +1,335 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.12.1, 2020-07-08T21:18:06. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{662356ad-536e-4e17-8869-ff649e71cb1a}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="ClangTools">
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">4</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{fe56f1ef-f99a-4240-b10b-b3bde6dd50d2}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="bool">true</value>
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="int" key="QtQuickCompiler">2</value>
<value type="int" key="SeparateDebugInfo">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="bool">true</value>
<value type="int" key="EnableQmlDebugging">2</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="bool">true</value>
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/apps/ESP8266lib/tools/PixelFontGen/PixelFontGen.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/apps/ESP8266lib/tools/PixelFontGen/PixelFontGen.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/apps/ESP8266lib/tools/build-PixelFontGen-Desktop-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

View File

@@ -0,0 +1,14 @@
#include "MainWindow.h"
#include <QApplication>
#include <ESP8266lib/ext/lcd/Draw.h>
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}