1

Dear fellow Texnicians,

I have a .ttf (true type) Devanagari font I would like to use when typing Sanskrit, which can be displayed in italics and boldfont when I am utilizing MS Word, but in the windows font folder it is displayed merely as 1 font, called AA_Nagari_Shree_L3.ttf, which is the regular font, so I don't know by which name to setup the bold variant and the italics font.

How can I access and use the bold version of the font?

My code:

\documentclass[12pt]{article}

\usepackage{polyglossia}

\usepackage{fontenc,fontspec}

\setmainlanguage{english}
\setotherlanguages{sanskrit}

\newfontfamily\sanskritfont[
Path = /Windows/Fonts/,
Script = Devanagari,
Scale=MatchUppercase,
Mapping=velthuis-sanskrit
]{AA_Nagari_Shree_L3.ttf}

\newenvironment{dn}[1]{\sanskritfont#1}{}

\begin{document}\\

{\dn sugataan sasutaan sadharmakaayaan pra.nipatyaadarato 'khilaa.m"sca vandyaan|}

\end{document}
2

If a font has no boldface variant, applications may fake it. This is also possible with fontspec, but it should be explicitly told to.

\documentclass[12pt]{article}

\usepackage{polyglossia}

\usepackage{fontspec}

\setmainlanguage{english}
\setotherlanguages{sanskrit}

\newfontfamily\sanskritfont[
  Path = ./,
  Extension=.ttf,
  Script = Devanagari,
  Scale=MatchUppercase,
  Mapping=velthuis-sanskrit,
  BoldFont=*,
  BoldFeatures={FakeBold=2},
]{AA_Nagari_Shree_L3}

\newcommand\dn{\sanskritfont}

\begin{document}

{\dn sugataan sasutaan sadharmakaayaan pra.nipatyaadarato 'khilaa.m"sca vandyaan|}

\bfseries

{\dn sugataan sasutaan sadharmakaayaan pra.nipatyaadarato 'khilaa.m"sca vandyaan|}

\end{document}

enter image description here

I removed the useless call to fontenc and modified the definition of \dn (yours is quite wrong).

0

While I did not find a direct way to solve this issue, I found a workaround for this particular problem:

Nagari Shree L3, when scaled at a factor of 1.3 seamlessly connects with Sanskrit 2003 font, which is a much bolder (Calcutta Style) font. Anyone wanting to switch between a "bold" and a "standard" Devanagari font, favouring, as I do, the beauty of AA Nagari Shree L3, thus can go about in this way:

\documentclass[12pt]{article}

\usepackage{polyglossia}
\usepackage{fontenc,fontspec,xltxtra}


\setmainlanguage{english}\setotherlanguages{sanskrit,tibetan}

\newfontfamily\sanskritverse[
Script=Devanagari,
Mapping=velthuis-sanskrit,
Scale=1,
]{Sanskrit 2003}

\newfontfamily\sanskritfont[%needs to be called sanskritfont, see Wujastyk's blog 
Path = /Windows/Fonts/,
Script = Devanagari,
Scale=1.3,
Mapping=velthuis-sanskrit, %or any other mapping
%Conjuncts=Additional Conjuncts, 
%Character Alternates=Dha & Bha Curl Variants%
]{AA_Nagari_Shree_L3.ttf}

\newcommand{\dvb}[1]{{{\selectlanguage{sanskrit}\sanskritverse{#1}}}}
\newcommand{\dev}[1]{{{\selectlanguage{sanskrit}\sanskritfont #1}}}
    \newcommand\eng[1]{\begin{english}#1\end{english}}

\begin{document}

\begin{verse}
\dev{sugataan sasutaan sa}\dvb{dharma}\dev{kaayaan pra.nipatyaadarato `'khilaa.m"sca vandyaan|\\
sugataatmaja}\dvb{sa.mvaraavataara.m} \dev{kathayi.syaami yathaagama.m samaasaat||}%
\end{verse}

\end{document}

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.