Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stata not detecting the Latin Modern 'LaTeX' font

    Dear all,

    I recently installed the Latin Modern font family on my computer. Many of you will probably know it as "the LaTeX font", although it is actually not one but a collection of different fonts within the 'Latin Modern font family'.

    The problem is that, once installed, Stata does not seem to detect them. Specifically, if I go to "Edit -> Preferences -> Graph preferences" and click on the 'Font' dropdown menu, I can find every font on my system, except for the Latin Modern fonts. Telling Stata to use the font through commands in a .do file rather than the Graph preferences menu does not seem to work either.

    What's more intriguing is that every other program on my computer (say, Notepad or Photoshop) does recognize the font, so it's clearly properly installed.

    FYI: I am running Stata 15.1, but I also tried Stata 14 and ran into the same issue. After Googling and looking through Statalist, I was surprised not to have found anybody else running into this problem.


    Any suggestions would be very appreciated.
    Last edited by Sebastian Huertas; 28 Jun 2021, 01:41.

  • #2
    I think I have Latin Modern installed too (originally via a MikTek installation, I recall), but have the same issue as you do (Stata 17): "Edit -> Preferences -> Graph preferences" / Font drop-down does not show it.

    I seem to recall something about TrueType fonts versus other types. Do your Latin Modern font files have extension "ttf" or "otf"? I see Latin Modern font files on my computer with "otf" extensions

    Comment


    • #3
      Hi Stephen. Thanks for the answer. Indeed, my version of the Latin Modern font is "otf" I do not know if there is a TrueType version.

      Comment


      • #4
        Hey. So, it's been a year, but I've found a solution. Turns out, Stephen was on to something: for some reason, Stata won't recognize the LM Sans font family if it's in "otf". So, I had to use an online tool to convert it to "ttf". Reinstalled the font, and Stata then found it.

        Hope this helps other folks.

        Comment


        • #5
          An alternative could be to export to svg. Then, change the font descriptions in the svg, import svg to inkscape and export to pdf. Stata support for OTF is on wishlist-for-stata-18 #109

          Comment

          Working...
          X