1

I used the following code to finally get Verdana font in pdf-Latex. But it has Serifs. How do I make it 'Sans Serifs' ?

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
...
begin{document}
\fontfamily{verdana}\selectfont
ak95latexnoob
  • 13
  • 1
  • 4
  • well if this doesn't give a sans serif font it is not verdana but probably cmr. Check the log-file it should tell you that verdana wasn't found. – Ulrike Fischer Apr 10 '20 at 14:41
  • 1
    Welcome to TeX.se. Instead of posting code fragments, please put your fragments into a compilable document that people can play with.If you look at the log file/console output, you're getting Computer Modern. There is no verdana font like this. The log says: LaTeX Font Warning: Font shape T1/verdana/m/n' undefined (Font) using T1/cmr/m/n' instead on input line 5.. – Alan Munn Apr 10 '20 at 14:41
  • The simplest way to use Verdana is to use XeLaTeX or LuaLaTeX with fontspec and use the system version of the font. See Verdana and Cambria Font – Alan Munn Apr 10 '20 at 14:43
  • In your earlier question it was suggested to use LuaLaTeX or XeLaTeX: https://tex.stackexchange.com/q/537662/35864. Is there any reason why you insist on pdfLaTeX? – moewe Apr 10 '20 at 14:43
  • @moewe. I have atemplate for the Thesis and I want to use this to save time. – ak95latexnoob Apr 10 '20 at 14:47
  • Often it is quite possible to switch from pdfLaTeX to LuaLaTeX and XeLaTeX with not too much hassle, see https://tex.stackexchange.com/q/2984/35864 and https://tex.stackexchange.com/q/28642/35864. (Often it also turns out that bad templates cost more time than they save ...) – moewe Apr 10 '20 at 15:10
  • 1
    don't ignore warnings, the warnings clearly tell you here that the font switch has not worked and so you have the default computer modern font – David Carlisle Apr 10 '20 at 15:43

2 Answers2

3

The verdana support for pdflatex (in the winfonts package) is broken (see e.g. https://tex.stackexchange.com/a/339269/2388). So if you want to use verdana, use xelatex or lualatex.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Verdana}
\begin{document}
Verdana
\end{document}

enter image description here

Ulrike Fischer
  • 327,261
0

This is an alternative way to use Verdana (or in fact an equally looking replacement) without serifs in latex.

\usepackage{DejaVuSans}
\renewcommand*\familydefault{\sfdefault}
Josja
  • 31