Looking for Fira Sans by file name using the metropolis beamer theme (e.g. for Overleaf)











up vote
0
down vote

favorite












I'm using the metropolis beamer theme. In beamerfontthememetropolis.sty, the fonts are loaded by font name, e.g.:



setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}


however, I need to look up the fonts by file name since I don't have them installed globally. The situation arises for example when using Overleaf. The Overleaf documentation just suggests to change the setXXXfont commands so to tell fontspec to look up the font by file name instead of by font name, and this makes sense.



However, I'm not setting the fonts myself, but rather I'm loading the metropolis theme, which loads the fonts and sets lots of beamer options. I could of course take the font settings from the metropolis code, paste it in my own theme and change the code, but that looks dirty.



So is there a way to tell metropolis to load specific file names for the Fira Sans font, without copy/pasting code from the theme itself?



Another way could be to issue the setsansfont command after the loading the theme. But in this case, is there a way to temporarily suppress the "font not found" errors?










share|improve this question






















  • Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
    – samcarter
    17 hours ago










  • So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
    – gigabytes
    17 hours ago










  • Yes, as long as you compile with xelatex or lualatex.
    – samcarter
    17 hours ago










  • That's good news. Is this something that changed (relatively) recently?
    – gigabytes
    16 hours ago










  • I don't know. After reading your question I tested it and it worked.
    – samcarter
    16 hours ago

















up vote
0
down vote

favorite












I'm using the metropolis beamer theme. In beamerfontthememetropolis.sty, the fonts are loaded by font name, e.g.:



setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}


however, I need to look up the fonts by file name since I don't have them installed globally. The situation arises for example when using Overleaf. The Overleaf documentation just suggests to change the setXXXfont commands so to tell fontspec to look up the font by file name instead of by font name, and this makes sense.



However, I'm not setting the fonts myself, but rather I'm loading the metropolis theme, which loads the fonts and sets lots of beamer options. I could of course take the font settings from the metropolis code, paste it in my own theme and change the code, but that looks dirty.



So is there a way to tell metropolis to load specific file names for the Fira Sans font, without copy/pasting code from the theme itself?



Another way could be to issue the setsansfont command after the loading the theme. But in this case, is there a way to temporarily suppress the "font not found" errors?










share|improve this question






















  • Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
    – samcarter
    17 hours ago










  • So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
    – gigabytes
    17 hours ago










  • Yes, as long as you compile with xelatex or lualatex.
    – samcarter
    17 hours ago










  • That's good news. Is this something that changed (relatively) recently?
    – gigabytes
    16 hours ago










  • I don't know. After reading your question I tested it and it worked.
    – samcarter
    16 hours ago















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm using the metropolis beamer theme. In beamerfontthememetropolis.sty, the fonts are loaded by font name, e.g.:



setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}


however, I need to look up the fonts by file name since I don't have them installed globally. The situation arises for example when using Overleaf. The Overleaf documentation just suggests to change the setXXXfont commands so to tell fontspec to look up the font by file name instead of by font name, and this makes sense.



However, I'm not setting the fonts myself, but rather I'm loading the metropolis theme, which loads the fonts and sets lots of beamer options. I could of course take the font settings from the metropolis code, paste it in my own theme and change the code, but that looks dirty.



So is there a way to tell metropolis to load specific file names for the Fira Sans font, without copy/pasting code from the theme itself?



Another way could be to issue the setsansfont command after the loading the theme. But in this case, is there a way to temporarily suppress the "font not found" errors?










share|improve this question













I'm using the metropolis beamer theme. In beamerfontthememetropolis.sty, the fonts are loaded by font name, e.g.:



setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}


however, I need to look up the fonts by file name since I don't have them installed globally. The situation arises for example when using Overleaf. The Overleaf documentation just suggests to change the setXXXfont commands so to tell fontspec to look up the font by file name instead of by font name, and this makes sense.



However, I'm not setting the fonts myself, but rather I'm loading the metropolis theme, which loads the fonts and sets lots of beamer options. I could of course take the font settings from the metropolis code, paste it in my own theme and change the code, but that looks dirty.



So is there a way to tell metropolis to load specific file names for the Fira Sans font, without copy/pasting code from the theme itself?



Another way could be to issue the setsansfont command after the loading the theme. But in this case, is there a way to temporarily suppress the "font not found" errors?







beamer fontspec






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 17 hours ago









gigabytes

1,3561018




1,3561018












  • Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
    – samcarter
    17 hours ago










  • So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
    – gigabytes
    17 hours ago










  • Yes, as long as you compile with xelatex or lualatex.
    – samcarter
    17 hours ago










  • That's good news. Is this something that changed (relatively) recently?
    – gigabytes
    16 hours ago










  • I don't know. After reading your question I tested it and it worked.
    – samcarter
    16 hours ago




















  • Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
    – samcarter
    17 hours ago










  • So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
    – gigabytes
    17 hours ago










  • Yes, as long as you compile with xelatex or lualatex.
    – samcarter
    17 hours ago










  • That's good news. Is this something that changed (relatively) recently?
    – gigabytes
    16 hours ago










  • I don't know. After reading your question I tested it and it worked.
    – samcarter
    16 hours ago


















Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
– samcarter
17 hours ago




Why do you need to load font by filename on overleaf? If metropolis is compiled with xelatex or lualatex, it uses fira font by default, even on overleaf
– samcarter
17 hours ago












So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
– gigabytes
17 hours ago




So do you mean Overleaf has Fira Fonts installed and the metropolis theme finds them out of the box?
– gigabytes
17 hours ago












Yes, as long as you compile with xelatex or lualatex.
– samcarter
17 hours ago




Yes, as long as you compile with xelatex or lualatex.
– samcarter
17 hours ago












That's good news. Is this something that changed (relatively) recently?
– gigabytes
16 hours ago




That's good news. Is this something that changed (relatively) recently?
– gigabytes
16 hours ago












I don't know. After reading your question I tested it and it worked.
– samcarter
16 hours ago






I don't know. After reading your question I tested it and it worked.
– samcarter
16 hours ago












1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










The answer is simple: just do nothing.



As long as the document is compiled with xelatex or lualatex it will use fira fonts per default which also works on overleaf.



The following image shows how to select the engine on overleaf:



enter image description here






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%2f459617%2flooking-for-fira-sans-by-file-name-using-the-metropolis-beamer-theme-e-g-for-o%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
    2
    down vote



    accepted










    The answer is simple: just do nothing.



    As long as the document is compiled with xelatex or lualatex it will use fira fonts per default which also works on overleaf.



    The following image shows how to select the engine on overleaf:



    enter image description here






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      The answer is simple: just do nothing.



      As long as the document is compiled with xelatex or lualatex it will use fira fonts per default which also works on overleaf.



      The following image shows how to select the engine on overleaf:



      enter image description here






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        The answer is simple: just do nothing.



        As long as the document is compiled with xelatex or lualatex it will use fira fonts per default which also works on overleaf.



        The following image shows how to select the engine on overleaf:



        enter image description here






        share|improve this answer












        The answer is simple: just do nothing.



        As long as the document is compiled with xelatex or lualatex it will use fira fonts per default which also works on overleaf.



        The following image shows how to select the engine on overleaf:



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 16 hours ago









        samcarter

        80.9k789257




        80.9k789257






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459617%2flooking-for-fira-sans-by-file-name-using-the-metropolis-beamer-theme-e-g-for-o%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?