libFont: ship Noto Sans as the fallback font #1917

Manually merged
github merged 4 commits from gh-pr/1917/head into gh-pr/1917/base 2026-11-26 10:08:50 +00:00
Owner

@⁠MrBigBritches on GitHub · 2026-10-26 18:23 UTC · original
MrBigBritches:font-buildstep → main · +56 −46 · 4 files · 4 commits · merged 2026-10-27 06:51 UTC

Installed builds drew every character of a PS5 system font as ?. Fonts that stb_truetype can't read, including every font set opened with sceFontOpenFontSet, fell back to Roboto from Tracy's source folder. That folder was found relative to the source tree or the working directory, and installed builds have neither.

This PR downloads Noto Sans at configure time, ships it beside the emulator, and loads it from there.

  • cmake: download Noto Sans at configure time: fetches the hinted Regular, Bold, Italic and Bold Italic styles of Noto Sans v2.015, plus the licence, from notofonts.github.io with FetchContent. The source commit and each file's SHA-256 are pinned, and TLS verification is on. The four files are fetched individually instead of the 117 MB release archive.
  • cmake: ship Noto Sans beside the emulator: copies the fonts to assets/fonts next to kyty_emulator on every build, the same way as the touch cursors and trophy sound. They're installed to assets/fonts and, on macOS, into KytyPS5.app/Contents/Resources/assets/fonts. The SIL Open Font License goes under licenses/noto-sans.
  • libFont: fall back to the shipped Noto Sans instead of Tracy's Roboto: loads the matching style from assets/fonts under SDL_GetBasePath(). It logs when a font file is missing or the base path can't be found.

Testing

  • Windows, clang-cl (VS 2022 Build Tools, amd64), Release: configure and the launcher build succeed. The fonts land in _Build/windows/assets/fonts and in assets/fonts in the install folder.
  • ctest: 63 of 65 tests pass. Neither failure involves fonts:
    • vdecsw doesn't build on MSVC's C runtime: tests/VdecswTests.cpp uses std::aligned_alloc, which it doesn't provide. This was already on main, from a7a734b5.
    • kernel_file_system crashes with 0xc0000028 every time. No test uses fonts, but this hasn't been confirmed against main.
  • Not tested on Linux or macOS. The macOS bundle install path follows the existing trophy-sound rule.
**@⁠MrBigBritches** on GitHub · 2026-10-26 18:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917) `MrBigBritches:font-buildstep` → `main` · +56 −46 · 4 files · 4 commits · merged 2026-10-27 06:51 UTC Installed builds drew every character of a PS5 system font as `?`. Fonts that stb_truetype can't read, including every font set opened with `sceFontOpenFontSet`, fell back to Roboto from Tracy's source folder. That folder was found relative to the source tree or the working directory, and installed builds have neither. This PR downloads Noto Sans at configure time, ships it beside the emulator, and loads it from there. - **`cmake: download Noto Sans at configure time`**: fetches the hinted Regular, Bold, Italic and Bold Italic styles of Noto Sans v2.015, plus the licence, from notofonts.github.io with FetchContent. The source commit and each file's SHA-256 are pinned, and TLS verification is on. The four files are fetched individually instead of the 117 MB release archive. - **`cmake: ship Noto Sans beside the emulator`**: copies the fonts to `assets/fonts` next to `kyty_emulator` on every build, the same way as the touch cursors and trophy sound. They're installed to `assets/fonts` and, on macOS, into `KytyPS5.app/Contents/Resources/assets/fonts`. The SIL Open Font License goes under `licenses/noto-sans`. - **`libFont: fall back to the shipped Noto Sans instead of Tracy's Roboto`**: loads the matching style from `assets/fonts` under `SDL_GetBasePath()`. It logs when a font file is missing or the base path can't be found. ## Testing - Windows, clang-cl (VS 2022 Build Tools, amd64), Release: configure and the `launcher` build succeed. The fonts land in `_Build/windows/assets/fonts` and in `assets/fonts` in the install folder. - `ctest`: 63 of 65 tests pass. Neither failure involves fonts: - `vdecsw` doesn't build on MSVC's C runtime: `tests/VdecswTests.cpp` uses `std::aligned_alloc`, which it doesn't provide. This was already on `main`, from a7a734b5. - `kernel_file_system` crashes with `0xc0000028` every time. No test uses fonts, but this hasn't been confirmed against `main`. - Not tested on Linux or macOS. The macOS bundle install path follows the existing trophy-sound rule.
Fetch the hinted Regular, Bold, Italic and Bold Italic of Noto Sans
v2.015 and their licence from the Noto project's font distribution
(notofonts.github.io) with FetchContent, like the other third-party
dependencies. The commit and each file's SHA-256 are pinned in
variables.

