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 have a 100 page document, I used colored text many places to highlight with below command in my preamble

\newcommand\bluetext[1]{\textcolor{blue}{#1}}

its working great however did not realize at the time of writing that i would require color printer for this. I wanted to change colored text to bold - I change the above command as below

 \newcommand\bluetext[1]{\textbf{#1}}

It removed the colors but did not give me any bold letters, is it because of the font? or I am doing anything wrong? I am using sanskrit 2003 font. Bold_image

In the attached image all the circled text should have appeared bold. Thanks for your help - Here is the MWE

\documentclass[24pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{color}
\usepackage{amstext, amsmath}
\setmainfont[Script=Devanagari]{Sanskrit2003}
\setdefaultlanguage{sanskrit}
\newcommand\bluetext[1]{\textcolor{blue}{#1}} 
%\newcommand\bluetext[1]{\textbf{#1}} % Blue Text
\begin{document}
१.१.१\bluetext{वृद्धिः}\textsuperscript{१/१} आत्\textsuperscript{१/१} ऐच्\textsuperscript{१/१}     \\
१.१.२     अत्\textsuperscript{१/१}  एङ्\textsuperscript{१/१} गुणः\textsuperscript{१/१}     \\
१.१.३     \bluetext{इकः}\textsuperscript{६/१} \bluetext{गुणवृद्धी}\textsuperscript{१/२}    \\
 १.१.४     \bluetext{न}\textsuperscript{०/०} धातुलोपे\textsuperscript{७/१} आर्धधातुके\textsuperscript{७/१}    \\
१.१.५     क्क्ङिति\textsuperscript{७/१} च\textsuperscript{०/०}     \\
\end{document}
share|improve this question
    
You didn't give enough informations to decide if you did something wrong or if your font simply doesn't offer a bold version. Add a small but complete example that shows how you call and use the font. –  Ulrike Fischer May 30 '12 at 12:41
    
This is what I have in the preamble \setmainfont[Script=Devanagari]{Sanskrit2003} and wherever is need I just type in this font. I am using Xelatex –  Raama May 30 '12 at 12:43
add comment

1 Answer

up vote 11 down vote accepted

If you use this font, fontspec will tell you in the log-file:

Could not resolve font Sanskrit 2003/B (it probably doesn't exist).

This means that the font has no bold (/B) version.

You can use the AutoFakeBold key to get a faked bold:

\documentclass{article}
\usepackage{fontspec}
 \setmainfont[Script=Devanagari,AutoFakeBold=3.5]{Sanskrit 2003}
\begin{document}
test ^^^^e081

\bfseries
test ^^^^e081

\end{document}
share|improve this answer
    
@Fischer - Thanks for your help, it worked and it also solved many problems for me because there are other works where I needed to bold but did not realize why its not giving bold output. –  Raama May 30 '12 at 13:05
add comment

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.