Fonts & Character Setsneed bold & slanted Arial fonts

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

need bold & slanted Arial fonts

Post by mtnbkr »

I need to use the Arial font in both the bold and slanted forms. Currently I'm doing it this way

Code: Select all

{\fontsize{14}{0pt}\usefont{T1}{phv}{m}{n}  My Heading}
Of course, this gives helvetica in place of Arial, but I think that should be okay for my needs. The problem though is that I need the bold and italic/slanted version of the font, and this doesn't give it to me. How do I add bold and slanted to this? I tried the traditional \sl, \it and \bf but they either take me back to times new roman or do nothing depending upon where I place them.

I've never understood fonts in LaTeX, despite all I've read. This seems far more difficult than it needs to be. :(

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

need bold & slanted Arial fonts

Post by localghost »

I can't see any difficulties.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{txfonts}
\usepackage[raggedright,bf,sf,sl]{titlesec}
\usepackage{blindtext}

\parindent0em

\begin{document}
  \Blinddocument
\end{document}
Of course you can choose some other font package (or combinations of several ones).


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

Re: need bold & slanted Arial fonts

Post by mtnbkr »

Thanks for the reply and the suggestion. You were correct in thinking that the two questions were related, as I was trying to use the same formatting statement to change my headings and also to change just a few words of text that is mixed in with the rest of my document ... that's what I was actually getting at here. I was looking for the more general solution of getting a few words or a phrase in a bold, slanted Arial, when the rest of the document is in another font.

Unfortunately, this solution doesn't help for that ... not that I see, though, I am admittedly stumbling in the dark.

This solution, however, does address my other post. I have questions about it though and will post them there.

Thanks,

TJ
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

need bold & slanted Arial fonts

Post by localghost »

I still see no problem.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{txfonts}

\parindent0em

\begin{document}
  \textbf{\textsl{\textsf{Arial type}}}
\end{document}
Perhaps it's better to define an own command for this.

Code: Select all

\newcommand*{\textbfsfsl}[1]{\textbf{\textsl{\textsf{#1}}}}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

need bold & slanted Arial fonts

Post by mtnbkr »

Thanks, that was my first attempt before posting and it never worked. Your message showed me why it didn't work.

Code: Select all

\usepackage{txfonts}
is vital. without it you can't get both bf and sl, you just get the last one specified.

Thanks,

TJ
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

need bold & slanted Arial fonts

Post by localghost »

No, it is the fontenc package with Type 1 Encoding (Cork Encoding). You may need to install the cm-super package additionally.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
mtnbkr
Posts: 14
Joined: Wed Dec 24, 2008 1:48 am

Re: need bold & slanted Arial fonts

Post by mtnbkr »

That's funny, because if I comment out the txfonts package it doesn't work. It is obviously that package that it doing it for me, as I make no other change and I don't even have the package that you mention active (it is commented out).

You are half right though. I can also comment out the txfonts package and include the fontenc package (with T1) as you state and that ALSO does it for me ... but it's not what I was using. Either way though, thanks, I would've knocked my head against that wall for a long time before realizing (if ever) that I just needed to include a package.

Thanks again.
Post Reply