Announcement

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

  • lean2 scheme seems to have a font glitch

    The lean2 scheme by Svend Juul seems to have a font glitch. Although the default graph font is set to Times New Roman, and an exported graph to .png or .pdf extension has the correct font, an exported graph to .jpg instead has a sans serif font. The work around of using the .png file is easy, but I wonder what is causing this. Attaching do file, data file, screen shot of graph preferences, and three graphics files in .png, .pdf, and .jpg format. I had to shrink the pdf file to make it uploadable. I see I exceeded the maximum number of attachments, so I will delete the pdf copy, but I assure you it has the TNM font like the .png file.
    Attached Files

  • #2
    The scheme cannot change font. See -help graph set- to set fonts to use.
    Also, update your Stata if it is not up to date see -update query- If this does not help you can contact Stata tech-support

    Comment


    • #3
      Thank you. Realized I needed to do more testing. I have now established that the behavior between .png and jpg re fonts replicates with different schemes. It is that the font set in the graph preferences is not being recognized in the export to .jpg command. Possibly because .jpg does not support it? However, in the spirit of reading things, please note that I posted a picture of the graph settings and stated that I had set graph preferences. And FYI I keep my software current as a matter of regular practice. I will alert tech support.
      Last edited by Pamela Oliver; 16 Jul 2022, 11:06.

      Comment


      • #4
        Seems like a bug to be reported to tech-support
        Code:
        clear all
        
        graph set window fontface default
        graph set window fontfacesans default
        graph set window fontfaceserif default
        graph set window fontfacemono default
        graph set window fontfacesymbol default
        
        graph set window fontface "Times New Roman"
        
        tw scatteri 1 1 , title("the default graph font is set to Times New Roman")
        
        translate @Graph `"test.png"', translator(Graph2png)  replace /* Times New Roman */
        translate @Graph `"test.jpg"', translator(Graph2jpg)  replace /* Arial */

        Comment

        Working...
        X