How to turn on font features with Libertine and LuaLaTeX?











up vote
3
down vote

favorite












I'd like to get the Libertine fonts with the font features hlig, liga and onum, and also load the relevant mono font and Biolinum for the sans font.



It seems I can simply use usepackage{libertine} to get the font with LuaTeX according to the Libertine documentation, but having read that plus the fontspec documentation, I'm not able to figure out how to actually turn on these features. Something to do with Ligatures=Common, Ligatures=Historic, etc. but where do I put these?










share|improve this question
























  • Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    – Mico
    6 hours ago















up vote
3
down vote

favorite












I'd like to get the Libertine fonts with the font features hlig, liga and onum, and also load the relevant mono font and Biolinum for the sans font.



It seems I can simply use usepackage{libertine} to get the font with LuaTeX according to the Libertine documentation, but having read that plus the fontspec documentation, I'm not able to figure out how to actually turn on these features. Something to do with Ligatures=Common, Ligatures=Historic, etc. but where do I put these?










share|improve this question
























  • Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    – Mico
    6 hours ago













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I'd like to get the Libertine fonts with the font features hlig, liga and onum, and also load the relevant mono font and Biolinum for the sans font.



It seems I can simply use usepackage{libertine} to get the font with LuaTeX according to the Libertine documentation, but having read that plus the fontspec documentation, I'm not able to figure out how to actually turn on these features. Something to do with Ligatures=Common, Ligatures=Historic, etc. but where do I put these?










share|improve this question















I'd like to get the Libertine fonts with the font features hlig, liga and onum, and also load the relevant mono font and Biolinum for the sans font.



It seems I can simply use usepackage{libertine} to get the font with LuaTeX according to the Libertine documentation, but having read that plus the fontspec documentation, I'm not able to figure out how to actually turn on these features. Something to do with Ligatures=Common, Ligatures=Historic, etc. but where do I put these?







fonts luatex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 6 hours ago

























asked 6 hours ago









Roxy

3365




3365












  • Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    – Mico
    6 hours ago


















  • Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    – Mico
    6 hours ago
















Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
– Mico
6 hours ago




