\relax Part of the tolkienfonts package Copyright 2010 Ariel Barton 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 Ariel Barton. This work consists of all the files listed in Appendix F of the file `tolkienfontsdoc.pdf'. Date: 2010/08/29 Version: 2 \metrics \fontspecificglyphs \setint{fontdimen(5)}{400} % 1 ex \newif \iffancykerns \fancykernsfalse \newif \iferegion % Note: The fancy kerning assumes that there is some dummy character in your font, % named defaultkernchar, which kerns on the right to everything's default kern. \def\cloneglyph#1#2{ \setglyph{#1} \glyph{#2}{1000} \endsetglyph \setleftrightkerning{#1}{#2}{1000}} \def\cloneglyphunkerned#1#2{ \setglyph{#1} \glyph{#2}{1000} \endsetglyph \setrightkerning{#1}{#2}{1000}} \def\cloneglyphkerned#1#2{ \setglyph{#1} \movert{\kerning{defaultkernchar}{#2}}\glyph{#2}{1000} \endsetglyph \setrightkerning{#1}{#2}{1000}} \setglyph{latinperiod} \endsetglyph \setglyph{defaultkernchar} \endsetglyph \setcommand\wordendlig#1{ \ligature{LIG/}{dashsilent}{#1} \ligature{LIG/}{lowonedot}{#1} \ligature{LIG/}{onedot}{#1} \ligature{LIG/}{twodots}{#1} \ligature{LIG/}{threedots}{#1} \ligature{LIG/}{fourdots}{#1} \ligature{LIG/}{tallthreedots}{#1} \ligature{LIG/}{latinperiod}{#1} } \setglyph{cirthII} \glyph{cirthI}{1000}\movert{\kerning{cirthI}{cirthI}}\glyph{cirthI}{1000}\endsetglyph \setglyph{cirthUUalt} \glyph{cirthU}{1000}\movert{\kerning{cirthU}{cirthU}}\glyph{cirthU}{1000}\endsetglyph \setglyph{daeronX} \glyph{cirthK}{1000}\movert{\kerning{cirthK}{cirthSS}}\glyph{cirthSS}{1000}\endsetglyph \setleftkerning {daeronX}{cirthK}{1000} \setrightkerning{daeronX}{cirthSS}{1000} \cloneglyph{altcirthD}{cirthD} \cloneglyph{cirthC}{cirthK} \cloneglyph{cirthFnoV}{cirthF} \cloneglyph{cirthWafterA}{cirthW} \cloneglyph{daeronY}{cirthI} \cloneglyph{engdaeronN}{daeronN} \cloneglyph{startcirthL}{cirthL} \cloneglyph{startdaeronR}{daeronR} \cloneglyph{moriaR}{daeronN} \cloneglyph{daeronENG}{moriaN} \cloneglyph{moriaZ}{daeronNJ} \cloneglyph{ereborK}{cirthK} \cloneglyph{ereborX}{daeronNJ} \cloneglyph{moriaJ}{daeronR} \cloneglyph{ereborG}{daeronR} \cloneglyph{moriaZH}{daeronRH} \cloneglyph{ereborGH}{daeronRH} \cloneglyph{moriaND}{daeronNG} \cloneglyph{moriaNJ}{daeronND} \cloneglyph{altmoriaNJ}{altdaeronND} \cloneglyph{ereborOU}{daeronND} \cloneglyph{altereborOU}{altdaeronND} \cloneglyph{moriaENG}{daeronZ} \cloneglyph{ereborZ}{cirthUU} \cloneglyph{daeronNclone}{daeronN} \cloneglyph{cirthSSletterC}{cirthSS} \cloneglyph{cirthAnodipthong}{cirthA} \cloneglyph{cirthEnodipthong}{cirthE} \cloneglyph{cirthInodipthong}{cirthI} \cloneglyph{moriaYnodipthong}{moriaY} \cloneglyph{hobbitA}{cirthD} \cloneglyph{hobbitB}{cirthM} \cloneglyph{hobbitC}{cirthCH} \cloneglyph{hobbitD}{daeronND} \cloneglyph{hobbitF}{cirthG} \cloneglyph{hobbitG}{daeronZ} \cloneglyph{hobbitH}{cirthEE} \cloneglyph{hobbitI}{cirthI} \cloneglyph{hobbitJ}{cirthI} \cloneglyph{hobbitL}{cirthT} \cloneglyph{hobbitM}{altdaeronND} \cloneglyph{hobbitN}{cirthLH} \cloneglyph{hobbitO}{cirthGW} \cloneglyph{hobbitP}{cirthNW} \cloneglyph{hobbitR}{cirthB} \cloneglyph{hobbitS}{moriaY} \cloneglyph{hobbitT}{daeronN} \cloneglyph{hobbitU}{cirthA} \cloneglyph{hobbitV}{cirthA} \cloneglyph{hobbitW}{cirthP} \cloneglyph{hobbitX}{moriaN} \cloneglyph{hobbitZ}{daeronNJ} \cloneglyph{hobbitOO}{cirthHW} \cloneglyph{hobbitTH}{cirthPS} \cloneglyph{hobbitNG}{cirthUU} \cloneglyph{hobbitEA}{cirthNGW} \cloneglyph{hobbitEE}{cirthU} \ifisglyph{altcirthOO}\then\cloneglyph{hobbitE}{altcirthOO}\else\cloneglyph{hobbitE}{cirthOO}\fi \ifisglyph{alticirthQ}\then\cloneglyph{hobbitK}{alticirthQ}\else\cloneglyph{hobbitK}{hobbitC}\fi \ifisglyph{ereborAU} \then\cloneglyph{hobbitY}{ereborAU} \else\cloneglyph{hobbitY}{cirthAA}\fi \cloneglyph{hobbitAalt}{altcirthD} \cloneglyph{hobbitTcap}{hobbitT} \cloneglyph{hobbitNcap}{hobbitN} \cloneglyph{hobbitAnodipthong}{hobbitA} \cloneglyph{hobbitEnodipthong}{hobbitE} \cloneglyph{hobbitInodipthong}{hobbitI} \cloneglyph{hobbitOnodipthong}{hobbitO} \cloneglyph{hobbitUnodipthong}{hobbitU} \cloneglyph{hobbitYnodipthong}{hobbitY} \setglyph{hobbitQ}\glyph{cirthCH}{1000}\movert{\kerning{cirthCH}{cirthP}}\glyph{cirthP}{1000}\endsetglyph \setleftkerning{hobbitQ}{cirthCH}{1000} \setrightkerning{hobbitQ}{cirthP}{1000} \setglyph{hobbitEO}\glyph{hobbitE}{1000}\movert{\kerning{hobbitE}{hobbitO}}\glyph{hobbitO}{1000}\endsetglyph \setleftkerning{hobbitEO}{hobbitE}{1000} \setrightkerning{hobbitEO}{hobbitO}{1000} \setglyph{hobbitOA}\glyph{hobbitO}{1000}\movert{\kerning{hobbitO}{hobbitA}}\glyph{hobbitA}{1000}\endsetglyph \setleftkerning{hobbitOA}{hobbitO}{1000} \setrightkerning{hobbitOA}{hobbitA}{1000} \setglyph{hobbitST}\glyph{hobbitS}{1000}\movert{\kerning{hobbitS}{hobbitT}}\glyph{hobbitT}{1000}\endsetglyph \setleftkerning{hobbitST}{hobbitS}{1000} \setrightkerning{hobbitST}{hobbitT}{1000} \setglyph{hobbitAA}\glyph{hobbitA}{1000}\movert{\kerning{hobbitA}{hobbitA}}\glyph{hobbitA}{1000}\endsetglyph \setleftrightkerning{hobbitAA}{hobbitA}{1000} \setglyph{hobbitUU}\glyph{hobbitU}{1000}\movert{\kerning{hobbitU}{hobbitU}}\glyph{hobbitU}{1000}\endsetglyph \setleftrightkerning{hobbitUU}{hobbitU}{1000} \setglyph{hobbitYY}\glyph{hobbitY}{1000}\movert{\kerning{hobbitY}{hobbitY}}\glyph{hobbitY}{1000}\endsetglyph \setleftrightkerning{hobbitYY}{hobbitY}{1000} \setglyph{threedots}\push\glyph{lowonedot}{1000}\pop\push\glyph{highonedot}{1000}\pop\glyph{onedot}{1000}\endsetglyph \setglyph{tallthreedots}\glyph{threedots}{1000}\endsetglyph \setglyph{fourdots}\glyph{threedots}{1000}\endsetglyph \setglyph{threedots}\push\glyph{lowonedot}{1000}\pop\push\glyph{highonedot}{1000}\pop\glyph{onedot}{1000}\endsetglyph \setglyph{tallthreedots}\glyph{threedots}{1000}\endsetglyph \setglyph{fourdots}\glyph{threedots}{1000}\endsetglyph % Getting kerning to cooperate with ligatures \def\setupsavekerns#1#2{ \cloneglyphkerned{#1kerned}{#1} \cloneglyphkerned{#2kerned}{#2} \cloneglyphunkerned{#1kernsfor#2}{#1} \cloneglyphkerned{#1kernedkernsfor#2}{#1} } \def\dosinglefancykern#1{\expandafter\ifx\csname fancykerns#1\endcsname\relax \else \csname fancykerns#1\endcsname\fi} \def\setupsinglefancykern#1#2#3{ \ifnumber{\kerning{#1}{#2}}<{\int{kernthreshold}}\then \ifnumber{\kerning{#1}{#3}}<{\int{kernthreshold}}\then \expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kernedkernsfor#3}} \Else \expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kerned}} \Fi \Else \ifnumber{\kerning{#1}{#3}}<{\int{kernthreshold}}\then \expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kernsfor#3}} \Else \expandafter\def\csname fancykerns#1#2\endcsname{} \Fi \Fi } \endmetrics