-
Couldn't load subscription status.
- Fork 110
Add NSFontAssetRequest implementation #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@fredkiefer I have tested this and it is working. Please take a look and let me know if it is acceptable. |
|
@fredkiefer Please review when ready. This is tested and working. The font is properly added (at least the ones I have tested). |
|
I am going on a two week holiday trip right now and won't have the time to review this properly. If you want a quick review, feel free to ask @rfm . |
Okay. Have a nice trip. :) |
|
@rfm Please take a look. I have addressed @fredkiefer 's latest comments. |
|
I'm away from home for the next week and a half, and don't think I'll be able to look at this until I'm back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements NSFontAssetRequest, a class for downloading and installing font assets dynamically. The implementation provides a complete font downloading system with support for CSS-based font URLs (like Google Fonts), direct font file URLs, and cross-platform font installation.
- Implements NSFontAssetRequest with progress tracking and completion handlers
- Adds GSFontAssetDownloader as a pluggable backend for font downloading and installation
- Integrates font cache refresh notifications to update the font panel when new fonts are installed
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Source/NSFontAssetRequest.m | Complete implementation of NSFontAssetRequest class with download orchestration |
| Source/GSFontAssetDownloader.m | New font downloading backend with CSS parsing, validation, and installation |
| Source/NSFontManager.m | Adds font cache refresh method with notification support |
| Source/NSFontPanel.m | Integrates font manager notifications to refresh panel when fonts change |
| Source/GSFontInfo.m | Adds font cache refresh functionality to font enumerator |
| Headers/AppKit/NSFontAssetRequest.h | Header updates with GNUstep extensions |
| Headers/Additions/GNUstepGUI/GSFontAssetDownloader.h | New header for font downloader class |
| Headers/AppKit/NSProgressIndicator.h | Adds modern style constants for compatibility |
| Headers/AppKit/NSFontManager.h | Adds private method and notification declarations |
| Headers/Additions/GNUstepGUI/GSFontInfo.h | Adds refreshFontCache method declaration |
| Source/GNUmakefile | Updates build system to include new GSFontAssetDownloader files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
I think this one is ready to merge @rfm and @fredkiefer. Please review and let me know. |
|
Hey guys, I think this PR is ready @rfm , @fredkiefer |
|
I realize you guys are busy. Unless there is an objection, I will go ahead and merge this given that the functionality is working and since it is absent in the baseline. @fredkiefer @rfm |
|
Please let me know. |
|
All concerns with this PR have been addressed. I am merging and closing this PR. |
|
It's a large patch, and I'm only just back from holiday, so I haven't had a chance to review in any detail. However I see no obvious problem merging.
…
On 27 Sept 2025 at 19:20, Gregory Casamento ***@***.***> wrote:
gcasa left a comment (gnustep/libs-gui#361)
I realize you guys are busy. Unless there is an objection, I will go ahead and merge this given that the functionality is working and since it is absent in the baseline. @fredkiefer @rfm
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Most of this PR looks OK to me (although I would prefer if we do large format changes in files separately). But the part about font installation looks wrong and dangerous to me and actually I would prefer if we could revert this merge. |
I will revert this in the morning. I hadn't thought about some of these considerations. Thanks @fredkiefer |
|
I will make another PR and move the relevant code to the backend. |
|
Thank you Greg, I think it would be sufficient to just remove the font installation code here and not to revert the whole PR. Th question then is, how should we structure that code in the backend to reduce the security risks? One position would be to move the decision over to the user. If they really want to download and install a font from a dubious website it is their problem. |
I am working to answer these questions right now. I am not sure. I think confirmation by the user is sufficient. The downloader uses google fonts, mainly because I can't think of any other place where I can get the full font list AND then download the fonts for free. :/ I implemented it so that a developer could implement one and use that if needed so the developer isn't locked in. So the user can't just get a font from anywhere. Thanks fred. I hope your vacation was restful. GC |

This PR provides an implementation of NSFontAssetRequest.
The test for this is here:
https://github.com/gcasa/NSFontAssetRequest_test