Skip to content

Improve FontData Copying: Replace String Constructor with Safer Approach #296

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

Open
ShahzaibIbrahim opened this issue May 5, 2025 · 0 comments · May be fixed by eclipse-platform/eclipse.platform.swt#2128
Assignees
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Milestone

Comments

@ShahzaibIbrahim
Copy link

Currently, we use the FontData(String) constructor to create a deep copy of a FontData object. Although this works per the API contract, it is not a robust or future-proof approach. To improve safety and maintainability, we should introduce a dedicated copy constructor like FontData(FontData) or a createCopy() method. This will ensure clearer intent and reduce the risk of errors if the internal behavior of FontData(String) changes.

@ShahzaibIbrahim ShahzaibIbrahim added HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT labels May 5, 2025
@ShahzaibIbrahim ShahzaibIbrahim added this to the 4.34 M3 milestone May 5, 2025
@HeikoKlare HeikoKlare moved this to 🆕 New in HiDPI May 5, 2025
@ShahzaibIbrahim ShahzaibIbrahim modified the milestones: 4.34 M3, 4.36 M3 May 6, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🆕 New to 🔖 Ready: Atomic in HiDPI May 7, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🔖 Ready: Atomic to 👀 In Review in HiDPI May 7, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 👀 In Review to 🏗 In Work: Short in HiDPI May 7, 2025
@ShahzaibIbrahim ShahzaibIbrahim self-assigned this May 7, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🏗 In Work: Short to 👀 In Review in HiDPI May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: 👀 In Review
Development

Successfully merging a pull request may close this issue.

1 participant