Menu

#1387 Font attributes not limited in cairo terminals

closed-fixed
nobody
None
5
2015-03-23
2014-04-24
No

Hello,

using the test command with pngcairo I observed, that much of the text is italic, although it is not supposed to be. I could see this only with pngcairo and pdfcairo, but not with other terminals (wxt, qt, svg).

set terminal pngcairo
set output 'test.png'
test

gives an output as attached.

1 Attachments

Discussion

  • Christoph Bersch

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
     Hello,
    
    -using the `test` command with `pngcairo` I observed, that much of the test is italic, although it is not supposed to be. I could see this only with `pngcairo` and `pdfcairo`, but not with other terminals (wxt, qt, svg).
    +using the `test` command with `pngcairo` I observed, that much of the text is italic, although it is not supposed to be. I could see this only with `pngcairo` and `pdfcairo`, but not with other terminals (wxt, qt, svg).
    
         set terminal pngcairo
         set output 'test.png'
    
     
  • Ethan Merritt

    Ethan Merritt - 2014-04-24

    Have you seen this with normal plot commands, or only with "test"?

    I ask because the "test" command is implemented by executing a series of calls direct to the current terminal routines rather than by executing the core routines used for plotting. Fixing the code in "test" will almost certainly not change anything seen in normal plotting. If it's really a bug in the terminal driver, that's a different story.

     
  • Christoph Bersch

    I've seen that only with test. I didn't have time to narrow that down to a specific commit. I could do that next week.

     
  • Ethan Merritt

    Ethan Merritt - 2014-04-25

    I know what the commit was. I added the bold/italic sample text to the "test" command just recently. The question is whether there is actually a bug that affects real plots, or whether it's just that the test command calls term->put_text() directly rather than via the more complex sequence of calls in write_multiline() that virtually all other callers use.

     
  • Ethan Merritt

    Ethan Merritt - 2014-04-25

    The "test" command is now fixed. It was sufficient to reset to the default font after writing the test string. I think, but am not 100% sure, that all the normal code paths for plotting do the equivalent. So I don't think there is any need to change code elsewhere. If I'm wrong, no doubt someone will provide a test case eventually.

     
  • Ethan Merritt

    Ethan Merritt - 2014-04-25
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB