Skip to content

Conversation

@naveen521kk
Copy link
Member

  • 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.
- 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 <naveen521kk@gmail.com>
- Introduce `RegisterFont` dataclass to store font information - Only registers fonts registered using win32 backend - Other methods also only handles what it needs to
@naveen521kk naveen521kk force-pushed the register-font-refactor branch 2 times, most recently from 4e9a153 to 01f6223 Compare September 11, 2024 17:13
@naveen521kk naveen521kk force-pushed the register-font-refactor branch 2 times, most recently from cf9b168 to b5e07c1 Compare September 11, 2024 17:34
- `local()` is a internal function and broke in python 3.13 - instead use `exec` with a global dict
@naveen521kk naveen521kk force-pushed the register-font-refactor branch from b5e07c1 to ebb1f0d Compare September 11, 2024 17:37
@naveen521kk naveen521kk force-pushed the register-font-refactor branch from ebb1f0d to 7ff3c10 Compare September 11, 2024 17:38
@naveen521kk naveen521kk force-pushed the register-font-refactor branch 2 times, most recently from 70b3927 to 6eabae6 Compare September 11, 2024 18:04
@naveen521kk naveen521kk force-pushed the register-font-refactor branch from 6eabae6 to 9aa0534 Compare September 11, 2024 18:06
@naveen521kk naveen521kk linked an issue Sep 13, 2024 that may be closed by this pull request
@naveen521kk naveen521kk force-pushed the register-font-refactor branch 3 times, most recently from 624b957 to 3f6b9ea Compare September 13, 2024 05:45
@naveen521kk naveen521kk force-pushed the register-font-refactor branch from 3f6b9ea to 550f472 Compare September 13, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants