Replies: 3 comments
|
Hi Wes, Yes, Marco is currently using the fontconfig crate. I’d be happy to help test the new API changes and provide feedback. Before I start adapting things on my side, it would help to know your expected timeline/deadline for the 0.11 release, so I can plan the work properly. Thanks for reaching out and for the work on the crate. |
There's currently no planned date. Mostly waiting to see what, if any feedback comes in. Sometime in the next 3 weeks or so might be a good target. |
|
I have successfully tested and adapted Marco to fontconfig 0.11.0-rc.1. This technical feedback is grounded in:
How Marco Integrates FontconfigMarco leverages fontconfig exclusively for font discovery and enumeration on Linux systems. The integration is architecturally isolated and non-critical—Marco gracefully degrades to a hardcoded fallback font list on systems without fontconfig. Core Use Case: Populating a monospace font selector in the editor UI with system-available fonts, allowing users to customize their editing environment. API Surface Utilized:
Architectural Pattern:
Technical Assessment of API Changes1. Result-Based Error Handling: Excellent Design DecisionAPI Shift: Functions transitioned from Analysis: This represents a marked improvement in error handling semantics: Advantages:
Example Scenario: Prior to this change, when Assessment Rating: 5/5 - Straightforward to integrate
2. FontSet as Iterator: Sound Memory ArchitectureAPI Shift: Analysis: This is an architecturally sound decision for this use case:
Assessment Rating: 4/5 - Straightforward to integrate
3. FontconfigError Type Introduction: Valuable Signal ImprovementAPI Addition: New Analysis: This addition enables sophisticated error handling strategies:
Assessment: Valuable addition that improves production robustness. Empirical Test Coverage and ValidationI created six targeted test cases exercising the new API:
Aggregate Results: All 12 font_loader tests pass. Zero compiler warnings. Zero clippy violations. Detailed ObservationsDocumentation SufficiencyThe docs.rs rendering at https://docs.rs/fontconfig/0.11.0-rc.1/fontconfig/ is clear and well-structured. Result-based examples demonstrate the pattern effectively. Constructive Suggestion: A migration guide documenting the specific transformations required (e.g., "Option::ok_or() patterns become Result handling with ?") would accelerate adoption for existing consumers. Backward Compatibility Implications
Performance CharacteristicsI observed no performance regressions:
Error Path CoverageComprehensive testing of error conditions:
Integration Timeline AnalysisI measured the end-to-end adaptation timeline: Total Time Investment: Approximately 2 hours from initial API review to production-ready implementation
Integration Complexity: Low
Recommendations for Release
Technical ConclusionAssessment: The 0.11.0-rc.1 API changes represent thoughtful, production-grade API design with clear improvement vectors over the previous iteration. Strengths Observed:
Marco Integration Status:
Timeline Feasibility: Your indicated 3-week target is achievable. Based on Marco's integration experience, similar Rust projects should require 2-3 hours of focused adaptation work. I appreciate the thoughtful design process and the community outreach. Soliciting pre-release feedback demonstrates strong open-source stewardship. Marco will be prepared to adopt 0.11.0 on release. Project Reference: Marco (https://github.com/Ranrar/Marco) - GTK4 markdown editor with fontconfig integration on Linux platforms. This technical validation is available for reference in fontconfig release communications if useful for downstream consumers evaluating the upgrade path. |
Uh oh!
There was an error while loading. Please reload this page.
Hello, I am one of the maintainers of the fontconfig crate, which Marco appears to use. I've recently worked on a revamp of the API to better handle and surface errors. Many of the functions now return
Result.Before publishing the release I was hoping to get feedback from users of the crate. I'd like to check that the changes seem reasonable, are relatively straightforward to adapt to, and any other thoughts about the changes or documentation. I've published a pre-release version: 0.11.0-rc.1. The docs are available at https://docs.rs/fontconfig/0.11.0-rc.1/fontconfig/. Feedback can be a comment here, or yeslogic/fontconfig-rs#58
I understand everyone is busy, so if you don't have time or interest in this, that's totally fine, feel free to close the issue.
All reactions