GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — font finding in OSX produces 200+ lines of warnings · Issue #28249 · matplotlib/matplotlib

font finding in OSX produces 200+ lines of warnings #28249

New issue
Copy link
New issue
Copy link
Closed
#31977
Closed
font finding in OSX produces 200+ lines of warnings#28249
#31977
Copy link
Labels
OS: Appletopic: text/fonts
Milestone
v3.12.0

Description

@tacaswell
tacaswell
opened on May 17, 2024
Issue body actions
          @anntzer, on my macos 10.15.7 Catalina
system_profiler -xml SPFontsDataType  2>&1    # <- def _get_macos_fonts() in mpl 3.9.0

💥

2024-05-17 11:56:24.964 system_profiler[1061:15889] CoreText note: Client requested name ".AlBayanPUA", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.964 system_profiler[1061:15889] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2024-05-17 11:56:24.968 system_profiler[1061:15889] CoreText note: Client requested name ".AlBayanPUA-Bold", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.972 system_profiler[1061:15889] CoreText note: Client requested name ".AlNilePUA", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.975 system_profiler[1061:15889] CoreText note: Client requested name ".AlNilePUA-Bold", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.978 system_profiler[1061:15889] CoreText note: Client requested name ".AlTarikhPUA", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.982 system_profiler[1061:15889] CoreText note: Client requested name ".AppleColorEmojiUI", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.985 system_profiler[1061:15889] CoreText note: Client requested name ".AppleSDGothicNeoI-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.988 system_profiler[1061:15889] CoreText note: Client requested name ".AppleSDGothicNeoI-Medium", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2024-05-17 11:56:24.991 system_profiler[1061:15889] CoreText note: Client requested name ".AppleSDGothicNeoI-Light", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
...

200-odd such lines.
So I reinstalled matplotlib==3.8.4.
Please advise: are there functions in font_manager.py I can call to help debug this
or caches / .jsons I can delete ? Thanks

Originally posted by @denis-bz in #27230 (comment)

Activity

