Skip to content
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

Wrap freetype.Font to make replacement easier #418

Merged
merged 4 commits into from
Mar 11, 2023
Merged

Conversation

MyreMylar
Copy link
Owner

Replacing the freetype.Font submodule is tricky as it contains several subtle features the Pygame GUI makes use of (like adjustment of underlining for example).

This PR should make the process easier by wrapping up the parts of freetype.Font that the project uses so it is clearer what needs replacing and emulating for a swap to pygame.Font.

@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Patch coverage: 93.86% and project coverage change: +0.08 🎉

Comparison is base (7c706c1) 97.55% compared to head (03dd71c) 97.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
+ Coverage   97.55%   97.63%   +0.08%     
==========================================
  Files          81       83       +2     
  Lines       11215    11271      +56     
==========================================
+ Hits        10941    11005      +64     
+ Misses        274      266       -8     
Impacted Files Coverage Δ
pygame_gui/core/text/html_parser.py 92.54% <ø> (-0.03%) ⬇️
pygame_gui/elements/ui_text_box.py 99.44% <ø> (ø)
pygame_gui/core/text/text_box_layout_row.py 90.55% <60.00%> (+1.82%) ⬆️
pygame_gui/core/utility.py 95.22% <88.88%> (+2.75%) ⬆️
pygame_gui/core/gui_font_freetype.py 89.39% <89.39%> (ø)
pygame_gui/core/interfaces/__init__.py 100.00% <100.00%> (ø)
..._gui/core/interfaces/appearance_theme_interface.py 100.00% <100.00%> (ø)
...e_gui/core/interfaces/font_dictionary_interface.py 100.00% <100.00%> (ø)
pygame_gui/core/interfaces/gui_font_interface.py 100.00% <100.00%> (ø)
pygame_gui/core/text/hyperlink_text_chunk.py 100.00% <100.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MyreMylar MyreMylar merged commit 02ff4e4 into main Mar 11, 2023
@MyreMylar MyreMylar deleted the create-font-interface branch March 11, 2023 16:54
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.

1 participant