[Tex/LaTex] How to make font ‘semibold’

bold

How do I change the boldness of my font to semibold ? Below is the initialization of the code that I copied online for my CV. I am very new to latex so I understand close to nothing as of now. I hope someone can give me a short and simple solution regardless of how unprofessional it is. My CV is fine. I just need to edit the boldness.

I have tried the links below but I keep getting an error.

Set the "font-weight: lighter/ bolder"

Can any of fontenc, inputenx, txfonts, mathptmx, newunicodechar support semi-bold?

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[blue]{classic}

\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[croatian]{babel}

\usepackage{hyphenat}

\usepackage[scale=0.75]{geometry}
\setlength{\hintscolumnwidth}{3.2cm}
\recomputelengths

\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[RE,LO]{\footnotesize }

% personal datas
\firstname{}
\familyname{}
\address{}{}
\mobile{}              
\email{} 
\photo[]{}

\AtBeginDocument{
    \hypersetup{pdfborder = 0 0 1,colorlinks=false,linkbordercolor=blue,urlcolor=blue}
}

\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page

\usepackage{lmodern}

Best Answer

For the record, I made substantial efforts to do this cleanly and failed utterly. moderncv hard codes numerous uses of bold and the use of the hooks provided by tweaklist have virtually no effect for our purposes.

So, this is not a good way to do this, but it may suffice.

Caveat emptor.

As recommended by Arash Esbati, we first load cfr-lm. However, we probably don't want the package's defaults. If lmodern is acceptable aside from the boldness, let's try this instead:

\usepackage[rm={lining,proportional},sf={lining,proportional},tt={lining,tabular,monowidth}]{cfr-lm}

This keeps lining figures, although it does use proportional for sans and serif. The typewriter family is set to use tabular lining figures and the monospaced variant of typewriter.

lmodern uses tabular lining figures throughout. cfr-lm uses proportional lining by default and variable typewriter. Proportional lining figures will look significantly better for sans and serif, but you can say tabular if you prefer the standard ugliness.

Now, ideally, we would now just tell moderncv which fonts to use for what. Unfortunately, that seems not possible, so we'll either have to rewrite large parts of the package or use a dirty hack.

I went with the hack:

\global\let\bfseries\sbweight

This will use the semi-bold fonts in place of the bold extended ones.

Note that this has some limitations. If we use bold italics, we will not get semibold oblique because genuine italics are not available in this weight.

Moreover, there are some less obvious limitations such as our having fewer optical sizes. This won't be a huge problem but it means the shapes of our characters will not be adjusted as sensitively according to size. Optical sizes make fonts easier to read at smaller sizes by using thicker strokes. Instead, a standard size will be scaled up or down, keeping the same shape.

Note, too, that \bfseries changes two aspects of the current font. First, it changes the weight to bold. Second, it changes the width to extended. (Actually, it isn't this simple, but that's enough for our purposes as we're concerned with Latin Modern and not the rest of the TeX font world.)

\sbweight changes one aspect of the font: the weight. It does not change the width. It doesn't matter whether we like this or not because Latin Modern doesn't offer semibold extended (or bold non-extended, for that matter). But our bold will look narrower as well as lighter than with the default configuration.

Here's the result of your preamble + my modifications + a bunch of content from moderncv's templatex.tex.

hacked CV

Complete code:

\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}% don't use utf8x !!
\usepackage[croatian]{babel}
\usepackage{hyphenat}
\usepackage[scale=0.75]{geometry}
\setlength{\hintscolumnwidth}{3.2cm}
\recomputelengths
\fancyfoot{}
% \fancyfoot[LE,RO]{\thepage}% if you switch off page numbering belos, this makes no sense!
% \fancyfoot[RE,LO]{\footnotesize}

% personal datas
\firstname{Meg}
\familyname{Magik}
\address{The Haunted Web}{5 West Coven Grove}
\mobile{777 777--7777}
\email{mmagik@haunted.web.org}
\photo{cauldron}

\AtBeginDocument{%
  \hypersetup{pdfborder = 0 0 1,colorlinks=false,linkbordercolor=blue,urlcolor=blue}%
}
\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page

\usepackage[rm={lining,proportional},sf={lining,proportional},tt={lining,tabular,monowidth}]{cfr-lm}
\global\let\bfseries\sbweight
\begin{document}
% from moderncv's template.tex
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}

\section{Languages}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{Language 2}{Skill level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}

\section{Computer skills}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}

\section{Interests}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
\cvitem{hobby 3}{Description}

\section{Extra 1}
\cvlistitem{Item 1}
\cvlistitem{Item 2}
\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}

\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
\cvlistdoubleitem{Item 2}{Item 5\cite{book1}}
\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}

\section{References}
\begin{cvcolumns}
  \cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}
  \cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}
  \cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textsb{those} also (all available upon request).}
\end{cvcolumns}
\end{document}
Related Question