Did you try (a) loading the fontspec package and (b) issuing the instruction setmainfont{Linux Libertine O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
– Mico
6 hours ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Something like this? (to be compiled under LuaLaTeX or XeLaTeX)



enter image description here



Speaking for myself, I find Ligatures={Common,Rare,Historic}, Numbers=OldStyle easier to read than RawFeature=+liga;+dlig;+hlig;+onum.



documentclass{article}
usepackage{fontspec}
setmainfont{Linux Libertine O}%
[Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
begin{document}
0123456789

ff fi fj fl ft ffi ffl fft, tt, ct st

itshape
ff fi fj fl ft ffi ffl fft, tt, ct st
end{document}





share|improve this answer























  • That's it, thanks.
    – Roxy
    6 hours ago










  • To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
    – Mico
    6 hours ago










  • Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
    – Roxy
    2 hours ago


















up vote
2
down vote













From page 3 of the libertine package manual:




The option defaultfeatures=... allows the user to add default OpenType features.




You can therefore do this in XeLaTeX or LuaLaTeX:



documentclass[varwidth, preview]{standalone}
usepackage[defaultfeatures={Ligatures={Common, Historic, TeX}}
]{libertine}

begin{document}
Test
end{document}


Test



You can also use another package, such as libertine-otf, with a Ligatures= package option. Or bypass the package entirely and use fontspec.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    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%2ftex.stackexchange.com%2fquestions%2f463432%2fhow-to-turn-on-font-features-with-libertine-and-lualatex%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Something like this? (to be compiled under LuaLaTeX or XeLaTeX)



    enter image description here



    Speaking for myself, I find Ligatures={Common,Rare,Historic}, Numbers=OldStyle easier to read than RawFeature=+liga;+dlig;+hlig;+onum.



    documentclass{article}
    usepackage{fontspec}
    setmainfont{Linux Libertine O}%
    [Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    begin{document}
    0123456789

    ff fi fj fl ft ffi ffl fft, tt, ct st

    itshape
    ff fi fj fl ft ffi ffl fft, tt, ct st
    end{document}





    share|improve this answer























    • That's it, thanks.
      – Roxy
      6 hours ago










    • To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
      – Mico
      6 hours ago










    • Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
      – Roxy
      2 hours ago















    up vote
    2
    down vote



    accepted










    Something like this? (to be compiled under LuaLaTeX or XeLaTeX)



    enter image description here



    Speaking for myself, I find Ligatures={Common,Rare,Historic}, Numbers=OldStyle easier to read than RawFeature=+liga;+dlig;+hlig;+onum.



    documentclass{article}
    usepackage{fontspec}
    setmainfont{Linux Libertine O}%
    [Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    begin{document}
    0123456789

    ff fi fj fl ft ffi ffl fft, tt, ct st

    itshape
    ff fi fj fl ft ffi ffl fft, tt, ct st
    end{document}





    share|improve this answer























    • That's it, thanks.
      – Roxy
      6 hours ago










    • To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
      – Mico
      6 hours ago










    • Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
      – Roxy
      2 hours ago













    up vote
    2
    down vote



    accepted







    up vote
    2
    down vote



    accepted






    Something like this? (to be compiled under LuaLaTeX or XeLaTeX)



    enter image description here



    Speaking for myself, I find Ligatures={Common,Rare,Historic}, Numbers=OldStyle easier to read than RawFeature=+liga;+dlig;+hlig;+onum.



    documentclass{article}
    usepackage{fontspec}
    setmainfont{Linux Libertine O}%
    [Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    begin{document}
    0123456789

    ff fi fj fl ft ffi ffl fft, tt, ct st

    itshape
    ff fi fj fl ft ffi ffl fft, tt, ct st
    end{document}





    share|improve this answer














    Something like this? (to be compiled under LuaLaTeX or XeLaTeX)



    enter image description here



    Speaking for myself, I find Ligatures={Common,Rare,Historic}, Numbers=OldStyle easier to read than RawFeature=+liga;+dlig;+hlig;+onum.



    documentclass{article}
    usepackage{fontspec}
    setmainfont{Linux Libertine O}%
    [Ligatures={Common,Rare,Historic}, Numbers=OldStyle]
    begin{document}
    0123456789

    ff fi fj fl ft ffi ffl fft, tt, ct st

    itshape
    ff fi fj fl ft ffi ffl fft, tt, ct st
    end{document}






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 6 hours ago

























    answered 6 hours ago









    Mico

    271k30367755




    271k30367755












    • That's it, thanks.
      – Roxy
      6 hours ago










    • To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
      – Mico
      6 hours ago










    • Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
      – Roxy
      2 hours ago


















    • That's it, thanks.
      – Roxy
      6 hours ago










    • To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
      – Mico
      6 hours ago










    • Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
      – Roxy
      2 hours ago
















    That's it, thanks.
    – Roxy
    6 hours ago




    That's it, thanks.
    – Roxy
    6 hours ago












    To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
    – Mico
    6 hours ago




    To add the associated sans-serif font, you could run setsansfont{Linux Biolinum O}[Ligatures={Common,Rare,Historic}, Numbers=OldStyle] after setmainfont. Not sure which mono font you consider to be the "relevant" one.
    – Mico
    6 hours ago












    Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
    – Roxy
    2 hours ago




    Hmm, I think because I know the raw feature names, RawFeature makes more sense to me.
    – Roxy
    2 hours ago










    up vote
    2
    down vote













    From page 3 of the libertine package manual:




    The option defaultfeatures=... allows the user to add default OpenType features.




    You can therefore do this in XeLaTeX or LuaLaTeX:



    documentclass[varwidth, preview]{standalone}
    usepackage[defaultfeatures={Ligatures={Common, Historic, TeX}}
    ]{libertine}

    begin{document}
    Test
    end{document}


    Test



    You can also use another package, such as libertine-otf, with a Ligatures= package option. Or bypass the package entirely and use fontspec.






    share|improve this answer

























      up vote
      2
      down vote













      From page 3 of the libertine package manual:




      The option defaultfeatures=... allows the user to add default OpenType features.




      You can therefore do this in XeLaTeX or LuaLaTeX:



      documentclass[varwidth, preview]{standalone}
      usepackage[defaultfeatures={Ligatures={Common, Historic, TeX}}
      ]{libertine}

      begin{document}
      Test
      end{document}


      Test



      You can also use another package, such as libertine-otf, with a Ligatures= package option. Or bypass the package entirely and use fontspec.






      share|improve this answer























        up vote
        2
        down vote










        up vote
        2
        down vote









        From page 3 of the libertine package manual:




        The option defaultfeatures=... allows the user to add default OpenType features.




        You can therefore do this in XeLaTeX or LuaLaTeX:



        documentclass[varwidth, preview]{standalone}
        usepackage[defaultfeatures={Ligatures={Common, Historic, TeX}}
        ]{libertine}

        begin{document}
        Test
        end{document}


        Test



        You can also use another package, such as libertine-otf, with a Ligatures= package option. Or bypass the package entirely and use fontspec.






        share|improve this answer












        From page 3 of the libertine package manual:




        The option defaultfeatures=... allows the user to add default OpenType features.




        You can therefore do this in XeLaTeX or LuaLaTeX:



        documentclass[varwidth, preview]{standalone}
        usepackage[defaultfeatures={Ligatures={Common, Historic, TeX}}
        ]{libertine}

        begin{document}
        Test
        end{document}


        Test



        You can also use another package, such as libertine-otf, with a Ligatures= package option. Or bypass the package entirely and use fontspec.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 6 hours ago









        Davislor

        4,202820




        4,202820






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463432%2fhow-to-turn-on-font-features-with-libertine-and-lualatex%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

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            Refactoring coordinates for Minecraft Pi buildings written in Python