How can I make a psf font for the console from a otf one?











up vote
6
down vote

favorite
1












I want to use the Inconsolata font in the tty console, but I need to generate a psf font for that.



I found that there are two tools that should help me otf2bdf and bdf2psf, but every time I try to use the second one I get:



/usr/bin/bdf2psf: Inconsolata12.bdf: the width is not integer number.









share|improve this question
























  • This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
    – slm
    Oct 14 '14 at 5:34












  • @slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
    – HalosGhost
    Oct 14 '14 at 5:40















up vote
6
down vote

favorite
1












I want to use the Inconsolata font in the tty console, but I need to generate a psf font for that.



I found that there are two tools that should help me otf2bdf and bdf2psf, but every time I try to use the second one I get:



/usr/bin/bdf2psf: Inconsolata12.bdf: the width is not integer number.









share|improve this question
























  • This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
    – slm
    Oct 14 '14 at 5:34












  • @slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
    – HalosGhost
    Oct 14 '14 at 5:40













up vote
6
down vote

favorite
1









up vote
6
down vote

favorite
1






1





I want to use the Inconsolata font in the tty console, but I need to generate a psf font for that.



I found that there are two tools that should help me otf2bdf and bdf2psf, but every time I try to use the second one I get:



/usr/bin/bdf2psf: Inconsolata12.bdf: the width is not integer number.









share|improve this question















I want to use the Inconsolata font in the tty console, but I need to generate a psf font for that.



I found that there are two tools that should help me otf2bdf and bdf2psf, but every time I try to use the second one I get:



/usr/bin/bdf2psf: Inconsolata12.bdf: the width is not integer number.






tty fonts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Rui F Ribeiro

38.2k1475123




38.2k1475123










asked Oct 13 '14 at 18:52









eloyesp

1313




1313












  • This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
    – slm
    Oct 14 '14 at 5:34












  • @slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
    – HalosGhost
    Oct 14 '14 at 5:40


















  • This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
    – slm
    Oct 14 '14 at 5:34












  • @slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
    – HalosGhost
    Oct 14 '14 at 5:40
















This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
– slm
Oct 14 '14 at 5:34






This one looks extremely close to this Q: unix.stackexchange.com/questions/21100/…
– slm
Oct 14 '14 at 5:34














@slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
– HalosGhost
Oct 14 '14 at 5:40




@slm, in my opinion, the question isn't actually about converting a bdf to a psf; it's about converting an otf to a psf. Going through bdf was just a tentative solution that the OP attempted.
– HalosGhost
Oct 14 '14 at 5:40










1 Answer
1






active

oldest

votes

















up vote
4
down vote













I'm actually trying to solve this very same problem.
I worked it out by reading through this thread email exchange that took place some time ago.
visit here.



I still need to try this out .
I'll report back if I get it to work.



Edit:
I was able to create the PSF font but have not tried to use it as a TTY font. I believe that was the implication of the question.
This is the way that I created the font (copied quasi-directly from the link).





  1. Convert the OTF to BDF



    otf2bdf -r 72 -p 12 -c C /usr/share/fonts/truetype/incon...a/inconsolata.otf |
    sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH 80/" > inconsolata-12.bdf


    (the sed invocation is required because bdf2psf sanity-checks the
    AVERAGE_WIDTH property rather than the font bounding box, or checking
    the DWIDTHs of the glyphs that it actually uses)




  2. Convert the BDF file to a PSF file:



    bdf2psf inconsolata-12.bdf /usr/share/bdf2psf/standard.equivalents 
    /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 inconsolata-12.psf



