3

MWE

\documentclass{book}
\begin{document}
% ttf2tfm custom.ttf -p T1-WGL4.enc
\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}

! \# \$ \% \& ( ) * + , . /\\
\customfont{! \# \$ \% \& ( ) * + , . /}

\end{document}

is working for ES03.TTF. But

enter image description here

^ , ` and ~ character is not working or I couldn't do that. May you help me?

Related to: http://math.stanford.edu/~jyzhao/latexfonts.php

Related to: https://edu.casio.com/education/fontset/ (Natural Textbook Diplay Models -> fx-ES PLUS series -> fx-ES series)


ShreevatsaR's SOLUTION

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{textcomp}
\begin{document}
% ttf2tfm custom.ttf -p T1-WGL4.enc
\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}
\textasciicircum \textasciitilde \char0\\
\customfont{\textasciicircum \textasciitilde \char0}
\end{document}

enter image description here

That's what I wanted.

  • Add the \textasciicircum and \textasciitilde – Özgür Aug 1 '17 at 17:22
  • 2
    For ^, backtick and ~, does it work if you use {\char94}, {\char96} and {\char126} respectively? And if so, is that all you need (is that an answer to your question)? (Edit: For the backtick you may need {\char0} instead of {\char96}: see Wikipedia page on T1 encoding.) – ShreevatsaR Aug 23 '17 at 23:57
  • @ShreevatsaR, I'm checking. – Özgür Aug 24 '17 at 0:04
  • Not the problem, but don't define your font command like that! So you started with a TTF font, correct? Then you ran ttf2tfm custom.ttf -p T1-WGL4.enc. What output did you get? And what did you do with the files? Is your font entirely symbols? Can you freely edit and/or convert it? Because a type1 font would be easier to work with and is especially easy for symbols. But the T1 encoding isn't appropriate for symbols. Maybe this is all off-base because I'm not clear what your custom font is. – cfr Aug 24 '17 at 0:20
  • 1
    Arbitrary symbol fonts are the easiest to set up. For type1, you don't need an encoding. For TTF, an arbitrary encoding will do. So if you are trying to install a symbol font of this kind (you just need access to the characters in isolation - as if they were dingbats, say), you don't want to mess around with T1. – cfr Aug 24 '17 at 0:21
3
+50

Input

\documentclass[a4paper]{article}
\usepackage{geometry,pgffor}
\usepackage{CasioES0}
\parindent=0pt
\begin{document}
\textbf{ES03}\smallskip

\foreach \i in {4,...,98} {\i: \ES1{\i} }
\bigskip

\textbf{ES04}\smallskip

\foreach \i in {4,...,98} {\i: \ES2{\i} }
\end{document}

Output

Casio ES03 and ES04

Support Files

Set up a clean directory and copy the two font files ES03.TTF and ES04.TTF there.

Now make a .tex file there with the following content and compile it. (You can then delete the file - its purpose is only to write a bunch of files to the directory.)

\begin{filecontents}{ES03-drv.tex}
\input fontinst.sty
\needsfontinstversion{1.926}
%:substitutions
%bold for bold extended
\substitutesilent{bx}{b}
\substitutesilent{b}{m}
%:record transformations for later map file creation
\recordtransforms{ES03-rec.tex}
        \transformfont{ES03-8r}{\reencodefont{8r}{\fromafm{ES03}}}
        \input reglyph-ES03.tex
        \installfonts
                \installfamily{U}{ES03}{}
                \installfont{ES03-u}{ES03-8rr}{txtfdmns,ornaments}{U}{ES03}{m}{n}{}
                \installfontas{ES03-u}{U}{ES03}{m}{sc}{}
                \installfontas{ES03-u}{U}{ES03}{m}{it}{}
                \installfontas{ES03-u}{U}{ES03}{m}{sl}{}
                \installfontas{ES03-u}{U}{ES03}{m}{si}{}
        \endinstallfonts
\endrecordtransforms
\bye
\end{filecontents}
\begin{filecontents}{ES04-drv.tex}
\input fontinst.sty
\needsfontinstversion{1.926}
%:substitutions
%bold for bold extended
\substitutesilent{bx}{b}
\substitutesilent{b}{m}
%:record transformations for later map file creation
\recordtransforms{ES04-rec.tex}
        \transformfont{ES04-8r}{\reencodefont{8r}{\fromafm{ES04}}}
        \input reglyph-ES04.tex
        \installfonts
                \installfamily{U}{ES04}{}
                \installfont{ES04-u}{ES04-8rr}{txtfdmns,ornaments}{U}{ES04}{m}{n}{}
                \installfontas{ES04-u}{U}{ES04}{m}{sc}{}
                \installfontas{ES04-u}{U}{ES04}{m}{it}{}
                \installfontas{ES04-u}{U}{ES04}{m}{sl}{}
                \installfontas{ES04-u}{U}{ES04}{m}{si}{}
        \endinstallfonts
\endrecordtransforms
\bye
\end{filecontents}
\begin{filecontents}{ES03-map.tex}
\input finstmsc.sty
\resetstr{PSfontsuffix}{.ttf}
\adddriver{dvips}{ES03.map}
\adddriver{pltotf}{ES03-pltotf.sh}
\input ES03-rec.tex
\donedrivers
\bye
\end{filecontents}
\begin{filecontents}{ES04-map.tex}
\input finstmsc.sty
\resetstr{PSfontsuffix}{.ttf}
\adddriver{dvips}{ES04.map}
\adddriver{pltotf}{ES04-pltotf.sh}
\input ES04-rec.tex
\donedrivers
\bye
\end{filecontents}
\begin{filecontents}{reglyph-ES03.tex}
\relax
\reglyphfonts
        \renameglyph{orn0}{.notdef}
        \renameglyph{orn1}{.null}
        \renameglyph{orn2}{CR}
        \renameglyph{orn3}{space}
        \renameglyph{orn4}{exclam}
        \renameglyph{orn5}{quotedbl}
        \renameglyph{orn6}{numbersign}
        \renameglyph{orn7}{dollar}
        \renameglyph{orn8}{percent}
        \renameglyph{orn9}{ampersand}
        \renameglyph{orn10}{quotesingle}
        \renameglyph{orn11}{parenleft}
        \renameglyph{orn12}{parenright}
        \renameglyph{orn13}{asterisk}
        \renameglyph{orn14}{plus}
        \renameglyph{orn15}{comma}
        \renameglyph{orn16}{hyphen}
        \renameglyph{orn17}{period}
        \renameglyph{orn18}{slash}
        \renameglyph{orn19}{zero}
        \renameglyph{orn20}{one}
        \renameglyph{orn21}{two}
        \renameglyph{orn22}{three}
        \renameglyph{orn23}{four}
        \renameglyph{orn24}{five}
        \renameglyph{orn25}{six}
        \renameglyph{orn26}{seven}
        \renameglyph{orn27}{eight}
        \renameglyph{orn28}{nine}
        \renameglyph{orn29}{colon}
        \renameglyph{orn30}{semicolon}
        \renameglyph{orn31}{less}
        \renameglyph{orn32}{equal}
        \renameglyph{orn33}{greater}
        \renameglyph{orn34}{question}
        \renameglyph{orn35}{at}
        \renameglyph{orn36}{A}
        \renameglyph{orn37}{B}
        \renameglyph{orn38}{C}
        \renameglyph{orn39}{D}
        \renameglyph{orn40}{E}
        \renameglyph{orn41}{F}
        \renameglyph{orn42}{G}
        \renameglyph{orn43}{H}
        \renameglyph{orn44}{I}
        \renameglyph{orn45}{J}
        \renameglyph{orn46}{K}
        \renameglyph{orn47}{L}
        \renameglyph{orn48}{M}
        \renameglyph{orn49}{N}
        \renameglyph{orn50}{O}
        \renameglyph{orn51}{P}
        \renameglyph{orn52}{Q}
        \renameglyph{orn53}{R}
        \renameglyph{orn54}{S}
        \renameglyph{orn55}{T}
        \renameglyph{orn56}{U}
        \renameglyph{orn57}{V}
        \renameglyph{orn58}{W}
        \renameglyph{orn59}{X}
        \renameglyph{orn60}{Y}
        \renameglyph{orn61}{Z}
        \renameglyph{orn62}{bracketleft}
        \renameglyph{orn63}{backslash}
        \renameglyph{orn64}{bracketright}
        \renameglyph{orn65}{asciicircum}
        \renameglyph{orn66}{underscore}
        \renameglyph{orn67}{grave}
        \renameglyph{orn68}{a}
        \renameglyph{orn69}{b}
        \renameglyph{orn70}{c}
        \renameglyph{orn71}{d}
        \renameglyph{orn72}{e}
        \renameglyph{orn73}{f}
        \renameglyph{orn74}{g}
        \renameglyph{orn75}{h}
        \renameglyph{orn76}{i}
        \renameglyph{orn77}{j}
        \renameglyph{orn78}{k}
        \renameglyph{orn79}{l}
        \renameglyph{orn80}{m}
        \renameglyph{orn81}{n}
        \renameglyph{orn82}{o}
        \renameglyph{orn83}{p}
        \renameglyph{orn84}{q}
        \renameglyph{orn85}{r}
        \renameglyph{orn86}{s}
        \renameglyph{orn87}{t}
        \renameglyph{orn88}{u}
        \renameglyph{orn89}{v}
        \renameglyph{orn90}{w}
        \renameglyph{orn91}{x}
        \renameglyph{orn92}{y}
        \renameglyph{orn93}{z}
        \renameglyph{orn94}{braceleft}
        \renameglyph{orn95}{bar}
        \renameglyph{orn96}{braceright}
        \renameglyph{orn97}{asciitilde}
        \renameglyph{orn98}{quotedblright}
        \renameglyph{orn99}{quoteright}
        \renameglyph{orn100}{circumflex}
        \renameglyph{orn101}{CR}
        \reglyphfont{ES03-8rr}{ES03-8r}
\endreglyphfonts
\end{filecontents}
\begin{filecontents}{reglyph-ES04.tex}
\relax
\reglyphfonts
        \renameglyph{orn0}{.notdef}
        \renameglyph{orn1}{.null}
        \renameglyph{orn2}{CR}
        \renameglyph{orn3}{space}
        \renameglyph{orn4}{exclam}
        \renameglyph{orn5}{quotedbl}
        \renameglyph{orn6}{numbersign}
        \renameglyph{orn7}{dollar}
        \renameglyph{orn8}{percent}
        \renameglyph{orn9}{ampersand}
        \renameglyph{orn10}{quotesingle}
        \renameglyph{orn11}{parenleft}
        \renameglyph{orn12}{parenright}
        \renameglyph{orn13}{asterisk}
        \renameglyph{orn14}{plus}
        \renameglyph{orn15}{comma}
        \renameglyph{orn16}{hyphen}
        \renameglyph{orn17}{period}
        \renameglyph{orn18}{slash}
        \renameglyph{orn19}{zero}
        \renameglyph{orn20}{one}
        \renameglyph{orn21}{two}
        \renameglyph{orn22}{three}
        \renameglyph{orn23}{four}
        \renameglyph{orn24}{five}
        \renameglyph{orn25}{six}
        \renameglyph{orn26}{seven}
        \renameglyph{orn27}{eight}
        \renameglyph{orn28}{nine}
        \renameglyph{orn29}{colon}
        \renameglyph{orn30}{semicolon}
        \renameglyph{orn31}{less}
        \renameglyph{orn32}{equal}
        \renameglyph{orn33}{greater}
        \renameglyph{orn34}{question}
        \renameglyph{orn35}{at}
        \renameglyph{orn36}{A}
        \renameglyph{orn37}{B}
        \renameglyph{orn38}{C}
        \renameglyph{orn39}{D}
        \renameglyph{orn40}{E}
        \renameglyph{orn41}{F}
        \renameglyph{orn42}{G}
        \renameglyph{orn43}{H}
        \renameglyph{orn44}{I}
        \renameglyph{orn45}{J}
        \renameglyph{orn46}{K}
        \renameglyph{orn47}{L}
        \renameglyph{orn48}{M}
        \renameglyph{orn49}{N}
        \renameglyph{orn50}{O}
        \renameglyph{orn51}{P}
        \renameglyph{orn52}{Q}
        \renameglyph{orn53}{R}
        \renameglyph{orn54}{S}
        \renameglyph{orn55}{T}
        \renameglyph{orn56}{U}
        \renameglyph{orn57}{V}
        \renameglyph{orn58}{W}
        \renameglyph{orn59}{X}
        \renameglyph{orn60}{Y}
        \renameglyph{orn61}{Z}
        \renameglyph{orn62}{bracketleft}
        \renameglyph{orn63}{backslash}
        \renameglyph{orn64}{bracketright}
        \renameglyph{orn65}{asciicircum}
        \renameglyph{orn66}{underscore}
        \renameglyph{orn67}{grave}
        \renameglyph{orn68}{a}
        \renameglyph{orn69}{b}
        \renameglyph{orn70}{c}
        \renameglyph{orn71}{d}
        \renameglyph{orn72}{e}
        \renameglyph{orn73}{f}
        \renameglyph{orn74}{g}
        \renameglyph{orn75}{h}
        \renameglyph{orn76}{i}
        \renameglyph{orn77}{j}
        \renameglyph{orn78}{k}
        \renameglyph{orn79}{l}
        \renameglyph{orn80}{m}
        \renameglyph{orn81}{n}
        \renameglyph{orn82}{o}
        \renameglyph{orn83}{p}
        \renameglyph{orn84}{q}
        \renameglyph{orn85}{r}
        \renameglyph{orn86}{s}
        \renameglyph{orn87}{t}
        \renameglyph{orn88}{u}
        \renameglyph{orn89}{v}
        \renameglyph{orn90}{w}
        \renameglyph{orn91}{x}
        \renameglyph{orn92}{y}
        \renameglyph{orn93}{z}
        \renameglyph{orn94}{braceleft}
        \renameglyph{orn95}{bar}
        \renameglyph{orn96}{braceright}
        \renameglyph{orn97}{asciitilde}
        \renameglyph{orn98}{Adieresis}
        \renameglyph{orn99}{Aring}
        \renameglyph{orn100}{Ccedilla}
        \renameglyph{orn101}{Eacute}
        \renameglyph{orn102}{Ntilde}
        \renameglyph{orn103}{Odieresis}
        \renameglyph{orn104}{Udieresis}
        \renameglyph{orn105}{aacute}
        \renameglyph{orn106}{agrave}
        \renameglyph{orn107}{acircumflex}
        \renameglyph{orn108}{adieresis}
        \renameglyph{orn109}{atilde}
        \renameglyph{orn110}{aring}
        \renameglyph{orn111}{ccedilla}
        \renameglyph{orn112}{eacute}
        \renameglyph{orn113}{egrave}
        \renameglyph{orn114}{ecircumflex}
        \renameglyph{orn115}{edieresis}
        \renameglyph{orn116}{iacute}
        \renameglyph{orn117}{igrave}
        \renameglyph{orn118}{icircumflex}
        \renameglyph{orn119}{idieresis}
        \renameglyph{orn120}{ntilde}
        \renameglyph{orn121}{oacute}
        \renameglyph{orn122}{ograve}
        \renameglyph{orn123}{ocircumflex}
        \renameglyph{orn124}{odieresis}
        \renameglyph{orn125}{otilde}
        \renameglyph{orn126}{uacute}
        \renameglyph{orn127}{ugrave}
        \renameglyph{orn128}{ucircumflex}
        \renameglyph{orn129}{udieresis}
        \renameglyph{orn130}{dagger}
        \renameglyph{orn131}{degree}
        \renameglyph{orn132}{cent}
        \renameglyph{orn133}{sterling}
        \renameglyph{orn134}{section}
        \renameglyph{orn135}{bullet}
        \renameglyph{orn136}{paragraph}
        \renameglyph{orn137}{germandbls}
        \renameglyph{orn138}{registered}
        \renameglyph{orn139}{copyright}
        \renameglyph{orn140}{trademark}
        \renameglyph{orn141}{acute}
        \renameglyph{orn142}{dieresis}
        \renameglyph{orn143}{AE}
        \renameglyph{orn144}{Oslash}
        \renameglyph{orn145}{plusminus}
        \renameglyph{orn146}{yen}
        \renameglyph{orn147}{mu}
        \renameglyph{orn148}{ordfeminine}
        \renameglyph{orn149}{ordmasculine}
        \renameglyph{orn150}{ae}
        \renameglyph{orn151}{oslash}
        \renameglyph{orn152}{questiondown}
        \renameglyph{orn153}{exclamdown}
        \renameglyph{orn154}{logicalnot}
        \renameglyph{orn155}{florin}
        \renameglyph{orn156}{guillemotleft}
        \renameglyph{orn157}{guillemotright}
        \renameglyph{orn158}{ellipsis}
        \renameglyph{orn159}{nbspace}
        \renameglyph{orn160}{Agrave}
        \renameglyph{orn161}{Atilde}
        \renameglyph{orn162}{Otilde}
        \renameglyph{orn163}{OE}
        \renameglyph{orn164}{oe}
        \renameglyph{orn165}{endash}
        \renameglyph{orn166}{emdash}
        \renameglyph{orn167}{quotedblleft}
        \renameglyph{orn168}{quotedblright}
        \renameglyph{orn169}{quoteleft}
        \renameglyph{orn170}{quoteright}
        \renameglyph{orn171}{divide}
        \renameglyph{orn172}{ydieresis}
        \renameglyph{orn173}{Ydieresis}
        \renameglyph{orn174}{currency}
        \renameglyph{orn175}{guilsinglleft}
        \renameglyph{orn176}{guilsinglright}
        \renameglyph{orn177}{daggerdbl}
        \renameglyph{orn178}{periodcentered}
        \renameglyph{orn179}{quotesinglbase}
        \renameglyph{orn180}{quotedblbase}
        \renameglyph{orn181}{perthousand}
        \renameglyph{orn182}{Acircumflex}
        \renameglyph{orn183}{Ecircumflex}
        \renameglyph{orn184}{Aacute}
        \renameglyph{orn185}{Edieresis}
        \renameglyph{orn186}{Egrave}
        \renameglyph{orn187}{Iacute}
        \renameglyph{orn188}{Icircumflex}
        \renameglyph{orn189}{Idieresis}
        \renameglyph{orn190}{Igrave}
        \renameglyph{orn191}{Oacute}
        \renameglyph{orn192}{Ocircumflex}
        \renameglyph{orn193}{Ograve}
        \renameglyph{orn194}{Uacute}
        \renameglyph{orn195}{Ucircumflex}
        \renameglyph{orn196}{Ugrave}
        \renameglyph{orn197}{circumflex}
        \renameglyph{orn198}{tilde}
        \renameglyph{orn199}{macron}
        \renameglyph{orn200}{cedilla}
        \renameglyph{orn201}{Scaron}
        \renameglyph{orn202}{scaron}
        \renameglyph{orn203}{brokenbar}
        \renameglyph{orn204}{Eth}
        \renameglyph{orn205}{eth}
        \renameglyph{orn206}{Yacute}
        \renameglyph{orn207}{yacute}
        \renameglyph{orn208}{Thorn}
        \renameglyph{orn209}{thorn}
        \renameglyph{orn210}{minus}
        \renameglyph{orn211}{multiply}
        \renameglyph{orn212}{onesuperior}
        \renameglyph{orn213}{twosuperior}
        \renameglyph{orn214}{threesuperior}
        \renameglyph{orn215}{onehalf}
        \renameglyph{orn216}{onequarter}
        \renameglyph{orn217}{threequarters}
        \renameglyph{orn218}{index218}
        \renameglyph{orn219}{index219}
        \renameglyph{orn220}{index220}
        \renameglyph{orn221}{index221}
        \renameglyph{orn222}{index222}
        \renameglyph{orn223}{index223}
        \renameglyph{orn224}{index224}
        \renameglyph{orn225}{index225}
        \renameglyph{orn226}{index226}
        \renameglyph{orn227}{HT}
        \renameglyph{orn228}{CR}
        \reglyphfont{ES04-8rr}{ES04-8r}
\endreglyphfonts
\end{filecontents}
\begin{filecontents}{CasioES0.sty}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{CasioES0}[2017/08/24 v1.0 CasioES0 CFR]
\RequirePackage{pifont}
%%Adjusted by cfr in line with gtmacfonts
%%We don't want to add the map file through updmap because only pdftex can use truetype fonts.
\pdfmapfile{+CasioES0.map}
\Pifont{ES03}
\Pifont{ES04}

\newcommand*{\eschar}[1]{\Pisymbol{ES03}{#1}}

\newcommand*{\esplus}[1]{\Pisymbol{ES04}{#1}}

\newcommand*\ES{}
\gdef\ES#1#2{%
        \ifcase #1      \relax
                \or     \eschar{#2}%
                \or     \esplus{#2}%
        \fi}

\endinput
%% end CasioES0.sty
% vim: set nospell:
\end{filecontents}
\begin{filecontents}{ornaments.etx}
%% Copyright 2008 Clea F. Rees
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Clea F. Rees.
%
% This work consists of all files listed in manifest.txt.
\relax
\encoding
        \setstr{codingscheme}{ORNAMENTAL ENCODING}
        \setslot{orn0}\endsetslot
        \setslot{orn1}\endsetslot
        \setslot{orn2}\endsetslot
        \setslot{orn3}\endsetslot
        \setslot{orn4}\endsetslot
        \setslot{orn5}\endsetslot
        \setslot{orn6}\endsetslot
        \setslot{orn7}\endsetslot
        \setslot{orn8}\endsetslot
        \setslot{orn9}\endsetslot
        \setslot{orn10}\endsetslot
        \setslot{orn11}\endsetslot
        \setslot{orn12}\endsetslot
        \setslot{orn13}\endsetslot
        \setslot{orn14}\endsetslot
        \setslot{orn15}\endsetslot
        \setslot{orn16}\endsetslot
        \setslot{orn17}\endsetslot
        \setslot{orn18}\endsetslot
        \setslot{orn19}\endsetslot
        \setslot{orn20}\endsetslot
        \setslot{orn21}\endsetslot
        \setslot{orn22}\endsetslot
        \setslot{orn23}\endsetslot
        \setslot{orn24}\endsetslot
        \setslot{orn25}\endsetslot
        \setslot{orn26}\endsetslot
        \setslot{orn27}\endsetslot
        \setslot{orn28}\endsetslot
        \setslot{orn29}\endsetslot
        \setslot{orn30}\endsetslot
        \setslot{orn31}\endsetslot
        \setslot{orn32}\endsetslot
        \setslot{orn33}\endsetslot
        \setslot{orn34}\endsetslot
        \setslot{orn35}\endsetslot
        \setslot{orn36}\endsetslot
        \setslot{orn37}\endsetslot
        \setslot{orn38}\endsetslot
        \setslot{orn39}\endsetslot
        \setslot{orn40}\endsetslot
        \setslot{orn41}\endsetslot
        \setslot{orn42}\endsetslot
        \setslot{orn43}\endsetslot
        \setslot{orn44}\endsetslot
        \setslot{orn45}\endsetslot
        \setslot{orn46}\endsetslot
        \setslot{orn47}\endsetslot
        \setslot{orn48}\endsetslot
        \setslot{orn49}\endsetslot
        \setslot{orn50}\endsetslot
        \setslot{orn51}\endsetslot
        \setslot{orn52}\endsetslot
        \setslot{orn53}\endsetslot
        \setslot{orn54}\endsetslot
        \setslot{orn55}\endsetslot
        \setslot{orn56}\endsetslot
        \setslot{orn57}\endsetslot
        \setslot{orn58}\endsetslot
        \setslot{orn59}\endsetslot
        \setslot{orn60}\endsetslot
        \setslot{orn61}\endsetslot
        \setslot{orn62}\endsetslot
        \setslot{orn63}\endsetslot
        \setslot{orn64}\endsetslot
        \setslot{orn65}\endsetslot
        \setslot{orn66}\endsetslot
        \setslot{orn67}\endsetslot
        \setslot{orn68}\endsetslot
        \setslot{orn69}\endsetslot
        \setslot{orn70}\endsetslot
        \setslot{orn71}\endsetslot
        \setslot{orn72}\endsetslot
        \setslot{orn73}\endsetslot
        \setslot{orn74}\endsetslot
        \setslot{orn75}\endsetslot
        \setslot{orn76}\endsetslot
        \setslot{orn77}\endsetslot
        \setslot{orn78}\endsetslot
        \setslot{orn79}\endsetslot
        \setslot{orn80}\endsetslot
        \setslot{orn81}\endsetslot
        \setslot{orn82}\endsetslot
        \setslot{orn83}\endsetslot
        \setslot{orn84}\endsetslot
        \setslot{orn85}\endsetslot
        \setslot{orn86}\endsetslot
        \setslot{orn87}\endsetslot
        \setslot{orn88}\endsetslot
        \setslot{orn89}\endsetslot
        \setslot{orn90}\endsetslot
        \setslot{orn91}\endsetslot
        \setslot{orn92}\endsetslot
        \setslot{orn93}\endsetslot
        \setslot{orn94}\endsetslot
        \setslot{orn95}\endsetslot
        \setslot{orn96}\endsetslot
        \setslot{orn97}\endsetslot
        \setslot{orn98}\endsetslot
        \setslot{orn99}\endsetslot
        \setslot{orn100}\endsetslot
        \setslot{orn101}\endsetslot
        \setslot{orn102}\endsetslot
        \setslot{orn103}\endsetslot
        \setslot{orn104}\endsetslot
        \setslot{orn105}\endsetslot
        \setslot{orn106}\endsetslot
        \setslot{orn107}\endsetslot
        \setslot{orn108}\endsetslot
        \setslot{orn109}\endsetslot
        \setslot{orn110}\endsetslot
        \setslot{orn111}\endsetslot
        \setslot{orn112}\endsetslot
        \setslot{orn113}\endsetslot
        \setslot{orn114}\endsetslot
        \setslot{orn115}\endsetslot
        \setslot{orn116}\endsetslot
        \setslot{orn117}\endsetslot
        \setslot{orn118}\endsetslot
        \setslot{orn119}\endsetslot
        \setslot{orn120}\endsetslot
        \setslot{orn121}\endsetslot
        \setslot{orn122}\endsetslot
        \setslot{orn123}\endsetslot
        \setslot{orn124}\endsetslot
        \setslot{orn125}\endsetslot
        \setslot{orn126}\endsetslot
        \setslot{orn127}\endsetslot
        \setslot{orn128}\endsetslot
        \setslot{orn129}\endsetslot
        \setslot{orn130}\endsetslot
        \setslot{orn131}\endsetslot
        \setslot{orn132}\endsetslot
        \setslot{orn133}\endsetslot
        \setslot{orn134}\endsetslot
        \setslot{orn135}\endsetslot
        \setslot{orn136}\endsetslot
        \setslot{orn137}\endsetslot
        \setslot{orn138}\endsetslot
        \setslot{orn139}\endsetslot
        \setslot{orn140}\endsetslot
        \setslot{orn141}\endsetslot
        \setslot{orn142}\endsetslot
        \setslot{orn143}\endsetslot
        \setslot{orn144}\endsetslot
        \setslot{orn145}\endsetslot
        \setslot{orn146}\endsetslot
        \setslot{orn147}\endsetslot
        \setslot{orn148}\endsetslot
        \setslot{orn149}\endsetslot
        \setslot{orn150}\endsetslot
        \setslot{orn151}\endsetslot
        \setslot{orn152}\endsetslot
        \setslot{orn153}\endsetslot
        \setslot{orn154}\endsetslot
        \setslot{orn155}\endsetslot
        \setslot{orn156}\endsetslot
        \setslot{orn157}\endsetslot
        \setslot{orn158}\endsetslot
        \setslot{orn159}\endsetslot
        \setslot{orn160}\endsetslot
        \setslot{orn161}\endsetslot
        \setslot{orn162}\endsetslot
        \setslot{orn163}\endsetslot
        \setslot{orn164}\endsetslot
        \setslot{orn165}\endsetslot
        \setslot{orn166}\endsetslot
        \setslot{orn167}\endsetslot
        \setslot{orn168}\endsetslot
        \setslot{orn169}\endsetslot
        \setslot{orn170}\endsetslot
        \setslot{orn171}\endsetslot
        \setslot{orn172}\endsetslot
        \setslot{orn173}\endsetslot
        \setslot{orn174}\endsetslot
        \setslot{orn175}\endsetslot
        \setslot{orn176}\endsetslot
        \setslot{orn177}\endsetslot
        \setslot{orn178}\endsetslot
        \setslot{orn179}\endsetslot
        \setslot{orn180}\endsetslot
        \setslot{orn181}\endsetslot
        \setslot{orn182}\endsetslot
        \setslot{orn183}\endsetslot
        \setslot{orn184}\endsetslot
        \setslot{orn185}\endsetslot
        \setslot{orn186}\endsetslot
        \setslot{orn187}\endsetslot
        \setslot{orn188}\endsetslot
        \setslot{orn189}\endsetslot
        \setslot{orn190}\endsetslot
        \setslot{orn191}\endsetslot
        \setslot{orn192}\endsetslot
        \setslot{orn193}\endsetslot
        \setslot{orn194}\endsetslot
        \setslot{orn195}\endsetslot
        \setslot{orn196}\endsetslot
        \setslot{orn197}\endsetslot
        \setslot{orn198}\endsetslot
        \setslot{orn199}\endsetslot
        \setslot{orn200}\endsetslot
        \setslot{orn201}\endsetslot
        \setslot{orn202}\endsetslot
        \setslot{orn203}\endsetslot
        \setslot{orn204}\endsetslot
        \setslot{orn205}\endsetslot
        \setslot{orn206}\endsetslot
        \setslot{orn207}\endsetslot
        \setslot{orn208}\endsetslot
        \setslot{orn209}\endsetslot
        \setslot{orn210}\endsetslot
        \setslot{orn211}\endsetslot
        \setslot{orn212}\endsetslot
        \setslot{orn213}\endsetslot
        \setslot{orn214}\endsetslot
        \setslot{orn215}\endsetslot
        \setslot{orn216}\endsetslot
        \setslot{orn217}\endsetslot
        \setslot{orn218}\endsetslot
        \setslot{orn219}\endsetslot
        \setslot{orn220}\endsetslot
        \setslot{orn221}\endsetslot
        \setslot{orn222}\endsetslot
        \setslot{orn223}\endsetslot
        \setslot{orn224}\endsetslot
        \setslot{orn225}\endsetslot
        \setslot{orn226}\endsetslot
        \setslot{orn227}\endsetslot
        \setslot{orn228}\endsetslot
        \setslot{orn229}\endsetslot
        \setslot{orn230}\endsetslot
        \setslot{orn231}\endsetslot
        \setslot{orn232}\endsetslot
        \setslot{orn233}\endsetslot
        \setslot{orn234}\endsetslot
        \setslot{orn235}\endsetslot
        \setslot{orn236}\endsetslot
        \setslot{orn237}\endsetslot
        \setslot{orn238}\endsetslot
        \setslot{orn239}\endsetslot
        \setslot{orn240}\endsetslot
        \setslot{orn241}\endsetslot
        \setslot{orn242}\endsetslot
        \setslot{orn243}\endsetslot
        \setslot{orn244}\endsetslot
        \setslot{orn245}\endsetslot
        \setslot{orn246}\endsetslot
        \setslot{orn247}\endsetslot
        \setslot{orn248}\endsetslot
        \setslot{orn249}\endsetslot
        \setslot{orn250}\endsetslot
        \setslot{orn251}\endsetslot
        \setslot{orn252}\endsetslot
        \setslot{orn253}\endsetslot
        \setslot{orn254}\endsetslot
        \setslot{orn255}\endsetslot
\endencoding
\end{filecontents}
\begin{filecontents}{CasioES0.map}
ES03-8r ES03 <[8r.enc <ES03.ttf " TeXBase1Encoding ReEncodeFont "
ES04-8r ES04 <[8r.enc <ES04.ttf " TeXBase1Encoding ReEncodeFont "
\end{filecontents}
\documentclass{article}
\begin{document}
Nothing to say.
\end{document}

Then

mv ES03.TTF ES03.ttf
mv ES04.TTF ES04.ttf
ttf2afm ES03.ttf > ES03.afm
ttf2afm ES04.ttf > ES04.afm
tex ES03-drv.tex
tex ES04-drv.tex
pltotf ES03-8r.pl
pltotf ES04-8r.pl
pltotf ES03.pl
pltotf ES04.pl
vptovf ES03-u.vpl
vptovf ES04-u.vpl
tex ES03-map.tex
tex ES04-map.tex
cat *.map > CasioES0.map

You need ornaments.enc, CasioES0.map, CasioES0.sty and the .vf, .tfm .ttf and .fd files. The other .map files and the .tex, .etx, .mtx, .pl, .vpl, .sh and the usual .log files etc. may be deleted.

|improve this answer|||||
  • I'm sorry you had to do a lot of things. You have spent a lot of effort. But it is very meaningful for beginners like me. Perfect working. – Özgür Aug 24 '17 at 7:15
2

I don't know much about what ttf2tfm custom.ttf -p T1-WGL4.enc does. But if you look at the T1 encoding, it has:

  • Character ^ at position 94 (same as its ASCII value)
  • Character ~ at position 127 (same as its ASCII value)
  • Character ` at position 0: what it has at position 96 (ASCII value of the backtick) is instead the character , which is the character (that is encoded in Unicode as) U+2018 LEFT SINGLE QUOTATION MARK.

You can tell TeX to pick up whatever glyph it has at position n of a particular font, by saying \char followed by the number n. Thus, you can write {\char94}, {\char127} and {\char0} for the above characters respectively.

All this assumes that the font has indeed been encoded in the T1 encoding (which is what you seem to have ended up with somehow). As @cfr points out, this probably doesn't make sense for a font that has so little overlap with the set of characters that the T1 encoding is meant to cover. In fact, you could use any ad-hoc encoding with the glyphs mapped to arbitrary positions within the font, and use {\char N} with the appropriate values of N to get your desired characters from the font. And it makes sense to do such a thing, if you have a lot of characters that are not in T1.

|improve this answer|||||
  • I promised to give you bounty, but cfr's response is more comprehensive. If I give the bounty to cfr, would I have done wrong against you? – Özgür Aug 24 '17 at 7:10
  • No :-) Please give it to @cfr. – ShreevatsaR Aug 24 '17 at 9:36
  • Almost no font is T1-encoded as is. The reason it works reasonably well for ES03 is that Casio have called the characters 'a', 'b', 'c' and so on, even though they are not those characters at all. However, some of the characters in ES04 appear to be named in ways which T1 won't pick up e.g. ordfeminine and logicalnot. On the other hand, a lot of these apparent characters don't appear to actually exist, so I'm not sure that matters. What matters more is that, e.g., you really don't want typing fi to give you whatever happens to be in the fi ligature slot. – cfr Aug 24 '17 at 12:11
  • @Özgür I really don't care about the bounty. – cfr Aug 24 '17 at 12:12
  • 1
    But something like 'numbersign' isn't in T1, but rather in TS1, so if you want the character Casio put there, the T1 approach won't work. The advantage of the U encoding is you can use pifont and it doesn't expect anything to be anywhere in particular, doesn't include ligatures etc. – cfr Aug 24 '17 at 12:18

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.