Only these four styles are needed, so they are fetched individually
instead of through the release archive (117 MB, every style and build).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy the downloaded fonts to assets/fonts next to kyty_emulator on every
build, like the touch cursors and the trophy sound, and install them
there with the SIL Open Font License under licenses/noto-sans.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fonts stb_truetype cannot read, including every system font set opened
with sceFontOpenFontSet, used Roboto from Tracy's source folder, found
relative to the source tree or the working directory. Installed builds
have neither, so their system fonts drew every character as '?'.

Load Noto Sans Regular, Bold, Italic or Bold Italic from assets/fonts
next to the emulator instead, and log when a file is missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:08:48 +00:00
github manually merged commit dceddb3db6 into gh-pr/1917/base 2026-11-26 10:08:50 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-26 18:29 UTC · original · edited 2026-10-27 06:09 UTC

Review in Change Stack →

Walkthrough

The build downloads four Noto Sans font styles and their license with SHA-256 verification. It copies the fonts into the emulator’s assets directory and adds font and license installation rules, including for the macOS bundle. Fallback font loading uses Noto Sans filenames and reads from the SDL-reported executable base path.

Suggested reviewers: nmzik

Priority: Normal

Change: Feature

Merge Risk: Low · up to dcedd

The remaining issues are bounded: font downloads lack the intended TLS verification, and a missing style file can make fallback glyphs unavailable for that style. Address both before merging if practical.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: shipping Noto Sans as the fallback font in libFont.
Description check Passed The description directly explains the fallback-font problem, the Noto Sans download and packaging changes, the loading behavior, and the reported test results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-26 18:29 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#issuecomment-6424152151) · edited 2026-10-27 06:09 UTC <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1917?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> The build downloads four Noto Sans font styles and their license with SHA-256 verification. It copies the fonts into the emulator’s assets directory and adds font and license installation rules, including for the macOS bundle. Fallback font loading uses Noto Sans filenames and reads from the SDL-reported executable base path. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <strong>Priority: <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/priority-normal-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Normal</strong> <!-- change_assessment_commit:"dceddb3db6ad453038b5185173165e89f76ff30c" --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-low-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Low</strong> · up to <code>dcedd</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `dcedd` --> <!-- final_review_risk_coverage:{"sourceCommitId":"dceddb3db6ad453038b5185173165e89f76ff30c","coveredCommitId":"dceddb3db6ad453038b5185173165e89f76ff30c","kind":"reviewed"} --> The remaining issues are bounded: font downloads lack the intended TLS verification, and a missing style file can make fallback glyphs unavailable for that style. Address both before merging if practical. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely identifies the main change: shipping Noto Sans as the fallback font in libFont. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the fallback-font problem, the Noto Sans download and packaging changes, the loading behavior, and the reported test results. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1917)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-26 18:29 UTC · original
On src/libs/libFont.cpp line 722 (outdated):

@@ -709,34 +713,19 @@ static std::vector<uint8_t> read_file_bytes(const std::filesystem::path& path) {
 	return data;
 }
 
