# How to change font encoding in pdflatex?

Consider two identical tex files file1.tex and file2.tex:

\documentclass[10pt]{article}
\begin{document}
Hello World
\end{document}


The following two methods can be used to generate a pdf file from these identical tex files

Method 1

pdflatex file1.tex


Method 2

latex file2.tex
dvips file2.dvi
ps2pdf file2.ps


On a machine with TeX Live 2015, these methods generate pdf files with different font encoding, i.e., the outputs of

   pdffonts file1.pdf
pdffonts file2.pdf


have different 'encoding'. While file1.pdf has Builtin encoding, file2.pdf has WinAnsi encoding. What change in the texfile will force pdflatex to generate pdfs with WinAnsi encoding? Related posts 1, 2, 3, and 4, don't seem to help.

• why do you want this? – Ulrike Fischer Nov 23 '20 at 19:32
• Method 2 gives a slightly bolder/neater font. I want this font for pdflatex because most places that accept tex files run pdflatex. – user21455 Nov 23 '20 at 21:17
• the main difference is not the encoding but the type: with pdftex the font is type1 and with latex+dvips+ps2pdf type1C. I don't think that you can get the first with pdftex unless you postprocess the pdf with ghostscript. see also tex.stackexchange.com/a/43478/2388 – Ulrike Fischer Nov 23 '20 at 21:43

But, if you’re not required to submit sources that compile in PDFTeX, there’s absolutely nothing forcing you to use legacy 8-bit fonts. If you were able to use Windows-1252, you would be able to just use modern fonts with LuaLaTeX and unicode-math.