From 3d9edcad57800b8f519cc6882925d478bc10c9ba Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 10 Jan 2022 20:16:26 +0800 Subject: [PATCH] - enhancement: support ligatures in fonts like fira code ( disabled by default, can be turned on in options dialog's editor font page) --- NEWS.md | 1 + RedPandaIDE/RedPandaIDE_zh_CN.qm | Bin 110573 -> 110421 bytes RedPandaIDE/RedPandaIDE_zh_CN.ts | 385 +++++++++--------- RedPandaIDE/editor.cpp | 3 + RedPandaIDE/qsynedit/SynEdit.h | 2 +- RedPandaIDE/qsynedit/TextPainter.cpp | 34 +- RedPandaIDE/settings.cpp | 12 + RedPandaIDE/settings.h | 4 + .../settingsdialog/editorfontwidget.cpp | 2 + .../settingsdialog/editorfontwidget.ui | 31 +- 10 files changed, 264 insertions(+), 210 deletions(-) diff --git a/NEWS.md b/NEWS.md index f211df67..cd731b6a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ Red Panda C++ Version 0.13.2 - fix: crash when closing the options dialog under Ubuntu 20.04 LTS ( no memory leak now) - enhancement: can add non-code file in templates - enhancement: if there's no selection when copy/cut, select currect line by default + - enhancement: support ligatures in fonts like fira code ( disabled by default, can be turned on in options dialog's editor font page) Red Panda C++ Version 0.13.1 - enhancement: suppoort localization info in project templates diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index ce12b65bfc3c21c99d2a77711d78f3f7780a8f0a..2c654303f435610e2deeb984f8c83d622bf0f98e 100644 GIT binary patch delta 10809 zcmXY%d0b5EAIHDX%sFS~%$%9AC9-9grG-QakwVB;s1)ss7M1K8Waow`%5v>llAUV{ z$$D)mt~Fa_iR^p$eVX(8qu2YKnK|b?&-eK*pYL;e^GLW=A}nicj3DAx5dF6tTnQcq z)4}^-2GJb?SAi|T)u0EM3C4l@iS@|_KM?CTn24`M%mdf)PDCjR6PdP`%#eNHU}6J8 zKtCeKWD}V&X#|m-o~V^p=7|5FC!Uhe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(4x>Xf8$=w>=hOdYlZ-?nN`s8Edw{?GhkilrPb$Odo&{NLR?WpuYBND62kB2w4 zzo0u%1l268G3XA3X2RI!OPp>laa)m*tSOV&evrhDyL5+cTOp5E>yBQ;iCTy0P9KM@ zJo%(Y>(2E9$-c_&Hwg`do6zI)bA`o>uu5Z5? zI$s~8x9ta29W&K;za5GPlrnwy3ar;j&^x}JgX~wKcg+jK-+F}VT|bXNwrsBVuDuM2 z3;N-mp)$k#9s03N@j+<3eq44b{$QYuJ~9;|3s&kQ_xT{km+B|wCm^y_=qEqV!Xw)H z`k9A4Fx7gcPkrl$32CH$$(gP2=S}*RGW>q`Nc}3?B4p9I`t-K&bGwE{GEpwEZMwvW zfkqlwbVGe+HDYtJi++PL5hImC{RRu1Sn*lE=}*vdw|?vDZD^-g>T?$Qq6RF`=k|d& zwE0)Rz01WAsz_gZ zpgG3$PxapenqojvuKyJbV~mWCBsSmo;8M$OYQt~*haiJL%)q~C&asnc#6?bsNHDVq zu{5)_w(e#&ASyOCG(I9M)NDj-c*3-xxG?qq`z;%rF1FS--OXa-riDdCnT3W;4VgUo z|NEA$HNItQV-^=XV@iaLgS|t)3DH49WRz7%Z1ll=J5M(3j{yCY#qpiUg~Dhmbs=Z! zg#XRRf*h$2^&l&<$G`4mNxlB>mRk(R&V~lXga(gF<html><head/><body><p>主页: <a href="Homepage: https://sourceforge.net/projects/dev-cpp-2020/"><span style=" text-decoration: underline; color:#0000ff;">https://sourceforge.net/projects/dev-cpp-2020/</span></a></p></body></html> - Red Panda Dev-C++ (<=6.7.5): Red Panda Dev-C++: - 小熊猫Dev-C++ (<=6.7.5): + 小熊猫Dev-C++ (<=6.7.5): - - Copyright (c) 2004 Bloodshed Software -Copyright (c) 2011-2015 orwell devcpp -Copyright (c) 2020-2021 royqh1979@gmail.com - - - - + GNU General Public License GNU通用公共许可 - + 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. @@ -124,12 +116,12 @@ Copyright (c) 2020-2021 royqh1979@gmail.com 本程序附带一份GNU通用公共许可协议的副本。您也可以从GNU网站<http://www.gnu.org/licenses/>获取。 - + Version: 版本: - + Non-GCC Compiler 非GCC编译器 @@ -580,7 +572,7 @@ Copyright (c) 2020-2021 royqh1979@gmail.com [说明] - + The compiler process for '%1' failed to start. 无法启动编译器进程'%1'。 @@ -589,27 +581,27 @@ Copyright (c) 2020-2021 royqh1979@gmail.com 无法启动编译进程。 - + The compiler process crashed after starting successfully. 编译进程启动后崩溃。 - + The last waitFor...() function timed out. waitFor()函数等待超时。 - + An error occurred when attempting to write to the compiler process. 在向编译进程输入内容时出错。 - + An error occurred when attempting to read from the compiler process. 在从编译进程读取内容时出错。 - + An unknown error occurred. 发生了未知错误。 @@ -1288,7 +1280,7 @@ Are you really want to continue? 输入当前断点的生效条件: - + Readonly 只读 @@ -1667,70 +1659,75 @@ Are you really want to continue? 表单 - - + + Size: 大小: - - + + Font: 字体: - - + + Show only monospaced fonts 只显示等宽字体 - + + Enable Ligatures Support + 启用合字显示支持(需要Fira Code等字体) + + + Gutter 装订线 - + Gutter is visible 显示装订线区域 - + Left Offset 左侧留白 - + Right Offset 右侧留白 - + Show Line Numbers 显示行号 - + Add leading zeros to line numbers 在行号前补齐前导0 - + Line numbers starts at zero 第一行从0开始编号 - + Auto calculate the digit count of line number 自动计算行号位数 - + Digit count 行号位数 - + Use Custom Font 使用自定义字体 @@ -5015,32 +5012,32 @@ Are you really want to continue? 新建项目 - + Make default language 设为缺省语言 - + C Project C语言项目 - + C++ Project C++语言项目 - + Name: 项目名称: - + Create in 创建在 - + Use as the default project location 设为缺省项目位置 @@ -5049,7 +5046,7 @@ Are you really want to continue? 文件夹: - + ... ... @@ -5149,68 +5146,68 @@ Are you really want to continue? 无法保存文件'%1'. - + Error Load File 载入文件错误 - + File Exists 文件已存在 - + File '%1' is already in the project 文件'%1'已在项目中 - + Project Updated 项目已升级 - + Your project was succesfully updated to a newer file format! 已成功将项目升级到新的格式 - + If something has gone wrong, we kept a backup-file: '%1'... 旧项目文件备份在'%1'。 - + Settings need update 设置需要更新 - + The compiler settings format of Red Panda C++ has changed. The compiler settings format of Dev-C++ has changed. 小熊猫C++的编译器设置格式已发生改变。 - + Please update your settings at Project >> Project Options >> Compiler and save your project. 请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目 - + Compiler not found 未找到编译器 - + The compiler set you have selected for this project, no longer exists. 您为该项目设置的编译器不存在。 - + It will be substituted by the global compiler set. 它将会被全局编译器设置代替。 - + Developed using the Red Panda C++ IDE Developed using the Red Panda Dev-C++ IDE 使用小熊猫C++编辑器开发 @@ -5617,24 +5614,24 @@ Are you really want to continue? ProjectModel - + File exists 文件已存在 - + File '%1' already exists. Delete it now? 文件'%1'已存在。是否删除? - - + + Remove failed 删除失败 - - + + Failed to remove file '%1' 无法删除文件'%1' @@ -5732,32 +5729,32 @@ Are you really want to continue? ProjectTemplate - + Read failed. 读取失败. - + Can't read template file '%1'. 无法读取模板文件'%1'. - + Template not exist 模板不存在 - + Template file '%1' doesn't exist. 模板文件'%1'不存在. - + Old version template 旧版本模板 - + Template file '%1' has version '%2', which is unsupported. 已不再支持模板文件'%1'的版本(%2)。 @@ -5933,180 +5930,180 @@ Are you really want to continue? 无法载入自动链接设置 - - + + The following %1 directories don't exist: 下列%1文件夹不存在: - - + + binary 二进制 - + No %1 directories have been specified. 未指定%1文件夹 - + C include C包含 - + C++ include C++包含 - - - - + + + + Cannot find the %1 "%2" 无法找到%1程序"%2" - + C options C语言选项 - + Support all ANSI standard C programs (-ansi) 支持所有ANSI标准C程序(-ansi) - + Do not recognize asm,inline or typeof as a keyword (-fno-asm) 不支持将asm、inline和typeof作为关键字(-fno-asm) - + Imitate traditional C preprocessors (-traditional-cpp) 模仿传统C预处理器行为(-traditional-cpp) - + Code Generation 代码生成 - + Optimize for the following machine (-march) 生成特定机器的专用指令(-march) - + Optimize less, while maintaining full compatibility (-tune) 完整兼容特定机器,较少优化(-tune) - + Enable use of specific instructions (-mx) 启用特定指令集(-mx) - + Optimization level (-Ox) 优化级别(-Ox) - + Compile with the following pointer size (-mx) 使用下列指针大小编译(-mx) - + Language standard (-std) 语言标准(-std) - + Profile 性能分析 - + Generate debugging information (-g3) 生成调试信息(-g3) - + Would you like Red Panda C++ to search for compilers in PATH? 您同意小熊猫C++在PATH路径中寻找gcc编译器吗? - + Generate profiling info for analysis (-pg) 生成性能分析信息(-pg) - + Warnings 代码警告 - + Inhibit all warning messages (-w) 忽略所有警告信息(-w) - + Show most warnings (-Wall) 启用常见问题警告(-Wall) - + Show some more warnings (-Wextra) 启用更多问题警告(-Wextra) - + Check ISO C/C++/C++0x conformance (-pedantic) 检查ISO C/C++/C++0x语法一致性(-pedantic) - + Only check the code for syntax errors (-fsyntax-only) 只进行语法检查(不编译)(-fsyntax-only) - + Make all warnings into errors (-Werror) 将警告作为错误处理(-Werror) - + Abort compilation on first error (-Wfatal-errors) 遇到第一个错误后立即中止编译(-Wfatal-errors) - + Linker 链接器 - + Link an Objective C program (-lobjc) 链接Objective-C程序 (-lobjc) - + Do not use standard system libraries (-nostdlib) 不使用标准库和系统启动文件(-nostdlib) - + Do not create a console window (-mwindows) 不产生控制台窗口(-mwindows) - + Strip executable (-s) 剥除附加信息(-s) @@ -6115,54 +6112,54 @@ Are you really want to continue? 链接Ojbective C程序(-lobjc) - + Output 输出 - + Put comments in generated assembly code (-fverbose-asm) 在生成的汇编代码中加入注释(-fverbose-asm) - + Use pipes instead of temporary files during compilation (-pipe) 编译时使用管道而不是临时文件(-pipe) - + Do not assemble, compile and generate the assemble code (-S) 只生成汇编代码(-S) - - + + Confirm 确认 - + The following problems were found during validation of compiler set "%1": 在验证编译器设置"%1"时遇到了下列问题: - + Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths? 是否让小熊猫C++删除这些配置,并尝试重新建立配置? - + Leaving those directories will lead to problems during compilation.<br /><br />Unless you know exactly what you're doing, it is recommended that you click Yes. 如果仍然保留这些设置,可能会导致编译错误。<br /><br />请选择“是”,除非您清楚的知道选择“否”的后果, - - + + Compiler set not configuared. 未配置编译器设置。 - + Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? 您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2 @@ -6882,7 +6879,7 @@ Are you really want to continue? SettingsDialog - + Options 选项 @@ -6908,243 +6905,239 @@ Are you really want to continue? 取消 - + Appearence 外观 - - - + + + + - - + Environment 环境 - + File Association 文件关联 - + Shortcuts 快捷键 - + Folders 文件夹 - + Terminal 终端程序 - + Performance 性能 - - + + Compiler Set 编译器配置集 - - + + Compiler 编译器 - + Auto Link 自动链接 - - - - - - + + + + + + General 通用 - - + + + + + - - + + + - - - - - - - + Editor 编辑器 - + Font 字体 - + Copy & Export 复制/导出 - - + Color 配色 - + Code Completion 代码补全 - + Symbol Completion 符号补全 - - + Snippet 代码模板 - + Auto Syntax Checking 自动语法检查 - + Tooltips 信息提示 - + Auto save 自动保存 - + Misc 杂项 - - + + Program Runner 程序运行 - + Problem Set 试题集 - + Debugger 调试器 - - + + Code Formatter 代码排版 - + Program 程序 - + Tools 工具 - + Project Options 项目选项 - - - - - - - - - - + + + + + + + + + + Project 项目 - + Files 文件 - + Custom Compile options 自定义编译选项 - + Directories 文件夹 - + Precompiled Header 预编译头文件 - + Makefile Makefile - + Output 输出 - + DLL host DLL宿主 - + Version info 版本信息 - + Save Changes 保存修改 - + There are changes in the settings, do you want to save them before swtich to other page? 本页中有尚未保存的设置修改,是否保存后再切换到其他页? @@ -7296,8 +7289,8 @@ Are you really want to continue? SynEdit - - + + The highlighter seems to be in an infinite loop 高亮处理进入了死循环 diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 212df608..38a9163b 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -4055,6 +4055,8 @@ void Editor::applySettings() options.setFlag(eoAutoIndent,pSettings->editor().autoIndent()); options.setFlag(eoTabsToSpaces,pSettings->editor().tabToSpaces()); + options.setFlag(eoLigatureSupport, pSettings->editor().enableLigaturesSupport()); + options.setFlag(eoKeepCaretX,pSettings->editor().keepCaretX()); options.setFlag(eoEnhanceHomeKey,pSettings->editor().enhanceHomeKey()); options.setFlag(eoEnhanceEndKey,pSettings->editor().enhanceEndKey()); @@ -4116,6 +4118,7 @@ void Editor::applySettings() } setMouseWheelScrollSpeed(pSettings->editor().mouseWheelScrollSpeed()); + invalidate(); } static PSynHighlighterAttribute createRainbowAttribute(const QString& attrName, const QString& schemeName, const QString& schemeItemName) { diff --git a/RedPandaIDE/qsynedit/SynEdit.h b/RedPandaIDE/qsynedit/SynEdit.h index ea5cee8c..188fc206 100644 --- a/RedPandaIDE/qsynedit/SynEdit.h +++ b/RedPandaIDE/qsynedit/SynEdit.h @@ -83,7 +83,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(SynStateFlags) enum SynEditorOption { eoAltSetsColumnMode = 0x00000001, //Holding down the Alt Key will put the selection mode into columnar format eoAutoIndent = 0x00000002, //Will auto calculate the indent when input -// eoAddIndent = 0x00000004, //Will add one tab width of indent when typing { and :, and remove the same amount when typing } + eoLigatureSupport = 0x00000004, //Support ligaures in fonts like fira code eoDragDropEditing = 0x00000008, //Allows you to select a block of text and drag it within the document to another location eoDropFiles = 0x00000010, //Allows the editor accept OLE file drops eoEnhanceHomeKey = 0x00000020, //enhances home key positioning, similar to visual studio diff --git a/RedPandaIDE/qsynedit/TextPainter.cpp b/RedPandaIDE/qsynedit/TextPainter.cpp index 3e0b80cb..77976bce 100644 --- a/RedPandaIDE/qsynedit/TextPainter.cpp +++ b/RedPandaIDE/qsynedit/TextPainter.cpp @@ -415,7 +415,39 @@ void SynEditTextPainter::PaintToken(const QString &Token, int TokenCols, int Col break; //painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent()*edit->dpiFactor() , Token[i]); if (startPaint) { - painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , Token[i]); + bool drawed = false; + if (edit->mOptions.testFlag(eoLigatureSupport) && i+1') + || (Token[i]=='=' && Token[i+1]=='>') + || (Token[i]==':' && Token[i+1]==':') + || (Token[i]=='_' && Token[i+1]=='_') + || (Token[i]=='=' && Token[i+1]=='=') + || (Token[i]=='!' && Token[i+1]=='=') + || (Token[i]=='<' && Token[i+1]=='=') + || (Token[i]=='>' && Token[i+1]=='=') + || (Token[i]=='>' && Token[i+1]=='>') + || (Token[i]=='<' && Token[i+1]=='<') + || (Token[i]=='-' && Token[i+1]=='>') + || (Token[i]=='<' && Token[i+1]=='-') + || (Token[i]=='/' && Token[i+1]=='*') + || (Token[i]=='*' && Token[i+1]=='/') + || (Token[i]=='/' && Token[i+1]=='/') + ){ + painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , Token.mid(i,2)); + charCols += edit->charColumns(Token[i+1]); + i+=1; + drawed = true; + } + } + if (!drawed) { + painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , Token[i]); + drawed = true; + } nX += charCols * edit->mCharWidth; } diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index f071be83..733d80f8 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -578,6 +578,16 @@ void Settings::Editor::setHighlightMathingBraces(bool newHighlightMathingBraces) mHighlightMathingBraces = newHighlightMathingBraces; } +bool Settings::Editor::enableLigaturesSupport() const +{ + return mEnableLigaturesSupport; +} + +void Settings::Editor::setEnableLigaturesSupport(bool newEnableLigaturesSupport) +{ + mEnableLigaturesSupport = newEnableLigaturesSupport; +} + bool Settings::Editor::highlightCurrentWord() const { return mHighlightCurrentWord; @@ -1090,6 +1100,7 @@ void Settings::Editor::doSave() saveValue("font_name",mFontName); saveValue("font_size", mFontSize); saveValue("font_only_monospaced",mFontOnlyMonospaced); + saveValue("enable_ligatures_support", mEnableLigaturesSupport); //gutter saveValue("gutter_visible", mGutterVisible); @@ -1209,6 +1220,7 @@ void Settings::Editor::doLoad() #endif mFontSize = intValue("font_size",14); mFontOnlyMonospaced = boolValue("font_only_monospaced",true); + mEnableLigaturesSupport = boolValue("enable_ligatures_support", false); //gutter mGutterVisible = boolValue("gutter_visible",true); diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h index 50d025f4..9ec48f48 100644 --- a/RedPandaIDE/settings.h +++ b/RedPandaIDE/settings.h @@ -363,6 +363,9 @@ public: bool highlightMathingBraces() const; void setHighlightMathingBraces(bool newHighlightMathingBraces); + bool enableLigaturesSupport() const; + void setEnableLigaturesSupport(bool newEnableLigaturesSupport); + private: //General // indents @@ -397,6 +400,7 @@ public: bool mShowRightEdgeLine; int mRightEdgeWidth; QColor mRightEdgeLineColor; + bool mEnableLigaturesSupport; //Font //font diff --git a/RedPandaIDE/settingsdialog/editorfontwidget.cpp b/RedPandaIDE/settingsdialog/editorfontwidget.cpp index 31842865..2090b4b2 100644 --- a/RedPandaIDE/settingsdialog/editorfontwidget.cpp +++ b/RedPandaIDE/settingsdialog/editorfontwidget.cpp @@ -57,6 +57,7 @@ void EditorFontWidget::doLoad() ui->chkOnlyMonospacedFonts->setChecked(pSettings->editor().fontOnlyMonospaced()); ui->cbFont->setCurrentFont(QFont(pSettings->editor().fontName())); ui->spinFontSize->setValue(pSettings->editor().fontSize()); + ui->chkLigature->setChecked(pSettings->editor().enableLigaturesSupport()); //gutter ui->chkGutterVisible->setChecked(pSettings->editor().gutterVisible()); @@ -79,6 +80,7 @@ void EditorFontWidget::doSave() pSettings->editor().setFontOnlyMonospaced(ui->chkOnlyMonospacedFonts->isChecked()); pSettings->editor().setFontName(ui->cbFont->currentFont().family()); pSettings->editor().setFontSize(ui->spinFontSize->value()); + pSettings->editor().setEnableLigaturesSupport(ui->chkLigature->isChecked()); //gutter pSettings->editor().setGutterVisible(ui->chkGutterVisible->isChecked()); diff --git a/RedPandaIDE/settingsdialog/editorfontwidget.ui b/RedPandaIDE/settingsdialog/editorfontwidget.ui index 66f5f973..92b06329 100644 --- a/RedPandaIDE/settingsdialog/editorfontwidget.ui +++ b/RedPandaIDE/settingsdialog/editorfontwidget.ui @@ -23,14 +23,14 @@ 11 - - + + - Size: + Font: - + @@ -68,14 +68,7 @@ - - - - Font: - - - - + @@ -126,6 +119,20 @@ + + + + Enable Ligatures Support + + + + + + + Size: + + +