-static std::vector<std::filesystem::path> fallback_font_candidates(const char* file_name) {
-	const auto rel =
-	    std::filesystem::path("3rdparty") / "tracy" / "profiler" / "src" / "font" / file_name;
-	std::vector<std::filesystem::path> paths;
-
-	auto source_root = std::filesystem::path(__FILE__).parent_path().parent_path().parent_path();
-	paths.push_back(source_root / rel);
-
-	std::error_code ec;
-	auto            cwd = std::filesystem::current_path(ec);
-	if (!ec) {
-		paths.push_back(cwd / rel);
-		paths.push_back(cwd / ".." / rel);
-		paths.push_back(cwd / ".." / ".." / rel);
-	}
-
-	return paths;
-}
-
 static std::vector<uint8_t> load_fallback_font_data(bool bold, bool italic) {
-	for (const auto& path: fallback_font_candidates(fallback_font_file_name(bold, italic))) {
-		auto data = read_file_bytes(path);
-		if (!data.empty()) {
-			return data;
-		}
+	const char* base_path = SDL_GetBasePath();
+	if (base_path == nullptr) {
+		LOGF("Font: SDL_GetBasePath failed: %s\n", SDL_GetError());
+		return {};
 	}
-
-	return {};
+	const auto path = std::filesystem::path(base_path) / "assets" / "fonts" /

Major · Functional Correctness · Quick win

Convert the SDL base path from UTF-8 explicitly.

If the Windows installation path contains non-ASCII characters, std::filesystem::path(base_path) can interpret SDL’s UTF-8 bytes using a different code page. The font read then uses the wrong path or fails, so the shipped fallback font remains unavailable. Use a UTF-8-aware conversion, such as Common::PathFromUtf8(base_path), before appending assets/fonts. (wiki.libsdl.org)

**@⁠coderabbitai[bot]** on GitHub · 2026-10-26 18:29 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#discussion_r4380987764) On `src/libs/libFont.cpp` line 722 (outdated): ```diff @@ -709,34 +713,19 @@ static std::vector<uint8_t> read_file_bytes(const std::filesystem::path& path) { return data; } -static std::vector<std::filesystem::path> fallback_font_candidates(const char* file_name) { - const auto rel = - std::filesystem::path("3rdparty") / "tracy" / "profiler" / "src" / "font" / file_name; - std::vector<std::filesystem::path> paths; - - auto source_root = std::filesystem::path(__FILE__).parent_path().parent_path().parent_path(); - paths.push_back(source_root / rel); - - std::error_code ec; - auto cwd = std::filesystem::current_path(ec); - if (!ec) { - paths.push_back(cwd / rel); - paths.push_back(cwd / ".." / rel); - paths.push_back(cwd / ".." / ".." / rel); - } - - return paths; -} - static std::vector<uint8_t> load_fallback_font_data(bool bold, bool italic) { - for (const auto& path: fallback_font_candidates(fallback_font_file_name(bold, italic))) { - auto data = read_file_bytes(path); - if (!data.empty()) { - return data; - } + const char* base_path = SDL_GetBasePath(); + if (base_path == nullptr) { + LOGF("Font: SDL_GetBasePath failed: %s\n", SDL_GetError()); + return {}; } - - return {}; + const auto path = std::filesystem::path(base_path) / "assets" / "fonts" / ``` <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/major-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Major** · **Functional Correctness** · **Quick win** **Convert the SDL base path from UTF-8 explicitly.** If the Windows installation path contains non-ASCII characters, `std::filesystem::path(base_path)` can interpret SDL’s UTF-8 bytes using a different code page. The font read then uses the wrong path or fails, so the shipped fallback font remains unavailable. Use a UTF-8-aware conversion, such as `Common::PathFromUtf8(base_path)`, before appending `assets/fonts`. ([wiki.libsdl.org](https://wiki.libsdl.org/SDL3/SDL_GetBasePath)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:b57ea1c99382a4c9b2c6afca --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-26 18:29 UTC · original · reviewed

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f90a8b1589 and 53b10d213e2d5508aa0741c1e701a7d6a975aa2e.

Files selected for processing: 4
  • 3rdparty/CMakeLists.txt
  • CMakeLists.txt
  • src/launcher/CMakeLists.txt
  • src/libs/libFont.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-26 18:29 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#pullrequestreview-5657068631) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/f90a8b1589d08ef48d933bd472d4ba864addaefb/.coderabbit.yaml>) - **Commit**: [f90a8b1](<https://github.com/KytyPS5/KytyPS5/commit/f90a8b1589d08ef48d933bd472d4ba864addaefb>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `c0d393ca-f6fa-4b3f-b7b0-52f7d95c61a6` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between f90a8b1589d08ef48d933bd472d4ba864addaefb and 53b10d213e2d5508aa0741c1e701a7d6a975aa2e. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 4</summary> <dl> <dd> * `3rdparty/CMakeLists.txt` * `CMakeLists.txt` * `src/launcher/CMakeLists.txt` * `src/libs/libFont.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=ad4bcfc2-38a0-4400-9f22-2ca5fe53437a attempt=13370f2c-4f18-46bf-bb5f-70859561e16d batch=1/1 -->
@ -45,0 +50,4 @@
function(kyty_fetch_noto_sans path sha256)
get_filename_component(name "${path}" NAME)
file(DOWNLOAD "${KYTY_NOTO_SANS_BASE_URL}/${path}" "${KYTY_NOTO_SANS_DIR}/${name}"
EXPECTED_HASH SHA256=${sha256})
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 06:08 UTC · original

Minor · Security & Privacy · Quick win

Enable TLS certificate verification for font downloads.

On supported CMake 3.19, file(DOWNLOAD) does not verify HTTPS certificates by default. Add TLS_VERIFY ON so the download meets the stated TLS requirement. The pinned SHA-256 hashes still protect file contents, but they do not enable certificate verification. (cmake.org)

Proposed change
--- "a/3rdparty/CMakeLists.txt"
+++ "b/3rdparty/CMakeLists.txt"
@@ -49,8 +49,9 @@
 set(KYTY_NOTO_SANS_DIR "${FETCHCONTENT_BASE_DIR}/noto-sans")
 function(kyty_fetch_noto_sans path sha256)
 	get_filename_component(name "${path}" NAME)
 	file(DOWNLOAD "${KYTY_NOTO_SANS_BASE_URL}/${path}" "${KYTY_NOTO_SANS_DIR}/${name}"
-		EXPECTED_HASH SHA256=${sha256})
+		EXPECTED_HASH SHA256=${sha256}
+		TLS_VERIFY ON)
 endfunction()
 kyty_fetch_noto_sans(LICENSE f2095b08bed08b23a6fe26112fcd679a2bee3f002eef077eb05d215ed1051bd8)
 kyty_fetch_noto_sans(NotoSans/hinted/ttf/NotoSans-Regular.ttf
Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

	file(DOWNLOAD "${KYTY_NOTO_SANS_BASE_URL}/${path}" "${KYTY_NOTO_SANS_DIR}/${name}"
		EXPECTED_HASH SHA256=${sha256}
		TLS_VERIFY ON)
**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 06:08 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#discussion_r4385619380) <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Security & Privacy** · **Quick win** **Enable TLS certificate verification for font downloads.** On supported CMake 3.19, `file(DOWNLOAD)` does not verify HTTPS certificates by default. Add `TLS_VERIFY ON` so the download meets the stated TLS requirement. The pinned SHA-256 hashes still protect file contents, but they do not enable certificate verification. ([cmake.org](https://cmake.org/cmake/help/v3.19/command/file.html?utm_source=openai)) <details> <summary>Proposed change</summary> <dl> <dd> ```diff --- "a/3rdparty/CMakeLists.txt" +++ "b/3rdparty/CMakeLists.txt" @@ -49,8 +49,9 @@ set(KYTY_NOTO_SANS_DIR "${FETCHCONTENT_BASE_DIR}/noto-sans") function(kyty_fetch_noto_sans path sha256) get_filename_component(name "${path}" NAME) file(DOWNLOAD "${KYTY_NOTO_SANS_BASE_URL}/${path}" "${KYTY_NOTO_SANS_DIR}/${name}" - EXPECTED_HASH SHA256=${sha256}) + EXPECTED_HASH SHA256=${sha256} + TLS_VERIFY ON) endfunction() kyty_fetch_noto_sans(LICENSE f2095b08bed08b23a6fe26112fcd679a2bee3f002eef077eb05d215ed1051bd8) kyty_fetch_noto_sans(NotoSans/hinted/ttf/NotoSans-Regular.ttf ``` </dd> </dl> </details> <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> <dl> <dd> > <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg" width="20" height="20" align="absmiddle" alt=""></picture> **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion file(DOWNLOAD "${KYTY_NOTO_SANS_BASE_URL}/${path}" "${KYTY_NOTO_SANS_DIR}/${name}" EXPECTED_HASH SHA256=${sha256} TLS_VERIFY ON) ``` </dd> </dl> </details> <!-- suggestion_end --> <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:8bea042b8ee7095f7982d14e --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -747,2 +720,3 @@
static const auto bold_italic = load_fallback_font_data("NotoSans-BoldItalic.ttf");
if (bold && italic && !bold_italic.empty()) {
if (bold && italic) {
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 06:08 UTC · original

Minor · Functional Correctness · Quick win

Use the regular font when a styled file is unavailable.

If one styled file is missing but NotoSans-Regular.ttf is present, these branches return empty data. init_font_face then uses the bitmap fallback, so unsupported characters render as ? for that style. Return the selected style only when its data is nonempty; otherwise return regular. (raw.githubusercontent.com)

Also applies to: 725-725, 728-728

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 06:08 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#discussion_r4385619411) <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Functional Correctness** · **Quick win** **Use the regular font when a styled file is unavailable.** If one styled file is missing but `NotoSans-Regular.ttf` is present, these branches return empty data. `init_font_face` then uses the bitmap fallback, so unsupported characters render as `?` for that style. Return the selected style only when its data is nonempty; otherwise return `regular`. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/dceddb3db6ad453038b5185173165e89f76ff30c/src/libs/libFont.cpp)) Also applies to: 725-725, 728-728 <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:245b83b5ddb414501fc25e97 --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 06:08 UTC · original · reviewed

Actionable comments posted: 2


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9f03886cc4 and dceddb3db6.

Files selected for processing: 3
  • 3rdparty/CMakeLists.txt
  • CMakeLists.txt
  • src/libs/libFont.cpp
Files with no reviewable changes: 1
  • CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 06:08 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1917#pullrequestreview-5662923099) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 2** --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/f90a8b1589d08ef48d933bd472d4ba864addaefb/.coderabbit.yaml>) - **Commit**: [f90a8b1](<https://github.com/KytyPS5/KytyPS5/commit/f90a8b1589d08ef48d933bd472d4ba864addaefb>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `236b3f6f-b92b-4589-8f5f-55e7e3294313` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 9f03886cc492faac17d898010e7b145183b692e4 and dceddb3db6ad453038b5185173165e89f76ff30c. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 3</summary> <dl> <dd> * `3rdparty/CMakeLists.txt` * `CMakeLists.txt` * `src/libs/libFont.cpp` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-no-changes.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files with no reviewable changes: 1</summary> <dl> <dd> * CMakeLists.txt </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=c11aec1d-376e-4a9b-86e3-9df2fdd49922 attempt=fb7d456a-cc3d-4994-9590-891a94199c0d batch=1/1 -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.