This is one of my favorite problems. Enjoy!

We'd like to make holes in the text to make it look more tasty, like cheese tasty. We can find several fonts for this purpose, but we cannot (pseudo-randomly) change the location of the holes. That's pity! Could it be done in TeX to get something like this (the change of the background color should be a proof that there are holes not only circles drawn with the same color as the initial background color)? I enclose a close-up and some variants.

mwe, close-up



We cannot use the background color, if there is any, for circles: we would face a problem of shaded and other type of backgrounds. I enclose an example.

mwe with different background

Minimal working example

If we need some minimal working example (let's call it a static solution), this is it using two fonts available from Dafont.com, Cheese and Mouse font and JI Swiss Cheese font. After downloading the ZIP files, unzipping them, deleting spaces in filenames and installing them we can use them (xelatex and lualatex engines can be used):

JI Swiss Cheese\par
Cheese and Mouse

mwe via two fonts

A tip if you got stuck

Back in 2011, I've found this Q+A, it helped me a lot to solve this particular task for TeX hobbyists, How can I invert a 'clip' selection within TikZ? As long as I remember it was one of the first TeX.SX websites I visited.

  • 5
    You definitely have too much time :-) Looks funny and good!
    – user31729
    May 26, 2014 at 7:16
  • 1
  • 1
    Additionally, I hope, nobody changes the title of the 'question' to How to make my text more nasty ...
    – user31729
    May 26, 2014 at 14:24
  • Is it a real question then?
    – ienissei
    May 26, 2014 at 14:33
  • 1
    @ienissei Of course, it's done!
    – Malipivo
    May 26, 2014 at 22:00

1 Answer 1


I've tried to submit a gift/surprise question to my fellow solvers and I've originally marked it as solved because I know that feeling trying to solve some difficult question when I suddently discover that it has already been solved. But I didn't want to spoil the fun by submitting an anwer right away.

I enclose my original solution from 2011 with some updates. I've never used it in real typography, it was just an example for the audience (non-TeXists) of what TeX could handle. This Q+A at TeX.SX helped me a lot back then, How can I invert a 'clip' selection within TikZ?

% run: any latex engine; mal-cheese.tex
\def\maltext{My tasty example}


%\setmainfont{[csb10]} % My original font for xelatex...

% This has been my original setting which requires two runs of TeX...
\tikzstyle{reverseclip}=[insert path={
  (current page.north east) --
  (current page.south east) --
  (current page.south west) --
  (current page.north west) --
  (current page.north east)}]
% This is a new approach which requires only one run of TeX...
\tikzset{reverseclip/.style={clip, insert path={{[reset cm] (-16383.99999pt,-16383.99999pt) rectangle (16383.99999pt,16383.99999pt)

\if#1\empty\else%\pagecolor{#1} % My original setting...
%\def\vlastniobjekt{% a new command
\begin{tikzpicture}%[remember picture, overlay,
  [m/.style={clip,rounded corners}, outer sep=0pt]
\shade[left color=#1, right color=yellow] (-70mm,-2cm) rectangle (7cm,4cm);
\node[yshift=10mm, %fill=#1, % right color=yellow, 
minimum height=4cm] at (0mm,0) {\raisebox{6mm}[0pt][0pt]{\maltext}}; % \muj
\foreach \a in {1,...,600}{
\path (\x mm,\y mm) circle (0.9mm) [reverseclip];
%\draw (\x mm,\y mm) circle (.8mm);
\node at (0mm,0) {\maltext}; %\muj
\end{tikzpicture}}% konec \hbox...
%}% end of new command
%\vlastniobjekt % activating a new command...
}% End of \typesetme...

% This has been my original example to the audience...
%\typesetme{} % white
\foreach \barva in {0,10,...,100} {
  } % intensity of yellow
\foreach \barva in {100,90,...,0} {
  } % intensity of green

% An example for TeX.SX...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.