That's it.






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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f161890%2fhow-can-i-make-a-psf-font-for-the-console-from-a-otf-one%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote













    I'm actually trying to solve this very same problem.
    I worked it out by reading through this thread email exchange that took place some time ago.
    visit here.



    I still need to try this out .
    I'll report back if I get it to work.



    Edit:
    I was able to create the PSF font but have not tried to use it as a TTY font. I believe that was the implication of the question.
    This is the way that I created the font (copied quasi-directly from the link).





    1. Convert the OTF to BDF



      otf2bdf -r 72 -p 12 -c C /usr/share/fonts/truetype/incon...a/inconsolata.otf |
      sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH 80/" > inconsolata-12.bdf


      (the sed invocation is required because bdf2psf sanity-checks the
      AVERAGE_WIDTH property rather than the font bounding box, or checking
      the DWIDTHs of the glyphs that it actually uses)




    2. Convert the BDF file to a PSF file:



      bdf2psf inconsolata-12.bdf /usr/share/bdf2psf/standard.equivalents 
      /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 inconsolata-12.psf



    That's it.






    share|improve this answer



























      up vote
      4
      down vote













      I'm actually trying to solve this very same problem.
      I worked it out by reading through this thread email exchange that took place some time ago.
      visit here.



      I still need to try this out .
      I'll report back if I get it to work.



      Edit:
      I was able to create the PSF font but have not tried to use it as a TTY font. I believe that was the implication of the question.
      This is the way that I created the font (copied quasi-directly from the link).





      1. Convert the OTF to BDF



        otf2bdf -r 72 -p 12 -c C /usr/share/fonts/truetype/incon...a/inconsolata.otf |
        sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH 80/" > inconsolata-12.bdf


        (the sed invocation is required because bdf2psf sanity-checks the
        AVERAGE_WIDTH property rather than the font bounding box, or checking
        the DWIDTHs of the glyphs that it actually uses)




      2. Convert the BDF file to a PSF file:



        bdf2psf inconsolata-12.bdf /usr/share/bdf2psf/standard.equivalents 
        /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 inconsolata-12.psf



      That's it.






      share|improve this answer

























        up vote
        4
        down vote










        up vote
        4
        down vote









        I'm actually trying to solve this very same problem.
        I worked it out by reading through this thread email exchange that took place some time ago.
        visit here.



        I still need to try this out .
        I'll report back if I get it to work.



        Edit:
        I was able to create the PSF font but have not tried to use it as a TTY font. I believe that was the implication of the question.
        This is the way that I created the font (copied quasi-directly from the link).





        1. Convert the OTF to BDF



          otf2bdf -r 72 -p 12 -c C /usr/share/fonts/truetype/incon...a/inconsolata.otf |
          sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH 80/" > inconsolata-12.bdf


          (the sed invocation is required because bdf2psf sanity-checks the
          AVERAGE_WIDTH property rather than the font bounding box, or checking
          the DWIDTHs of the glyphs that it actually uses)




        2. Convert the BDF file to a PSF file:



          bdf2psf inconsolata-12.bdf /usr/share/bdf2psf/standard.equivalents 
          /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 inconsolata-12.psf



        That's it.






        share|improve this answer














        I'm actually trying to solve this very same problem.
        I worked it out by reading through this thread email exchange that took place some time ago.
        visit here.



        I still need to try this out .
        I'll report back if I get it to work.



        Edit:
        I was able to create the PSF font but have not tried to use it as a TTY font. I believe that was the implication of the question.
        This is the way that I created the font (copied quasi-directly from the link).





        1. Convert the OTF to BDF



          otf2bdf -r 72 -p 12 -c C /usr/share/fonts/truetype/incon...a/inconsolata.otf |
          sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH 80/" > inconsolata-12.bdf


          (the sed invocation is required because bdf2psf sanity-checks the
          AVERAGE_WIDTH property rather than the font bounding box, or checking
          the DWIDTHs of the glyphs that it actually uses)




        2. Convert the BDF file to a PSF file:



          bdf2psf inconsolata-12.bdf /usr/share/bdf2psf/standard.equivalents 
          /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 inconsolata-12.psf



        That's it.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 8 at 13:33









        F. Hauri

        2,5791226




        2,5791226










        answered Jan 22 '15 at 6:28









        Xinerama

        494




        494






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f161890%2fhow-can-i-make-a-psf-font-for-the-console-from-a-otf-one%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt