[fix] 部分CJK显示不出来

This commit is contained in:
2026-06-06 10:17:01 +08:00
Unverified
parent 500d302ea9
commit 15e8aedfd2
3 changed files with 142 additions and 5 deletions
-3
View File
@@ -37,7 +37,6 @@ static f26_6 render_codepoint(ttf_face_t* face, SSINT32 cp,
EFI_GRAPHICS_OUTPUT_BLT_PIXEL color)
{
SUINT16 gid = ttf_cmap_lookup(face, cp);
if (gid == 0 && cp != 0) gid = 0; // notdef
if (!ttf_load_glyph(face, gid, pixel_size, &s_outline)) {
return 0; // composite / parse error
@@ -83,8 +82,6 @@ static f26_6 render_codepoint(ttf_face_t* face, SSINT32 cp,
ttf_rasterize(s_segs, n_segs, 0, 0, pw, ph, s_coverage, N);
// Screen origin of bitmap
// bitmap (0, 0) is at font (xmin, ymax) which is at screen
// (x + xmin/64, y - ymax/64) since screen y is flipped
SSINT32 px_screen = x + (s_outline.xmin >> 6);
SSINT32 py_screen = y - (s_outline.ymax >> 6);