Can't switch to lining numerals with Junicode and fontspec

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












4















I'm using the Junicode typeface with the fontspec package, and I've set OldStyle numerals as the default. The OS numerals work fine, but if I try to switch to lining numbers in the middle of the text, they won't print, and instead LaTeX defaults to oldstyle. I get the following warning message:



Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'Junicode' with script 'CustomDefault' and language 'Default'.



However, according to Junicode's documentation, it does have both lining numbers and oldstyle. So I'm not sure why LaTeX can't find it.



Here's a MWE:



documentclass[12pt]article

usepackagefontspec
setmainfontJunicode[Numbers=OldStyle]

begindocument

123456789

liningnums123456789

addfontfeatureNumbers=Lining 123456789

enddocument


Which in prints the following:



Numbers printed.



How can I switch to lining numbers with Junicode and fontespec? I'm using LuaLaTeX, by the way.










share|improve this question


























    4















    I'm using the Junicode typeface with the fontspec package, and I've set OldStyle numerals as the default. The OS numerals work fine, but if I try to switch to lining numbers in the middle of the text, they won't print, and instead LaTeX defaults to oldstyle. I get the following warning message:



    Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'Junicode' with script 'CustomDefault' and language 'Default'.



    However, according to Junicode's documentation, it does have both lining numbers and oldstyle. So I'm not sure why LaTeX can't find it.



    Here's a MWE:



    documentclass[12pt]article

    usepackagefontspec
    setmainfontJunicode[Numbers=OldStyle]

    begindocument

    123456789

    liningnums123456789

    addfontfeatureNumbers=Lining 123456789

    enddocument


    Which in prints the following:



    Numbers printed.



    How can I switch to lining numbers with Junicode and fontespec? I'm using LuaLaTeX, by the way.










    share|improve this question
























      4












      4








      4








      I'm using the Junicode typeface with the fontspec package, and I've set OldStyle numerals as the default. The OS numerals work fine, but if I try to switch to lining numbers in the middle of the text, they won't print, and instead LaTeX defaults to oldstyle. I get the following warning message:



      Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'Junicode' with script 'CustomDefault' and language 'Default'.



      However, according to Junicode's documentation, it does have both lining numbers and oldstyle. So I'm not sure why LaTeX can't find it.



      Here's a MWE:



      documentclass[12pt]article

      usepackagefontspec
      setmainfontJunicode[Numbers=OldStyle]

      begindocument

      123456789

      liningnums123456789

      addfontfeatureNumbers=Lining 123456789

      enddocument


      Which in prints the following:



      Numbers printed.



      How can I switch to lining numbers with Junicode and fontespec? I'm using LuaLaTeX, by the way.










      share|improve this question














      I'm using the Junicode typeface with the fontspec package, and I've set OldStyle numerals as the default. The OS numerals work fine, but if I try to switch to lining numbers in the middle of the text, they won't print, and instead LaTeX defaults to oldstyle. I get the following warning message:



      Package fontspec Warning: OpenType feature 'Numbers=Uppercase' (lnum) not available for font 'Junicode' with script 'CustomDefault' and language 'Default'.



      However, according to Junicode's documentation, it does have both lining numbers and oldstyle. So I'm not sure why LaTeX can't find it.



      Here's a MWE:



      documentclass[12pt]article

      usepackagefontspec
      setmainfontJunicode[Numbers=OldStyle]

      begindocument

      123456789

      liningnums123456789

      addfontfeatureNumbers=Lining 123456789

      enddocument


      Which in prints the following:



      Numbers printed.



      How can I switch to lining numbers with Junicode and fontespec? I'm using LuaLaTeX, by the way.







      fontspec






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 6 at 6:02









      johnymmjohnymm

      1458




      1458




















          2 Answers
          2






          active

          oldest

          votes


















          3














          Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use liningnums you have to patch that too:



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          RenewDocumentCommand liningnums m

          addfontfeatureRawFeature=-onum #1


          begindocument

          123456789

          liningnums123456789

          addfontfeatureRawFeature=-onum 123456789

          enddocument


          enter image description here






          share|improve this answer























          • Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

            – johnymm
            Feb 6 at 16:18











          • What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

            – johnymm
            Feb 6 at 20:44






          • 3





            @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

            – Kess Vargavind
            Feb 6 at 21:00


















          6














          You can remove the oldstyle feature with ..Off or ..Reset



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          begindocument

          123456789

          addfontfeatureNumbers=OldStyleOff 123456789

          addfontfeatureNumbers=OldStyleReset 123456789
          enddocument


          enter image description here






          share|improve this answer























          • Even better! No fiddling around with RawFeature

            – DG'
            Feb 6 at 8:43







          • 2





            Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

            – Will Robertson
            Feb 6 at 9:10






          • 1





            @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

            – Ulrike Fischer
            Feb 6 at 9:13











          • Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

            – Will Robertson
            Feb 6 at 13:29










          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',
          autoActivateHeartbeat: false,
          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%2f473581%2fcant-switch-to-lining-numerals-with-junicode-and-fontspec%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









          3














          Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use liningnums you have to patch that too:



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          RenewDocumentCommand liningnums m

          addfontfeatureRawFeature=-onum #1


          begindocument

          123456789

          liningnums123456789

          addfontfeatureRawFeature=-onum 123456789

          enddocument


          enter image description here






          share|improve this answer























          • Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

            – johnymm
            Feb 6 at 16:18











          • What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

            – johnymm
            Feb 6 at 20:44






          • 3





            @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

            – Kess Vargavind
            Feb 6 at 21:00















          3














          Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use liningnums you have to patch that too:



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          RenewDocumentCommand liningnums m

          addfontfeatureRawFeature=-onum #1


          begindocument

          123456789

          liningnums123456789

          addfontfeatureRawFeature=-onum 123456789

          enddocument


          enter image description here






          share|improve this answer























          • Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

            – johnymm
            Feb 6 at 16:18











          • What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

            – johnymm
            Feb 6 at 20:44






          • 3





            @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

            – Kess Vargavind
            Feb 6 at 21:00













          3












          3








          3







          Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use liningnums you have to patch that too:



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          RenewDocumentCommand liningnums m

          addfontfeatureRawFeature=-onum #1


          begindocument

          123456789

          liningnums123456789

          addfontfeatureRawFeature=-onum 123456789

          enddocument


          enter image description here






          share|improve this answer













          Junicode has no font feature for lining numbers (lnum), they are the default. There is only a feature for old style numbers (onum), which you have to remove in order to get lining numbers (if old style numbers is the default). If you want to use liningnums you have to patch that too:



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          RenewDocumentCommand liningnums m

          addfontfeatureRawFeature=-onum #1


          begindocument

          123456789

          liningnums123456789

          addfontfeatureRawFeature=-onum 123456789

          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 6 at 8:21









          DG'DG'

          10.7k21844




          10.7k21844












          • Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

            – johnymm
            Feb 6 at 16:18











          • What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

            – johnymm
            Feb 6 at 20:44






          • 3





            @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

            – Kess Vargavind
            Feb 6 at 21:00

















          • Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

            – johnymm
            Feb 6 at 16:18











          • What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

            – johnymm
            Feb 6 at 20:44






          • 3





            @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

            – Kess Vargavind
            Feb 6 at 21:00
















          Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

          – johnymm
          Feb 6 at 16:18





          Wow, thanks. A bit silly that liningnums does not consider this but it makes sense.

          – johnymm
          Feb 6 at 16:18













          What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

          – johnymm
          Feb 6 at 20:44





          What's the difference between renewcommand and RenewDocumentCommand ? It's the first time I'm seeing it....

          – johnymm
          Feb 6 at 20:44




          3




          3





          @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

          – Kess Vargavind
          Feb 6 at 21:00





          @johnymm, It’s part of the LaTeX3 code base, see e.g. the xparse package.

          – Kess Vargavind
          Feb 6 at 21:00











          6














          You can remove the oldstyle feature with ..Off or ..Reset



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          begindocument

          123456789

          addfontfeatureNumbers=OldStyleOff 123456789

          addfontfeatureNumbers=OldStyleReset 123456789
          enddocument


          enter image description here






          share|improve this answer























          • Even better! No fiddling around with RawFeature

            – DG'
            Feb 6 at 8:43







          • 2





            Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

            – Will Robertson
            Feb 6 at 9:10






          • 1





            @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

            – Ulrike Fischer
            Feb 6 at 9:13











          • Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

            – Will Robertson
            Feb 6 at 13:29















          6














          You can remove the oldstyle feature with ..Off or ..Reset



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          begindocument

          123456789

          addfontfeatureNumbers=OldStyleOff 123456789

          addfontfeatureNumbers=OldStyleReset 123456789
          enddocument


          enter image description here






          share|improve this answer























          • Even better! No fiddling around with RawFeature

            – DG'
            Feb 6 at 8:43







          • 2





            Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

            – Will Robertson
            Feb 6 at 9:10






          • 1





            @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

            – Ulrike Fischer
            Feb 6 at 9:13











          • Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

            – Will Robertson
            Feb 6 at 13:29













          6












          6








          6







          You can remove the oldstyle feature with ..Off or ..Reset



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          begindocument

          123456789

          addfontfeatureNumbers=OldStyleOff 123456789

          addfontfeatureNumbers=OldStyleReset 123456789
          enddocument


          enter image description here






          share|improve this answer













          You can remove the oldstyle feature with ..Off or ..Reset



          documentclass[12pt]article

          usepackagefontspec
          setmainfontJunicode[Numbers=OldStyle]

          begindocument

          123456789

          addfontfeatureNumbers=OldStyleOff 123456789

          addfontfeatureNumbers=OldStyleReset 123456789
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 6 at 8:39









          Ulrike FischerUlrike Fischer

          193k8302687




          193k8302687












          • Even better! No fiddling around with RawFeature

            – DG'
            Feb 6 at 8:43







          • 2





            Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

            – Will Robertson
            Feb 6 at 9:10






          • 1





            @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

            – Ulrike Fischer
            Feb 6 at 9:13











          • Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

            – Will Robertson
            Feb 6 at 13:29

















          • Even better! No fiddling around with RawFeature

            – DG'
            Feb 6 at 8:43







          • 2





            Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

            – Will Robertson
            Feb 6 at 9:10






          • 1





            @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

            – Ulrike Fischer
            Feb 6 at 9:13











          • Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

            – Will Robertson
            Feb 6 at 13:29
















          Even better! No fiddling around with RawFeature

          – DG'
          Feb 6 at 8:43






          Even better! No fiddling around with RawFeature

          – DG'
          Feb 6 at 8:43





          2




          2





          Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

          – Will Robertson
          Feb 6 at 9:10





          Hmmmmm although this is kind of a font bug I guess liningnums should do what it can to remove the +onum feature EVEN IF there is no lnum. So I should improve things a bit...

          – Will Robertson
          Feb 6 at 9:10




          1




          1





          @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

          – Ulrike Fischer
          Feb 6 at 9:13





          @WillRobertson yes, I was just considering to add an issue about this ;-). Why does the warning speak about a CustomDefault script?

          – Ulrike Fischer
          Feb 6 at 9:13













          Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

          – Will Robertson
          Feb 6 at 13:29





          Please do or I’ll forget! (Was busy with work tonight.) oh, I need to improve the messaging of the CustomDefault thing. I was trying to tidy up all the code around Script selection and this essentially means “try LATN if not try DFLT”. It shouldn’t be appearing in the messages though ...

          – Will Robertson
          Feb 6 at 13:29

















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473581%2fcant-switch-to-lining-numerals-with-junicode-and-fontspec%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

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?