[Tex/LaTex] PDF text becomes blurry when \includegraphics is used, why?

graphicsxetex

I'm compiling this code with XeLaTeX:

\documentclass[11pt]{article}
\usepackage{graphicx}
\begin{document}
    This text is blurry if there is an image.
    \includegraphics{Test.png}
\end{document}

where the image I'm including is:
Image

If I comment out the \includesgraphics, I get:

Clear

If I don't, I get:

Blurry

Why does the text look different (in my eyes, blurrier) when there is an image on the screen?
How can I prevent this from happening in XeLaTeX?

Best Answer

There is no need to use a bitmap image for the symbol. It is the Unicode character ☆:

U+2606 WHITE STAR

LuaTeX

Even with bold fonts, the symbol does not have the thickness of the lines usually. This can be manipulated by package pdfrender that works for pdfTeX/LuaTeX in PDF mode. Example:

\documentclass{article}
\usepackage{fontspec}
\usepackage{pdfrender}

\newcommand*{\mysymbfont}{%
  \fontspec{\myfont}%
  \fontsize{5em}{5em}\selectfont
}
\newcommand*{\textbigwhitestar}{^^^^2606}

\begin{document}
  \tabcolsep=.2\tabcolsep
  \begin{tabular}{llll}
    \xdef\myfont{DejaVuSans-Bold.ttf}%
      \texttt{\myfont}:
    &
      \mysymbfont
      \textbigwhitestar
    & \mysymbfont
      \textpdfrender{
        TextRenderingMode=Stroke,
        LineJoinStyle=Round,
        LineWidth=.5pt,
      }{\textbigwhitestar}
    & \mysymbfont
      \textpdfrender{
        TextRenderingMode=FillStroke,
        LineJoinStyle=Round,
        LineWidth=2pt,
      }{\textbigwhitestar}
    \\
    \xdef\myfont{xits-math.otf}%
      \texttt{\myfont}:
    & \mysymbfont
      \textbigwhitestar
    & \mysymbfont
      \textpdfrender{
        TextRenderingMode=Stroke,
        LineJoinStyle=Round,
        LineWidth=.5pt,
      }{\textbigwhitestar}
    & \mysymbfont
      \textpdfrender{
        TextRenderingMode=FillStroke,
        LineJoinStyle=Round,
        LineWidth=1pt,
      }{\textbigwhitestar}
  \end{tabular}
\end{document}

Result

XeTeX

In XeTeX the symbol can be included as PDF file, generated via LuaTeX, e.g.:

% whitestar-raw.tex for LuaLaTeX
\documentclass{article}
\usepackage{fontspec}
\usepackage{pdfrender}
\pagestyle{empty}

\begin{document}
  \fontspec{DejaVuSans-Bold.ttf}
  \fontsize{5em}{5em}\selectfont
  \textpdfrender{
    TextRenderingMode=FillStroke,
    LineJoinStyle=Round,
    LineWidth=2pt,
  }{^^^^2606}
\end{document}

Then compile it and crop the margins:

lualatex whitestar-raw
pdfcrop whitestar-raw.pdf whitestar.pdf

whitestar

In XeTeX the PDF file is included via:

\includegraphics{whitestar}