Electrum (and other) fonts

Asked by Matthew on 2011-12-13

Hi,

 I am wondering if anyone has tried using fonts like electrum in their CV. I've found that when I \usepackage{electrum} in the preamble my title takes on the font but I can't introduce it into the text of the document like I can with other fonts...

Preamble:
% character encoding
\usepackage[utf8]{inputenc} % replace by the encoding you are using
\usepackage[T1]{fontenc}
\usepackage{electrum}
% adjust the page margins
\usepackage[scale=0.85]{geometry}
\recomputelengths % required when changes are made to page layout lengths
% personal data
\firstname{xxxx}
\familyname{xxxx}
\address{xxxx}{xxxx} % optional, remove the line if not wanted
\phone{xxxx} % optional, remove the line if not wanted
\email{xxxx} % optional, remove the line if not wanted
\homepage{xxxx}

In the body of the document:

\renewcommand*\rmdefault{cyklop}\normalfont Product Manager} - Works
\renewcommand*\rmdefault{electrum}\normalfont Product Manager} - Does nothing

  Any idea?

Question information

Language:
English Edit question
Status:
Answered
For:
moderncv Edit question
Assignee:
Xavier Danaux Edit question
Last query:
2012-01-22
Last reply:
2012-01-23
Xavier Danaux (xdanaux) said : #1

Hi Matthew,

The issue is simply that there is no font named "electrum". The TeX name of the font is "yes" or "yesj" (with oldstyle figures) as can be seen in electrum.sty. So \renewcommand*\rmdefault{yesj} gives you the desired effect.

Don't forget that if you want to typeset your whole document in electrum, you need to load moderncv with the "roman" option (by default, moderncv resorts to sans serif), which redefines \familydefault to \rmdefault. Loading electrum.sty will then redefine \rmdefault to use the electrum font.

Kind regards,

Xavier

Matthew (dnautomate) said : #2

  Thanks Xavier,

  I tried your solution but unfortunately was unable to get it to work. The electrum font does work in the title, but I cannot use the \renewcommand*\rmdefault{yesj} command to call the desired font.

  I am too much of a noob at this and may not be giving enough details for you or anyone else to resolve this. I may as well stick with what I have.

  Thanks,

Xavier Danaux (xdanaux) said : #3

--> Don't forget that if you want to typeset your whole document in electrum, you need to load moderncv with the "roman" option <--

i.e.

\documentclass[roman]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\renewcommand{\rmdefault}{yesj}
...

I just tested this and it works perfectly.

Matthew (dnautomate) said : #4

Yes you are correct, if I want to typeset the whole thing then I can do that by modifying the documentclass. However, if I want to use it to affect a title in the body of the document, I am still having trouble.

  Thanks,

Xavier Danaux (xdanaux) said : #5

Hi Matthew,

I am a little list at what you are trying to achieve.

If you want to change the font of the whole document, just copy the lines of post #3 to start your document. There is absolutely no need to "modify the documentclass".

If you want to change only the fonts of certain elements, here is the list of variables that control them (the names are self-explanatory): \namefont, \titlefont, \addressfont, \quotefont, \sectionfont, \subsectionfont and \hintfont. So for example, to change the title, do
\renewcommand{\titlefont}{\fontfamily{yesj}\selectfont}

Cheers,

Can you help with this problem?

Provide an answer of your own, or ask Matthew for more information if necessary.

To post a message you must log in.