Menu

#2817 Fontconfig warning: using without calling FcInit()

None
open-upstream-bug
nobody
None
2025-07-16
2025-07-13
MBoehme
No

I'm using gnuplot 6.0 patchlevel 3 and noticed after upgrading font-config to 2.17.1 the following warning:

Fontconfig warning: using without calling FcInit()

Right now it is only a warning, but it seems to be that "FcInit" will get mandatory soon.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2025-07-13

    Thanks for the report, but I think this message must be coming from a library rather than from gnuplot.

    Although gnuplot does not use or call into libfontconfig directly, several of the output modes (a.k.a. "terminals") depend on libraries that use libfontconfig. So I suspect that this is indicating one or more of the following libraries might need a matching upgrade.

    cairo-fc
    cairo
    gdk-3.0
    gdlib
    gtk4
    pangocairo
    pangoft2
    pango
    

    If the message is annoying, you might be able to suppress it by setting environmental variable FC_NO_MT.

     
  • JP CILLIERS

    JP CILLIERS - 2025-07-14

    Hi Ethan I've given the FC_NO_MT a try and no joy.
    I still get this when I open leafpad from my terminal:
    Fontconfig warning: using without calling FcInit()
    Any other ideas perhaps? I'm aware that it's not really that big of a deal but it DOES annoy me. :-) Thanks and btw I'm using a fully up-to-date Arch install.

     
    • Ethan Merritt

      Ethan Merritt - 2025-07-14

      "when I open leafpad from my terminal"
      Leafpad rather than gnuplot? That might be a clue that this warning comes from gtk. When you see this warning in gnuplot, what terminal is active?

       
      • JP CILLIERS

        JP CILLIERS - 2025-07-14

        TBH I never knew that I even had 'gnuplot' installed or that it existed. 😂😂 It looks pretty cool nonetheless. When I'm looking for a quick edit for say my ~/.zshrc file and don't feel like using Nvim or nano I use 'sudo leafpad ~/.zshrc' from my Tilix terminal. Invoking 'leafpad' without sudo from the terminal also produces the same error. I've got a suspicion that 'Pango' has something to do with this. But how to implement any sort of action or fix is beyond my pay-grade.

        PS. This error is produced from whatever terminal I use: fish (console), the bash terminal or tilix.

         

        Last edit: JP CILLIERS 2025-07-14
        • Ethan Merritt

          Ethan Merritt - 2025-07-14

          [puzzled look] You filed this bug on a gnuplot issue-tracker. and provided a version number for gnuplot, so I assumed you were reporting a gnuplot bug. Since this apparently is not the case I will close the issue here.

          Just for your future reference "terminal" means something special to gnuplot; it does not mean the window on the screen you are typing into. I doubt very much that your error message depends on that.

          Nevertheless, my earlier diagnosis still holds. The message is probably triggered by some action taken in one of the libraries I listed above. I think you will just have to wait for the relevant upstream projects to fix it and issue a new library version.

           

          Last edit: Ethan Merritt 2025-07-16
          • JP CILLIERS

            JP CILLIERS - 2025-07-14

            Sorry about that, I did not see the 'Home/ Browse/ gnuplot/ Bugs', the very small link(s) at the top of the page. I was focused on the actual error message thinking I'd found something that I could work with. My apologies for wasting your time it was unintentional. Best regards, Piers.

             
  • Ethan Merritt

    Ethan Merritt - 2025-07-14
    • status: open --> open-upstream-bug
    • Group: -->
    • Priority: -->
     
  • swanmoon

    swanmoon - 2025-07-15

    I am getting the same error after a large update on Manjaro yesterday. No such warning prior to the update. Terminals are pdfcairo and svg.

    I am on gnuplot Version 6.0 patchlevel 3.

    Should I simply ignore the warning and wait for this bug to be flushed out after another update to whatever package is causing it?

    Thanks.

    P.S. My son contributed a package to make available CSS-SVG named colors to Typst:
    https://typst.app/universe/package/niram-css/
    and would like to do the same for gnuplot. Where should he start and how?

     

    Last edit: swanmoon 2025-07-15
    • Ethan Merritt

      Ethan Merritt - 2025-07-15

      Just to be 100% clear, you are now seeing this error message while inside a gnuplot session?

      (1) If you seeing it after gnuplot command "set terminal pdfcairo", that would be consistent with the warning being triggered by the pango/cairo libraries. In that case I would also expect that it might be triggered from gnuplot command "set terminal wxt", since the wxt terminal also uses pango/cairo. However in the case of wxt there is an intervening software layer that could conceivably do something that would prevent the warning. So if you don't see the error when using the wxt terminal that might be useful information.

      (2) If you are seeing the message from gnuplot after "set terminal svg" then I am mystified. Gnuplot's svg terminal does not do any font handling at all. It simply writes the name of a font into the output *.svg file so that when the file is later opened in a browser, word processor, or svg editing program that viewing program can request the font by name. That is to say, if the warning appears because of a font request I would expect it to appear when you run the viewing program, not when you run gnuplot.

      So far I am reasoning only from the information on this bug-tracker. If/when one of my machines gets an equivalent libconfig update and I start seeing the warning here, then I might be able to investigate more deeply.

       
      • swanmoon

        swanmoon - 2025-07-15

        Just to be 100% clear, you are now seeing this error message while inside a gnuplot session?

        I see the message when running scripts from the command line as well as interactively with the pdfcairo and the pngcairo terminals but not the svg terminal. My apologies.

        So if you don't see the error when using the wxt terminal that might be useful information.

        I changed a script to use the wxt terminal and the error message did not show up.

         
    • Ethan Merritt

      Ethan Merritt - 2025-07-15

      P.S. My son contributed a package to make available CSS-SVG named colors to Typst:
      and would like to do the same for gnuplot. Where should he start and how?

      Please clarify. Is the idea to add a gnuplot interface to Typst, or is it to add named colors to gnuplot?

      I don't know what Typst is, so I can't help much there. Perhaps it would be similar to the gnuplot interface packages for Python or Julia? See this page of links

      As to providing colors... There is a table of color names in the source file .../src/tables.c. When you give a color name in a gnuplot command, this is where it looks.

      Option1: It would be a relatively simple project to add a new gnuplot command that would switch to using a different, or additional, table of color names in the same format. Step 1 would be to create this new table. You could test it by replacing the current table with the new table and recompiling gnuplot. Step 2 would be to add a new gnuplot command, or perhaps a new option to an existing command, that would either switch from the default color table to the new alternative color table.

      Option 2: Basically the same, but instead of adding the new color table as a fixed element in the gnuplot source files, have the new command read the color table from a file at run time. That way the user could add color names without having to recompile gnuplot.

      To pursue any of this, please open a new issue on the tracker for contributed patches

       
  • swanmoon

    swanmoon - 2025-07-15

    Please clarify. Is the idea to add a gnuplot interface to Typst, or is it to add named colors to gnuplot?z

    It is to add CSS/SVG named colors to gnuplot.

    We will follow up as advised.

     
  • Ethan Merritt

    Ethan Merritt - 2025-07-16

    Here is the definitive word on this message from the fontconfig authors:
    https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/472

    The message is harmless, and is apparently intended to prod other projects that use libfontconfig to pay attention to an API change that will happen in the future. Bad idea IMO, since the message mostly annoys or worries end users rather than developers.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.