13 Star 0 Fork 9

ocs-commit/fontconfig

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
aae5ff1f2e1be978272c41bf809d15b6e47b1e2c.patch 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-12-30 19:50 +08:00 . - [Type] bugfix
From aae5ff1f2e1be978272c41bf809d15b6e47b1e2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott@chromium.org>
Date: Tue, 12 Nov 2024 17:02:04 +0200
Subject: [PATCH] Remove redundant leaf assignment in fcfreetype.c
Fixes #428
---
src/fcfreetype.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 50f382fc..be41ea19 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -2619,15 +2619,12 @@ FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks FC_UNUSED)
#endif
for (o = 0; o < NUM_DECODE; o++)
{
- FcChar32 page, off, ucs4;
- FcCharLeaf *leaf;
+ FcChar32 ucs4;
FT_UInt glyph;
if (FT_Select_Charmap (face, fcFontEncodings[o]) != 0)
continue;
- page = ~0;
- leaf = NULL;
ucs4 = FT_Get_First_Char (face, &glyph);
while (glyph != 0)
{
@@ -2643,19 +2640,8 @@ FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks FC_UNUSED)
good = FcFalse;
}
- if (good)
- {
- FcCharSetAddChar (fcs, ucs4);
- if ((ucs4 >> 8) != page)
- {
- page = (ucs4 >> 8);
- leaf = FcCharSetFindLeafCreate (fcs, ucs4);
- if (!leaf)
- goto bail;
- }
- off = ucs4 & 0xff;
- leaf->map[off >> 5] |= (1U << (off & 0x1f));
- }
+ if (good)
+ FcCharSetAddChar (fcs, ucs4);
ucs4 = FT_Get_Next_Char (face, ucs4, &glyph);
}
--
GitLab
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit/fontconfig.git
git@gitee.com:ocs-commit/fontconfig.git
ocs-commit
fontconfig
fontconfig
master

搜索帮助