Change bounding box of math glyphs in LuaTeXBad 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

How does an ARM MCU run faster than the external crystal?

How to prevent bad sectors?

Windows 10 Programs start without visual Interface

Best strategy for UK visa for a school trip (travelling alone or accomanpied child)?

Is it ok to put a subplot to a story that is never meant to contribute to the development of the main plot?

Question about exercise 11.5 in TeXbook

What is a subpixel in Super Mario Bros, and how does it relate to wall clipping?

A Mathematical Discussion: Fill in the Blank

Will Android be able to install OS updates without Google account?

Circumcircle bisects the segment connecting the vertices of two regular even-sided polygons

Mother abusing my finances

Yandex Programming Contest: Alarms

Is there an evolutionary advantage to having two heads?

What is the most important source of natural gas? coal, oil or other?

Automatic calculation of line orientations in QGIS

How long does it take to crack RSA 1024 with a PC?

What F1 in name of seeds/varieties means?

French translation of “only ever”

Black-and-white film where monster/alien gets fried

What's the connection between "kicking a pigeon" and "how a bill becomes a law"?

I think I may have violated academic integrity last year - what should I do?

What are these (utility?) boxes at the side of the house?

Future enhancements for the finite element method

How can I find where certain bash function is defined?



Change bounding box of math glyphs in LuaTeX


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


      1






      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

      28.4k64894




      28.4k64894




















          1 Answer
          1






          active

          oldest

          votes


















          9














          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









          9














          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















          9














          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













          9












          9








          9







          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

          204k9312704




          204k9312704







          • 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

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?