diff --git a/NEWS.md b/NEWS.md index 7008242d..260938eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,7 @@ Red Panda C++ Version 2.27 - enhancement: Support unicode combining characters. - enhancement: Don't force fixed-width when using non fixed-width fonts. - change: Replace non-ascii font with fallback font. + - enhancement: Display ascii control chars. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 0a6ee8ee..00984131 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -555,6 +555,7 @@ else: unix:!android: target.path = $${PREFIX}/bin !isEmpty(target.path): INSTALLS += target RESOURCES += \ + fonts.qrc \ codes.qrc \ defaultconfigs.qrc \ icons.qrc \ diff --git a/RedPandaIDE/fonts.qrc b/RedPandaIDE/fonts.qrc new file mode 100644 index 00000000..9c7b82f9 --- /dev/null +++ b/RedPandaIDE/fonts.qrc @@ -0,0 +1,5 @@ + + + resources/fonts/asciicontrol.ttf + + diff --git a/RedPandaIDE/main.cpp b/RedPandaIDE/main.cpp index 87067454..b60714df 100644 --- a/RedPandaIDE/main.cpp +++ b/RedPandaIDE/main.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include "widgets/cpudialog.h" #endif @@ -404,6 +405,7 @@ int main(int argc, char *argv[]) e.reason(), QMessageBox::Ok); } + // qDebug()<<"Load font"<=0 && c<' ' && c!='\t' && c!='\n' && c!='\r') { - return true; - } - } - return false; -} +// bool isBinaryContent(const QByteArray &text) +// { +// for (char c:text) { +// if (c>=0 && c<' ' && c!='\t' && c!='\n' && c!='\r') { +// return true; +// } +// } +// return false; +// } void clearQPlainTextEditFormat(QTextEdit *editor) {