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

  • 7
    I suppose that there is no LaTeX support for that font. Use xelatex or lualatex instead. – user2478 Apr 9 '13 at 8:09
  • I cannot use xelatex and lualatex. – manish Apr 9 '13 at 8:16
  • 3
    then you have to create the LaTeX support files which isn't really easy. – user2478 Apr 9 '13 at 8:24
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:

  • 9
    answering questions by reading documentation? it'll never catch on (+1) :-) – David Carlisle Apr 9 '13 at 8:48
  • cabin.sty not found – manish Apr 9 '13 at 9:18
  • 1
    @user15662: Cabin was added quite recently. Make sure your TeX distribution is up-to-date. – Silke Apr 9 '13 at 9:21
  • @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 9 '13 at 9:34
  • @Sverre I'm sure that's true of my packages:-) – David Carlisle Apr 9 '13 at 9:44
5

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.

  • I m working on Red Hat. How to search there? – manish Apr 10 '13 at 1:15
  • @user15662 The procedure with the terminal should work on Red Hat. – egreg Apr 10 '13 at 8:04
  • But i got following error message. ls $(dirname $(kpsewhich cabin.sty)) dirname: missing operand Try `dirname --help' for more information. – manish Apr 10 '13 at 8:39
  • @user15662 Are you using a Bash shell? That seems to point to a different shell. – egreg Apr 10 '13 at 8:58
  • NO i am running on my redhat terminal in my home folder. – manish Apr 10 '13 at 9:01
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.