Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]:font_manager.findSystemFonts takes too long on macOS #29658

Open
@wasimxyz

Description

@wasimxyz

Summary

The following code takes 10-12 seconds to run on my machine:

importmatplotlib.font_managerasfont_managerfonts=font_manager.findSystemFonts(fontext="ttf")

For reference, I have 360 fonts installed according to Font Book.

Proposed fix

I fixed this issue inarcadia-pycolor #58 by just searching within the font directories myself:

def_find_macos_arcadia_fonts()->list[str]:"""    Search for Arcadia fonts in the standard macOS font directories.    """font_paths= []fordirpathinMACOS_FONT_DIRECTORIES:ifnotPath(dirpath).exists():continuepaths= [str(font_path)forfont_pathinPath(dirpath).glob("*.ttf")ifFONT_FILTER.lower()infont_path.name.lower()        ]font_paths.extend(paths)returnfont_paths

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp