Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've downloaded the Open Sans font from CTAN for use in MiKTeX on Windows (using pdfLaTeX). After the download, I just copied all the files into the MiKTeX root directory (= texmf).

As described here, I used the following commands to set up Open Sans for the document:

\usepackage[default,osfigures,scale=0.95]{opensans}
\usepackage[T1]{fontenc}

But when I compile the document to PDF, the result looks strange. For alphabetic chars, it seems to be okay, but for numeric chars, it seems that LaTeX uses some other font, right?

These numeric chars are obviously not the Open Sans chars. They are not all on the same level, instead some are lower and some are higher.

Why is A-Z shown correctly and 0-9 not?

Document with standard font:

enter image description here

THE PROBLEM: Document with Open Sans (commands above):

enter image description here

Open Sans specimen from Google Fonts:

enter image description here

What did I do wrong? Here is the full document source:

\documentclass[a4paper,ngerman,11pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\onehalfspacing
\usepackage[default,osfigures,scale=0.95]{opensans}
\usepackage[T1]{fontenc}
\usepackage{changepage}
\usepackage[hyphens]{url}
\usepackage[breaklinks]{hyperref}
\hypersetup{colorlinks=false}
\begin{document}
\begin{center}
{\Large \textbf{abc 1234567}\\ abc 1234567}
\end{center}
\end{document}

A short excerpt from the log file:

(C:\Users\John\AppData\Roaming\MiKTeX\2.9\tex\latex\opensans\opensans.sty
Package: opensans 2011/11/11 Opensans

(C:\Users\John\AppData\Roaming\MiKTeX\2.9\tex\latex\opensans\t1fosj.fd
File: t1fosj.fd 2011/11/11 Fontinst v1.927 font definitions for T1/fosj.
)
LaTeX Font Info:    Font shape `T1/fosj/m/n' will be
(Font)              scaled to size 10.40245pt on input line 12.
\AtBeginShipoutBox=\box26
Package hyperref Info: Link coloring OFF on input line 12.

{C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/opensans/opensans-
04.enc}{C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/opensans/open
sans-01.enc}<C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/opens
ans/OpenSans-Bold.pfb><C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/type1/pu
blic/opensans/OpenSans-Regular.pfb>
share|improve this question
2  
You have to remove osfigures from the option. –  Harish Kumar Oct 12 '13 at 1:37

1 Answer 1

up vote 5 down vote accepted

From opensans manual:

enter image description here

Hence you may drop osfigures option to get the lining figures which is used by default.

\documentclass{article}
\usepackage[default,scale=0.95]{opensans}
\usepackage[T1]{fontenc}
\begin{document}
\begin{center}
{\Large \textbf{abc 1234567}\\ abc 1234567}
\end{center}
\end{document}

enter image description here

share|improve this answer
    
Thank you very much! This is so obvious now, given that it is mentioned in the documentation. But I didn't even know the concept of lining figures and text figures. Good to learn that! –  Marco W. Oct 12 '13 at 2:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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