更新代码

This commit is contained in:
feiyangqingyun
2022-11-24 20:15:50 +08:00
parent 2ce7ba59df
commit 65c1c61c40
102 changed files with 376 additions and 81 deletions

Binary file not shown.

View File

@@ -125,7 +125,7 @@ void frmIconHelper::initPanel()
if (ui->rbtnFontAliBaBa->isChecked()) {
start = 0xe500;
end = 0xea5d;
end = 0xec00;
iconFont = IconHelper::getIconFontAliBaBa();
} else if (ui->rbtnFontAwesome6->isChecked()) {
start = 0xe000;
@@ -197,7 +197,7 @@ bool frmIconHelper::checkIcon(int icon)
//过滤不存在的图形字体
//对该图片逐个扫描像素点,都是空白则意味着当前图形字体不存在
for (int i = 0; i < height; i++) {
for (int i = 0; i < height; ++i) {
uchar *lineByte = img.scanLine(i);
for (int j = 0; j < width; j++) {
uchar tp = lineByte[j];

View File

@@ -64,12 +64,12 @@ IconHelper *IconHelper::getIconHelper(int icon)
//由于部分值范围冲突所以可以指定索引来取
//fontawesome 0xf000-0xf2e0
//fontawesome6 0xe000-0xe33d 0xf000-0xf8ff
//iconfont 0xe501-0xe793 0xe8d5-0xea5d
//iconfont 0xe501-0xe793 0xe8d5-0xea5d 0xeb00-0xec00
//weather 0xe900-0xe9cf
IconHelper *iconHelper = iconFontAwesome;
if (iconFontIndex < 0) {
if ((icon > 0xe501 && icon < 0xe793) || (icon > 0xe8d5 && icon < 0xea5d)) {
if ((icon >= 0xe501 && icon <= 0xe793) || (icon >= 0xe8d5 && icon <= 0xea5d) || (icon >= 0xeb00 && icon <= 0xec00)) {
iconHelper = iconFontAliBaBa;
}
} else if (iconFontIndex == 0) {