Change bounding box of math glyphs in LuaTeX Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Bad spacing of math letters within italic textgrabbing a single Greek glyph from an alternative font in math mode?XeTeX font spacing awfulnessFixing fonts with LuaTeX feature filesTikZ: `local bounding box` incompatible with `use as bounding box`?Generating a table of all glyphs – including meta data like name, Unicode etcHow to get intersection point(s) of two glyphs?LuaTeX 0.95 “incorrect math kerning”Filling an empty slot in a font with another glyph from the same fontPerfect alignment, LuaTex and sidebearings. Part II

When the Haste spell ends on a creature, do attackers have advantage against that creature?

Does classifying an integer as a discrete log require it be part of a multiplicative group?

Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source

What does this Jacques Hadamard quote mean?

Maximum summed powersets with non-adjacent items

Why are both D and D# fitting into my E minor key?

Why didn't Eitri join the fight?

How to compare two different files line by line in unix?

Would "destroying" Wurmcoil Engine prevent its tokens from being created?

また usage in a dictionary

old style "caution" boxes

For a new assistant professor in CS, how to build/manage a publication pipeline

What font is "z" in "z-score"?

How come Sam didn't become Lord of Horn Hill?

Around usage results

Why are there no cargo aircraft with "flying wing" design?

Is the Standard Deduction better than Itemized when both are the same amount?

How can I use the Python library networkx from Mathematica?

What do you call the main part of a joke?

Is it a good idea to use CNN to classify 1D signal?

Is it common practice to audition new musicians one-on-one before rehearsing with the entire band?

How do I find out the mythology and history of my Fortress?

Did MS DOS itself ever use blinking text?

Is there such thing as an Availability Group failover trigger?



Change bounding box of math glyphs in LuaTeX



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Bad spacing of math letters within italic textgrabbing a single Greek glyph from an alternative font in math mode?XeTeX font spacing awfulnessFixing fonts with LuaTeX feature filesTikZ: `local bounding box` incompatible with `use as bounding box`?Generating a table of all glyphs – including meta data like name, Unicode etcHow to get intersection point(s) of two glyphs?LuaTeX 0.95 “incorrect math kerning”Filling an empty slot in a font with another glyph from the same fontPerfect alignment, LuaTex and sidebearings. Part II










9















I'm trying to use the Garamond-Math font in LuaTeX (despite the documentation saying I should use it with XeTeX only :-). It's working more or less OK with LuaTeX, except for some unfortunate glyph combinations, mostly at the end of inline math, such as “where $T$ is the period”.



I used fbox to draw the bounding box of the glyph and noticed that the bounding boxes are different in LuaTeX:




enter image description here




and in XeTeX:




enter image description here




In XeTeX the glyph fits almost entirely in the bounding box, but in LuaTeX it overshoots far too much.



I'm not a font guy, so I have no idea why this happens. I thought the bounding box was a property of the font, so in my imagination the result should be the same. Thus the first question is: what actually happens that the bounding boxes are different?



The second question, in the title, is: can I change the bounding box of specific glyphs (using LuaTeX) so that the output looks more like XeTeX's?



I tried manually adding some spacing after the glyphs, but this looks hideous and will go down the drain if I happen to change the font or engine, so I'd really like not to do that. I also tried using the italic correction / but it seems to have no effect in math.



Here's the code to produce the pictures above:



documentclassstandalone
usepackageunicode-math
setmathfontGaramond-Math.otf
begindocument
fboxrule=1sp
fboxsep=0pt
In LuaTeX this fbox$T$ looks horrible, but the fbox$X$ looks OK. Hugefbox$T$quad.
enddocument


I'm using TL 2018:



This is LuaTeX, Version 1.07.0 (TeX Live 2018) (format=lualatex 2019.3.29) 13 APR 2019 12:43
restricted system commands enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
Lua module: luaotfload-main 2019-02-14 2.96 luaotfload entry point









