Skip to content

Conversation

@Weixi779
Copy link
Contributor

@Weixi779 Weixi779 commented Dec 7, 2025

Closes #109

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.47%. Comparing base (17d55c1) to head (14535c5).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
SwiftDraw/Sources/Utilities/CGPath+Segment.swift 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   88.48%   88.47%   -0.01%     
==========================================
  Files         148      148              
  Lines        9966     9975       +9     
==========================================
+ Hits         8818     8825       +7     
- Misses       1148     1150       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Weixi779
Copy link
Contributor Author

Weixi779 commented Dec 8, 2025

Hi @swhitty,
Codecov reports low patch coverage because the new run-level font fallback path isn’t exercised by existing tests. I can add
a small CoreText-based test to assert that CTRun fonts are used (e.g. a CJK glyph renders via fallback) if you’re okay with
adding a platform-specific test gated by canImport(CoreText). Please let me know your preference.

@swhitty
Copy link
Owner

swhitty commented Dec 8, 2025

That's fine, I am able to merge anyway, but do you have a sample SVG I can add to the samples bundle that demonstrates this issue & fix?

@Weixi779
Copy link
Contributor Author

Weixi779 commented Dec 8, 2025

Thanks @swhitty! So quickly reply.
I’ve added a sample to Samples.bundle: cjk-fallback.svg.

It uses mixed CJK text with font-family="Helvetica" (often missing CJK glyphs) to trigger CoreText fallback:

  • Chinese: 敏捷的棕色狐狸跳过懒狗,窗前明月光照桌上旧书
  • Japanese: いろはにほへとちりぬるを わかよたれそ つねならむ
  • Korean: 다람쥐 헌 쳇바퀴에 타고파, 한글도 잘 보이나요?

The CJK lines may render missing glyphs; after this change, CoreText’s run-level fallback renders them correctly.

@swhitty swhitty merged commit bdf90b3 into swhitty:main Dec 8, 2025
6 checks passed
@swhitty
Copy link
Owner

swhitty commented Dec 8, 2025

Thank you 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CoreText run-level font fallback for glyph paths

2 participants