6

I need to set cabin font locally in my document. what is font family for cabin font?

{
   \fontfamily{x}\selectfont
    Some text in anttlc...
}

x = ?

Regards

Nils L
  • 9,716
manish
  • 9,111

3 Answers3

15

According to the LaTeX font catalogue, there is a package providing the Cabin font. According to the package, the font family is Cabin-TLF:

\fontfamily{Cabin-TLF}\selectfont

Of course it much easier to just load the package:

\usepackage[sfdefault]{cabin}
\usepackage[T1]{fontenc}

Also see:

Silke
  • 10,511
  • 9
    answering questions by reading documentation? it'll never catch on (+1) :-) – David Carlisle Apr 09 '13 at 08:48
  • cabin.sty not found – manish Apr 09 '13 at 09:18
  • 1
    @user15662: Cabin was added quite recently. Make sure your TeX distribution is up-to-date. – Silke Apr 09 '13 at 09:21
  • 1
    @David: Not to derail totally here, but many package documentations are virtually incomprehensible to novice users. Just the other day I was trying to figure out how to use lineno by reading the documentation, and I understood next to nothing. A common experience for me. – Sverre Apr 09 '13 at 09:34
  • @Sverre I'm sure that's true of my packages:-) – David Carlisle Apr 09 '13 at 09:44
  • @David: Yes and no. I found the answer to something in your longtable documentation today, so I understood some of that. The documentation for ltxtable, on the other hand, could be a tad more elaborate ... :) – Sverre Apr 10 '13 at 18:03
6

On a Unix system (assuming a Bash shell) one can issue the following command to a terminal:

ls $(dirname $(kpsewhich cabin.sty))

which, on a recently updated TeX Live, will output

LY1Cabin-TLF.fd           OT1CabinCondensed-TLF.fd  TS1Cabin-TLF.fd
LY1CabinCondensed-TLF.fd  T1Cabin-TLF.fd            TS1CabinCondensed-TLF.fd
OT1Cabin-TLF.fd           T1CabinCondensed-TLF.fd   cabin.sty

Since .fd files are named after the family name, you get what you need by stripping off the encoding name (which actually should be lowercased, according to the guidelines) and the .fd, getting

Cabin-TLF

for the normal font or

CabinCondensed-TLF

for the condensed variant.

On other systems lacking a shell (or where it's difficult to use), just do a search for cabin.sty in the file system.

egreg
  • 1,121,712
4

As Herbert said, there is no pdfTeX support for that font yet. Okay, so there is pdfTeX support for Cabin :) Maybe the rest of my answer is going to be useful for people in need of support files for other fonts, as it applies to every (OpenType) font you want to use in pdfTeX.

That support is required because traditional pdfTeX doesn't natively support the font formats common these days. If you can't or don't want to use a more contemporary TeX engine, you can use otftotfm and autoinst to (a) convert an OpenType font to a PostScript font that pdfTeX can use and (b) create the required support files. That should be the most comfortable way. Both tools come with a useful documentation. Once you have them installed, all it should take is a line that looks something like this:

perl autoinst.pl --fractions --inferiors --superiors --verbose --noswash --noornaments --smallcaps --sanserif --extra="--force" MyriadPro-Regular.otf ...

...plus some cleaning up afterwards and moving files to the right places. I'd say about an afternoon if it's your first time using it, and a couple of minutes for every subsequent font, once you've got that procedure internalized.

Nils L
  • 9,716