share|improve this question


























    9















    I'm trying to use the Garamond-Math font in LuaTeX (despite the documentation saying I should use it with XeTeX only :-). It's working more or less OK with LuaTeX, except for some unfortunate glyph combinations, mostly at the end of inline math, such as “where $T$ is the period”.



    I used fbox to draw the bounding box of the glyph and noticed that the bounding boxes are different in LuaTeX:




    enter image description here




    and in XeTeX:




    enter image description here




    In XeTeX the glyph fits almost entirely in the bounding box, but in LuaTeX it overshoots far too much.



    I'm not a font guy, so I have no idea why this happens. I thought the bounding box was a property of the font, so in my imagination the result should be the same. Thus the first question is: what actually happens that the bounding boxes are different?



    The second question, in the title, is: can I change the bounding box of specific glyphs (using LuaTeX) so that the output looks more like XeTeX's?



    I tried manually adding some spacing after the glyphs, but this looks hideous and will go down the drain if I happen to change the font or engine, so I'd really like not to do that. I also tried using the italic correction / but it seems to have no effect in math.



    Here's the code to produce the pictures above:



    documentclassstandalone
    usepackageunicode-math
    setmathfontGaramond-Math.otf
    begindocument
    fboxrule=1sp
    fboxsep=0pt
    In LuaTeX this fbox$T$ looks horrible, but the fbox$X$ looks OK. Hugefbox$T$quad.
    enddocument


    I'm using TL 2018:



    This is LuaTeX, Version 1.07.0 (TeX Live 2018) (format=lualatex 2019.3.29) 13 APR 2019 12:43
    restricted system commands enabled.
    **test.tex
    (./test.tex
    LaTeX2e <2018-12-01>
    Lua module: luaotfload-main 2019-02-14 2.96 luaotfload entry point









    share|improve this question
























      9












      9








      9








      I'm trying to use the Garamond-Math font in LuaTeX (despite the documentation saying I should use it with XeTeX only :-). It's working more or less OK with LuaTeX, except for some unfortunate glyph combinations, mostly at the end of inline math, such as “where $T$ is the period”.



      I used fbox to draw the bounding box of the glyph and noticed that the bounding boxes are different in LuaTeX:




      enter image description here




      and in XeTeX:




      enter image description here




      In XeTeX the glyph fits almost entirely in the bounding box, but in LuaTeX it overshoots far too much.



      I'm not a font guy, so I have no idea why this happens. I thought the bounding box was a property of the font, so in my imagination the result should be the same. Thus the first question is: what actually happens that the bounding boxes are different?



      The second question, in the title, is: can I change the bounding box of specific glyphs (using LuaTeX) so that the output looks more like XeTeX's?



      I tried manually adding some spacing after the glyphs, but this looks hideous and will go down the drain if I happen to change the font or engine, so I'd really like not to do that. I also tried using the italic correction / but it seems to have no effect in math.



      Here's the code to produce the pictures above:



      documentclassstandalone
      usepackageunicode-math
      setmathfontGaramond-Math.otf
      begindocument
      fboxrule=1sp
      fboxsep=0pt
      In LuaTeX this fbox$T$ looks horrible, but the fbox$X$ looks OK. Hugefbox$T$quad.
      enddocument


      I'm using TL 2018:



      This is LuaTeX, Version 1.07.0 (TeX Live 2018) (format=lualatex 2019.3.29) 13 APR 2019 12:43
      restricted system commands enabled.
      **test.tex
      (./test.tex
      LaTeX2e <2018-12-01>
      Lua module: luaotfload-main 2019-02-14 2.96 luaotfload entry point









      share|improve this question














      I'm trying to use the Garamond-Math font in LuaTeX (despite the documentation saying I should use it with XeTeX only :-). It's working more or less OK with LuaTeX, except for some unfortunate glyph combinations, mostly at the end of inline math, such as “where $T$ is the period”.



      I used fbox to draw the bounding box of the glyph and noticed that the bounding boxes are different in LuaTeX:




      enter image description here




      and in XeTeX:




      enter image description here




      In XeTeX the glyph fits almost entirely in the bounding box, but in LuaTeX it overshoots far too much.



      I'm not a font guy, so I have no idea why this happens. I thought the bounding box was a property of the font, so in my imagination the result should be the same. Thus the first question is: what actually happens that the bounding boxes are different?



      The second question, in the title, is: can I change the bounding box of specific glyphs (using LuaTeX) so that the output looks more like XeTeX's?



      I tried manually adding some spacing after the glyphs, but this looks hideous and will go down the drain if I happen to change the font or engine, so I'd really like not to do that. I also tried using the italic correction / but it seems to have no effect in math.



      Here's the code to produce the pictures above:



      documentclassstandalone
      usepackageunicode-math
      setmathfontGaramond-Math.otf
      begindocument
      fboxrule=1sp
      fboxsep=0pt
      In LuaTeX this fbox$T$ looks horrible, but the fbox$X$ looks OK. Hugefbox$T$quad.
      enddocument


      I'm using TL 2018:



      This is LuaTeX, Version 1.07.0 (TeX Live 2018) (format=lualatex 2019.3.29) 13 APR 2019 12:43
      restricted system commands enabled.
      **test.tex
      (./test.tex
      LaTeX2e <2018-12-01>
      Lua module: luaotfload-main 2019-02-14 2.96 luaotfload entry point






      fonts xetex luatex bounding-box






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 13 at 15:49









      Phelype OleinikPhelype Oleinik

      25.5k54690




      25.5k54690




















          1 Answer
          1






          active

          oldest

          votes


















          8














          The problem is that you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text. You can avoid the problem by inserting some invisible char but it is not quite clear which char is the best choice, in the chat we discussed this a few times and suggestions were Uchar"200B and 🦆:



          documentclassstandalone
          usepackageunicode-math
          setmathfontGaramond-Math.otf
          begindocument
          fboxrule=1sp
          fboxsep=0pt
          In LuaTeX this fbox$T$ looks horrible,
          but fbox$TUchar"200B$ and Hugefbox$T🦆$ looks ok.


          enddocument


          enter image description here






          share|improve this answer




















          • 3





            I should have imagined that a duck would save the day :-)

            – Phelype Oleinik
            Apr 13 at 16:19











          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%2f484667%2fchange-bounding-box-of-math-glyphs-in-luatex%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









          8














          The problem is that you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text. You can avoid the problem by inserting some invisible char but it is not quite clear which char is the best choice, in the chat we discussed this a few times and suggestions were Uchar"200B and 🦆:



          documentclassstandalone
          usepackageunicode-math
          setmathfontGaramond-Math.otf
          begindocument
          fboxrule=1sp
          fboxsep=0pt
          In LuaTeX this fbox$T$ looks horrible,
          but fbox$TUchar"200B$ and Hugefbox$T🦆$ looks ok.


          enddocument


          enter image description here






          share|improve this answer




















          • 3





            I should have imagined that a duck would save the day :-)

            – Phelype Oleinik
            Apr 13 at 16:19















          8














          The problem is that you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text. You can avoid the problem by inserting some invisible char but it is not quite clear which char is the best choice, in the chat we discussed this a few times and suggestions were Uchar"200B and 🦆:



          documentclassstandalone
          usepackageunicode-math
          setmathfontGaramond-Math.otf
          begindocument
          fboxrule=1sp
          fboxsep=0pt
          In LuaTeX this fbox$T$ looks horrible,
          but fbox$TUchar"200B$ and Hugefbox$T🦆$ looks ok.


          enddocument


          enter image description here






          share|improve this answer




















          • 3





            I should have imagined that a duck would save the day :-)

            – Phelype Oleinik
            Apr 13 at 16:19













          8












          8








          8







          The problem is that you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text. You can avoid the problem by inserting some invisible char but it is not quite clear which char is the best choice, in the chat we discussed this a few times and suggestions were Uchar"200B and 🦆:



          documentclassstandalone
          usepackageunicode-math
          setmathfontGaramond-Math.otf
          begindocument
          fboxrule=1sp
          fboxsep=0pt
          In LuaTeX this fbox$T$ looks horrible,
          but fbox$TUchar"200B$ and Hugefbox$T🦆$ looks ok.


          enddocument


          enter image description here






          share|improve this answer















          The problem is that you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text. You can avoid the problem by inserting some invisible char but it is not quite clear which char is the best choice, in the chat we discussed this a few times and suggestions were Uchar"200B and 🦆:



          documentclassstandalone
          usepackageunicode-math
          setmathfontGaramond-Math.otf
          begindocument
          fboxrule=1sp
          fboxsep=0pt
          In LuaTeX this fbox$T$ looks horrible,
          but fbox$TUchar"200B$ and Hugefbox$T🦆$ looks ok.


          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 at 16:20

























          answered Apr 13 at 16:15









          Ulrike FischerUlrike Fischer

          199k9306692




          199k9306692







          • 3





            I should have imagined that a duck would save the day :-)

            – Phelype Oleinik
            Apr 13 at 16:19












          • 3





            I should have imagined that a duck would save the day :-)

            – Phelype Oleinik
            Apr 13 at 16:19







          3




          3





          I should have imagined that a duck would save the day :-)

          – Phelype Oleinik
          Apr 13 at 16:19





          I should have imagined that a duck would save the day :-)

          – Phelype Oleinik
          Apr 13 at 16:19

















          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%2f484667%2fchange-bounding-box-of-math-glyphs-in-luatex%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

          getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

          Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

          Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.