From faab22c40ed9971e8f70df22b943b487f4616b37 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 27 Oct 2026 20:45:27 +0800 Subject: [PATCH] feat(font): use the full Noto Sans SC font and enlarge the disk - FontDemo points at /FONTS/FONT.TTF - build.py installs NotoSansSC-6.ttf as disk/fonts/font.ttf - grow disk.img from 64 MiB to 256 MiB --- Apps/FontDemo/main.vp | 2 +- Scripts/disk.ps1 | 2 +- build.py | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Apps/FontDemo/main.vp b/Apps/FontDemo/main.vp index 2f2c9c2..89fc1ca 100644 --- a/Apps/FontDemo/main.vp +++ b/Apps/FontDemo/main.vp @@ -6,7 +6,7 @@ import vpsdk.fonttools.fonttools as fonttools import string from stdint import * -define FONT_PATH = "/FONTS/DEMO.TTF" +define FONT_PATH = "/FONTS/FONT.TTF" define WIN_X = 1000 define WIN_Y = 500 define WIN_W = 720 diff --git a/Scripts/disk.ps1 b/Scripts/disk.ps1 index e0e344a..10971fa 100644 --- a/Scripts/disk.ps1 +++ b/Scripts/disk.ps1 @@ -41,7 +41,7 @@ $DISK_IMG = Join-Path $PROJECT_DIR "disk.img" $DISK_DIR = Join-Path $PROJECT_DIR "disk" $MOUNT_LETTER = "Z:" -$IMAGE_SIZE = 64 * 1024 * 1024 +$IMAGE_SIZE = 256 * 1024 * 1024 Write-Host "=== Creating disk image ===" -ForegroundColor Cyan diff --git a/build.py b/build.py index 47a15b0..247f79b 100644 --- a/build.py +++ b/build.py @@ -89,6 +89,14 @@ def CopyBrotliDict(): shutil.copy(src, "./disk/libs/brotli.dict") +def CopyFonts(): + """Install the full Source Han Sans / Noto Sans SC font for FontDemo.""" + os.makedirs("./disk/fonts", exist_ok=True) + src = "NotoSansSC/NotoSansSC-6.ttf" + if os.path.exists(src): + shutil.copy(src, "./disk/fonts/font.ttf") + + def BuildLibs(): """编译 Libs/ 下的动态库(应用运行期经 LOAD_SO 加载)。""" os.makedirs("./disk/libs", exist_ok=True) @@ -244,6 +252,7 @@ else: print("[build] 跳过内核编译(--app 或 --nokernel)") BuildApps() BuildBootloader() + CopyFonts() BuildDisk() RunQemu() \ No newline at end of file