Next
  1. tacaswell
    added this to the v3.9.1 milestone on May 17, 2024
  2. denis-bz commented on May 17, 2024

    @denis-bz
    denis-bz
    on May 17, 2024
    More actions

    Should the title be "font finding in OSX 10.15 ..." ?
    MacOS_version_history says it's an "old version", not even "Older version, still maintained".
    (Is there info on macos-versions-tested someplace ?

    Oughta be in METADATA.

    Added: https://endoflife.date/macos https://endoflife.date/python ... give a little more info;
    ahhh, planned obsolescence ...

  3. tacaswell commented on May 17, 2024

    @tacaswell
    tacaswell
    on May 17, 2024
    MemberAuthor
    More actions

    Do we know it is osx version specific?

  4. jklymak commented on May 17, 2024

    @jklymak
    jklymak
    on May 17, 2024
    Member
    More actions

    This does not happen for 14.x (Sonoma). Catalina is quite old - not sure when the difference would have come in.

  5. denis-bz commented on May 18, 2024

    @denis-bz
    denis-bz
    on May 18, 2024
    More actions

    edit Sunday 19 May:
    Folks,
    until this is reproduced on other Macos versions, I'd drop it to low low priority --
    better things to do than try to decipher these murky error messages (I got nowhere).
    A workaround that works for me is to just ignore stderr in
    font_manager.py _get_macos_fonts, instead of check_output --

    @lru_cache
    def _get_macos_fonts():
        p = subprocess.Popen( "system_profiler -xml SPFontsDataType" .split(),
                stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=False )
        d, = plistlib.loads( p.stdout.read() )  # not load( p.stdout )    
        items = [Path(entry["path"]) for entry in d["_items"]]
        # print( "▄ bp _get_macos_fonts", len(items) );  breakpoint()
        return items
    
  6. anntzer commented on May 20, 2024

    @anntzer
    anntzer
    on May 20, 2024
    Contributor
    More actions

    Unfortunately I can't repro this on any of the macos versions present on GHA (which start at macos11). I suspect that the practical solution is indeed to silently ignore errors from system_profiler, at least when stdout is valid xml (i.e. we can assume that we'll still get a useful list of fonts from it).

  7. QuLogic
    modified the milestones: v3.9.1, v3.9.2 on Jul 4, 2024
  8. QuLogic
    modified the milestones: v3.9.2, v3.9.3 on Aug 12, 2024
  9. QuLogic
    modified the milestones: v3.9.3, v3.10.1 on Nov 30, 2024
  10. ksunden
    modified the milestones: v3.10.1, v3.10.2 on Feb 21, 2025
  11. ksunden
    removed this from the v3.10.2 milestone on May 2, 2025
  12. 1 remaining item

  13. dstansby
    added
    OS: Apple
    topic: text/fonts
    on May 12, 2025
  14. tacaswell
    modified the milestones: v3.10.4, v3.11.0 on Jul 24, 2025
  15. QuLogic
    modified the milestones: v3.11.0, v3.11.1 on Jun 9, 2026
  16. denis-bz commented on Jun 12, 2026

    @denis-bz
    denis-bz
    on Jun 12, 2026
    More actions

    @tacaswell, folks,
    pip install matplotlib to 3.11.0 seems to have hidden SPFontsDataType
    so that system_profiler -xml SPFontsDataType spits out 200 lines of warnings like the above
    (which I don't understand).
    Worse, back to pip install matplotlib==3.10.9 doesn't help;
    rm -r ~/Library/Caches doesn't help. Can a macos-font expert help me ?

    _get_macos_fonts in the two font_manager.py look the same.

    (This is on the same old mac 10.15, which I realize is endoflife ...)
    Thanks, cheers

  17. iccir commented on Jun 27, 2026

    @iccir
    iccir
    on Jun 27, 2026
    Contributor
    More actions

    @denis-bz - To be clear, if you run system_profile in Terminal on the 10.15 machine, you are getting the 200 lines of warnings? If so, the problem is internal to the system_profile utility and is something that Apple fixed in macOS 11 and later.

    This message originates from TDescriptorSource::CopyFontDescriptorPerPostScriptName in the CoreText framework. If TDescriptorSource::ShouldSubstituteInvisibleFontName returns true, CTFontLogSystemFontNameRequest() is called and the logs print. There's a flag that suppresses this behavior, which is likely what Apple started using on macOS 11 to prevent the output.

    For 10.15, I don't think there's anything that can be done other than filter out lines with "CoreText note" from stderr.

  18. iccir commented on Jun 27, 2026

    @iccir
    iccir
    on Jun 27, 2026
    Contributor
    More actions

    After installing macOS 10.15 Catalina and reversing the CoreText, SPFontReporter, and UIFoundation binaries, I don't think that there's any way to avoid this error. The only way is to filter out the lines that contain "CoreText note".

    In 10.15, -[SPFontReporter infoForDescriptor:] always calls +[NSFont fontWithName:size:], which will always print this log message by design.

    In 11.0, Apple added a check to see if the font is private (starts with a .). If true, they no longer call into +[NSFont fontWithName:size:].

    Binary Ninja output from 11.0's SPFontReporter binary Image
  19. denis-bz commented on Jul 2, 2026

    @denis-bz
    denis-bz
    on Jul 2, 2026
    More actions

    @iccir, thanks for going through these twisty passages; IOU a beverage of your choice 🍺

  20. QuLogic
    modified the milestones: v3.11.1, v3.11.2 on Jul 17, 2026
  21. QuLogic
    closed this as completedin #31977on Aug 6, 2026
  22. QuLogic
    modified the milestones: v3.11.2, v3.12.0 on Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS: Appletopic: text/fonts

    Type

    No type

    Projects

    No projects

      Milestone

      • v3.12.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.