Consider this code:
data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/3}, {j, 0, Pi, Pi/3}];
p1 = Graphics[Raster[data], Frame -> True, FrameStyle -> Large,
ImageSize -> 300];
p2 = ListDensityPlot[data, InterpolationOrder -> 0,
ColorFunction -> "GrayTones", Frame -> True, FrameStyle -> Large,
ImageSize -> 300];
Export["~/Downloads/1.pdf", p1, ImageResolution -> 100]
Export["~/Downloads/2.pdf", p2, ImageResolution -> 100]
Why does the font in the first plot appear vectorized while the the font in the second does not?
Update:
remove the ImageResolution option will vectorize both plots, but ImageResolution is very helpful in reducing the pdf file size and I can't give up on that.
Export["~/Downloads/1.pdf", p1]
Export["~/Downloads/2.pdf", p2]