/* * LCD Image Converter. Converts images and fonts for embedded applications. * Copyright (C) 2014 riuson * mailto: riuson@gmail.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see #include #include #include #include #include #include #include #include #include "bitmaphelper.h" #include "datacontainer.h" #include "fontdocument.h" #include "fontparameters.h" #include "preset.h" #include "templateoptions.h" namespace CommandLine { ModeConvertFont::ModeConvertFont(QCommandLineParser& parser, QObject* parent) : ModeParserBase(parser, parent) { this->mFontFamily = "Times"; this->mFontSize = 14; this->mFontMonospaced = false; this->mFontStyle = "Normal"; this->mFontAntiAliasing = false; this->mMultiplicityHeight = 1; this->mMultiplicityWidth = 1; this->mFontCharactersList = "0123456789ABCDEFabcdef"; this->mFontCharactersEncoding = "UTF-8"; this->mFontCharactersRange = QString(); this->mFontCharactersBigEndian = false; this->mInputFilename = QString(); this->mOutputFilename = QString(); this->mTemplateFilename = QString(); this->mDocumentName = QString(); this->mPresetName = QString(); this->mSubMode = SubMode::None; } QString ModeConvertFont::modeName() { return "convert-font"; } void ModeConvertFont::fillParser() const { // --family="Ubuntu" QCommandLineOption familyOption(QStringList() << "family", QCoreApplication::translate("CmdLineParser", " of new font."), QCoreApplication::translate("CmdLineParser", "family")); this->mParser.addOption(familyOption); // --size=14 QCommandLineOption sizeOption(QStringList() << "size", QCoreApplication::translate("CmdLineParser", "Font ."), QCoreApplication::translate("CmdLineParser", "size")); this->mParser.addOption(sizeOption); // --mono QCommandLineOption monoOption(QStringList() << "mono" << "monospaced", QCoreApplication::translate("CmdLineParser", "Make monospaced font.")); this->mParser.addOption(monoOption); // --style QCommandLineOption styleOption( QStringList() << "style", QCoreApplication::translate("CmdLineParser", "Font