I am using TeXnicCenter and export with pdflatex (using a .bat file). I wanted to add a figure with a surface (filled in gray). I noticed that the font is of poor quality once I add the figure. My example is quite simple:

Let us define the slope as
m = \frac{\Delta y}{\Delta x} = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}
    \coordinate (O) at (0,0,0);
    \coordinate (PHL) at (2.05,2.32,1.5);
    \coordinate (PHR) at (2.363,2.475,1.5);
    \coordinate (PLL) at (2.31,1.91,1.5);
    \coordinate (PLR) at (2.67,2.097,1.5);
    \filldraw[draw=gray,fill=gray,fill opacity=0.1] (PHL) -- (PHR) -- (PLR) -- (PLL) -- cycle;
    \draw[-latex] (O) node[left]{\scriptsize $O$} -- (0,0,4);
    \draw[-latex] (O) -- (4,0,0);
    \draw[-latex] (O) -- (0,4,0);

Here are the results with and without the\filldraw line:

With the filldraw command

When I add the \filldraw line, it looks like a bad copy/scan of an old book. As soon as I remove it, it is much better. I thought it was a problem with different packages, but I still have this problem with a simple example.

Without the filldraw command

I tried to add \usepackage[T1]{fontenc} or \usepackage{lmodern} but it did not change anything. Any ideas are more than welcome!

1 Answer 1


It seems that the problem comes from the opacity in \filldraw. When I remove this parameter, everything appears to be fine. I cannot figure out why, but I found an ugly way to include a "transparent" surface without degrading the quality. If the \filldraw line comes first, it looks like it is "transparent" as long as the color is light enough. So, I used \usepackage{xcolor} to define lighter gray. I added a picture of the result. I didn't find a better solution. I hope it helps!

enter image description here

  • I compiled your code (from the original post) on my machine, TeXLive 2016 on Ubuntu. I did that with and without the filldraw, and looked at the two PDFs in the system PDF reader (not the one that pops up within TeX). Both of them look identical. I don't see any problem caused by opacity.
    – user103221
    Feb 24, 2017 at 18:15
  • I was using TeXnicCenter on Windows. Then, I read the pdf with Adobe Reader. I just tried it with TEXMAKER on Ubuntu, then I read it using Okular. You are right, both of them look identical. However, the quality seems closer to the bad one. It probably depends on the pdf reader.
    – Anthony
    Feb 24, 2017 at 20:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .