Adding a font to X11 XLoadQueryFont

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I'm trying to use an old binary (HP VEX simulator: http://www.hpl.hp.com/downloads/vex) which uses VCG visualization tool (http://www.rw.cdl.uni-saarland.de/~sander/html/gsvcg1.html) on Ubuntu 16.04.4 LTS.



I cannot produce any graphical output because of the function call XLoadQueryFont returns false when trying to load courier font. Here are some snippets from the source code:



#define VCG_DEFAULT_FONT "-*-courier-*-*-*--14-*-*-*-*-*-*-*"
char Xfontname[512] = VCG_DEFAULT_FONT;
panel_font = XLoadQueryFont(root_display,Xfontname);
if (!panel_font)
Fatal_error("Font not found.","");


I tried adding the courier font to my X11 fonts to solve this issue but I can't manage to figure it out. I got courier regular from http://fontsgeek.com/fonts/Courier-Regular/download and add it to ~/.fonts but that didn't solve the issue.



I tried following http://vietunicode.sourceforge.net/howto/fontlinux.html and https://wiki.ubuntu.com/Fonts but it still doesn't work.



Also it's interesting that running xlsfonts returns a courier font but with size 10, not 14, which probably doesn't match the one in the source code.



# xlsfonts | grep courier
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso8859-1
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-ascii-0
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso10646-1
-bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso8859-1


Any idea what would be the right way to add "-*-courier-*-*-*--14-*-*-*-*-*-*-*" font to X11 so that it will be detected by XLoadQueryFont?



Thanks!







share|improve this question


























    up vote
    0
    down vote

    favorite
    1












    I'm trying to use an old binary (HP VEX simulator: http://www.hpl.hp.com/downloads/vex) which uses VCG visualization tool (http://www.rw.cdl.uni-saarland.de/~sander/html/gsvcg1.html) on Ubuntu 16.04.4 LTS.



    I cannot produce any graphical output because of the function call XLoadQueryFont returns false when trying to load courier font. Here are some snippets from the source code:



    #define VCG_DEFAULT_FONT "-*-courier-*-*-*--14-*-*-*-*-*-*-*"
    char Xfontname[512] = VCG_DEFAULT_FONT;
    panel_font = XLoadQueryFont(root_display,Xfontname);
    if (!panel_font)
    Fatal_error("Font not found.","");


    I tried adding the courier font to my X11 fonts to solve this issue but I can't manage to figure it out. I got courier regular from http://fontsgeek.com/fonts/Courier-Regular/download and add it to ~/.fonts but that didn't solve the issue.



    I tried following http://vietunicode.sourceforge.net/howto/fontlinux.html and https://wiki.ubuntu.com/Fonts but it still doesn't work.



    Also it's interesting that running xlsfonts returns a courier font but with size 10, not 14, which probably doesn't match the one in the source code.



    # xlsfonts | grep courier
    -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
    -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
    -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1
    -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso8859-1
    -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
    -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-ascii-0
    -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso10646-1
    -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso8859-1
    -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
    -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-ascii-0
    -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso10646-1
    -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso8859-1
    -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
    -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-ascii-0
    -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso10646-1
    -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso8859-1


    Any idea what would be the right way to add "-*-courier-*-*-*--14-*-*-*-*-*-*-*" font to X11 so that it will be detected by XLoadQueryFont?



    Thanks!







    share|improve this question
























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I'm trying to use an old binary (HP VEX simulator: http://www.hpl.hp.com/downloads/vex) which uses VCG visualization tool (http://www.rw.cdl.uni-saarland.de/~sander/html/gsvcg1.html) on Ubuntu 16.04.4 LTS.



      I cannot produce any graphical output because of the function call XLoadQueryFont returns false when trying to load courier font. Here are some snippets from the source code:



      #define VCG_DEFAULT_FONT "-*-courier-*-*-*--14-*-*-*-*-*-*-*"
      char Xfontname[512] = VCG_DEFAULT_FONT;
      panel_font = XLoadQueryFont(root_display,Xfontname);
      if (!panel_font)
      Fatal_error("Font not found.","");


      I tried adding the courier font to my X11 fonts to solve this issue but I can't manage to figure it out. I got courier regular from http://fontsgeek.com/fonts/Courier-Regular/download and add it to ~/.fonts but that didn't solve the issue.



      I tried following http://vietunicode.sourceforge.net/howto/fontlinux.html and https://wiki.ubuntu.com/Fonts but it still doesn't work.



      Also it's interesting that running xlsfonts returns a courier font but with size 10, not 14, which probably doesn't match the one in the source code.



      # xlsfonts | grep courier
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso8859-1


      Any idea what would be the right way to add "-*-courier-*-*-*--14-*-*-*-*-*-*-*" font to X11 so that it will be detected by XLoadQueryFont?



      Thanks!







      share|improve this question














      I'm trying to use an old binary (HP VEX simulator: http://www.hpl.hp.com/downloads/vex) which uses VCG visualization tool (http://www.rw.cdl.uni-saarland.de/~sander/html/gsvcg1.html) on Ubuntu 16.04.4 LTS.



      I cannot produce any graphical output because of the function call XLoadQueryFont returns false when trying to load courier font. Here are some snippets from the source code:



      #define VCG_DEFAULT_FONT "-*-courier-*-*-*--14-*-*-*-*-*-*-*"
      char Xfontname[512] = VCG_DEFAULT_FONT;
      panel_font = XLoadQueryFont(root_display,Xfontname);
      if (!panel_font)
      Fatal_error("Font not found.","");


      I tried adding the courier font to my X11 fonts to solve this issue but I can't manage to figure it out. I got courier regular from http://fontsgeek.com/fonts/Courier-Regular/download and add it to ~/.fonts but that didn't solve the issue.



      I tried following http://vietunicode.sourceforge.net/howto/fontlinux.html and https://wiki.ubuntu.com/Fonts but it still doesn't work.



      Also it's interesting that running xlsfonts returns a courier font but with size 10, not 14, which probably doesn't match the one in the source code.



      # xlsfonts | grep courier
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-iso8859-1
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-ascii-0
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso10646-1
      -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-iso8859-1


      Any idea what would be the right way to add "-*-courier-*-*-*--14-*-*-*-*-*-*-*" font to X11 so that it will be detected by XLoadQueryFont?



      Thanks!









      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 17:36









      Thomas

      3,39741123




      3,39741123










      asked Mar 7 at 15:36









      hkassir72

      32




      32




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,



          -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
          -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
          -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
          -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
          -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
          -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
          -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
          -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1


          That automatically updates the font-directory:



          sudo apt-get install xfonts-75dpi





          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428776%2fadding-a-font-to-x11-xloadqueryfont%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,



            -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
            -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
            -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
            -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
            -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
            -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
            -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
            -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1


            That automatically updates the font-directory:



            sudo apt-get install xfonts-75dpi





            share|improve this answer
























              up vote
              0
              down vote



              accepted










              The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,



              -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
              -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
              -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
              -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
              -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
              -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
              -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
              -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1


              That automatically updates the font-directory:



              sudo apt-get install xfonts-75dpi





              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,



                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1


                That automatically updates the font-directory:



                sudo apt-get install xfonts-75dpi





                share|improve this answer












                The right way would be to install the xfonts-75dpi package, which has the pattern that you're looking for, e.g.,



                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso10646-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
                -adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1


                That automatically updates the font-directory:



                sudo apt-get install xfonts-75dpi






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 7 at 21:38









                Thomas Dickey

                49.2k584154




                49.2k584154






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428776%2fadding-a-font-to-x11-xloadqueryfont%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)