-
Notifications
You must be signed in to change notification settings - Fork 14
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
register_font: support for new API #111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Pango 1.52.0 supports a new API for registering fonts on Windows and this commit adds support for it. - Using the new API requires adding the font to every PangoFontMap that is used in the application. - Due to this, the font files is stored in memory and registered with every PangoFontMap that is created when rendering text. - `list_fonts` is improved by caching the list of fonts based on the registered font files. Signed-off-by: Naveen M K <[email protected]>
- Introduce `RegisterFont` dataclass to store font information - Only registers fonts registered using win32 backend - Other methods also only handles what it needs to
naveen521kk
force-pushed
the
register-font-refactor
branch
2 times, most recently
from
September 11, 2024 17:13
4e9a153
to
01f6223
Compare
they changed now
since python 3.8 doesn't have it
naveen521kk
force-pushed
the
register-font-refactor
branch
2 times, most recently
from
September 11, 2024 17:34
cf9b168
to
b5e07c1
Compare
- `local()` is a internal function and broke in python 3.13 - instead use `exec` with a global dict
naveen521kk
force-pushed
the
register-font-refactor
branch
from
September 11, 2024 17:37
b5e07c1
to
ebb1f0d
Compare
naveen521kk
force-pushed
the
register-font-refactor
branch
from
September 11, 2024 17:38
ebb1f0d
to
7ff3c10
Compare
naveen521kk
force-pushed
the
register-font-refactor
branch
2 times, most recently
from
September 11, 2024 18:04
70b3927
to
6eabae6
Compare
naveen521kk
force-pushed
the
register-font-refactor
branch
from
September 11, 2024 18:06
6eabae6
to
9aa0534
Compare
naveen521kk
force-pushed
the
register-font-refactor
branch
3 times, most recently
from
September 13, 2024 05:45
624b957
to
3f6b9ea
Compare
naveen521kk
force-pushed
the
register-font-refactor
branch
from
September 13, 2024 05:48
3f6b9ea
to
550f472
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
list_fonts
is improved by caching the list of fonts based on the registered font files.