fonts icon indicating copy to clipboard operation
fonts copied to clipboard

Embedding font in LaTeX

Open sinhayash opened this issue 6 years ago • 4 comments

As per this link, please te what should be the encoding, family, series and shape for the font?

I am trying to use this template but unable to get the font rendered in PDF.

sinhayash avatar Sep 15 '19 02:09 sinhayash

Using this, it works but the output is very jagged: image

Code

% 
% Example of how to use a custom TTF font from the nimbus family.
%
% 1. Download your TTF font file. Here we use NimbusSanNovDSemBol from
% http://www.fonts101.com/fonts/view/Uncategorized/51530/NimbusSanNovDSemBol
%
% 2. Rename your TTF font file to custom.ttf.
%
% 3. Follow the directions at: http://math.stanford.edu/~jyzhao/latexfonts.php 
%
% 4. Upload custom.tfm, custom.ttf, T1-WGL4.enc, and t1custom.fd to writeLaTeX.
%
\documentclass[12pt]{article}
\usepackage[utf8x]{inputenc}

\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}

\title{Example: Custom Nimbus TTF Font}
\author{writeLaTeX}

\begin{document}
\maketitle

\Huge
Normal Font Text.

\customfont{
~#srg\%mpdnsu\\
!@sr\$gmpd `qswrWgem
}

\end{document}

sinhayash avatar Sep 15 '19 02:09 sinhayash

Sorry just saw this. Thank you for your interest! I'll respond shortly.

rajadain avatar Oct 23 '19 20:10 rajadain

I'm not a LaTeX expert, would welcome someone with more experience to contribute.

rajadain avatar Jul 19 '24 15:07 rajadain