Install and use the proto-sinaitic font

emacsfonts

I am trying to be able to use this font on Arch Linux + Doom Emacs. So far what I did is the following:

  • Download and unzip font to ~/.local/share/fonts/
  • run fc-cache

The font is working on libreoffice writer, it is shown as "Protosinaitic 1", however when I try that on emacs it doesn't work.

I use doom emacs as my editor, and I am writing an org document that will get exported as a latex file and later a PDF via xelatex. I will split my question in two parts.

My first question is: how do I use this font for PDF export?

This is a short version of my headers that should work as a minimal example:

#+latex_compiler: xelatex
#+LaTeX_HEADER: \usepackage{fontspec}
#+LaTeX_HEADER: \setmainfont[BoldFont={Cardo Bold}, ItalicFont={Cardo Italic}]{Cardo}

#+LaTeX_HEADER: \usepackage{polyglossia}
#+LaTeX_HEADER: \setmainlanguage{english}
#+LaTeX_HEADER: \setotherlanguage{hebrew}
#+LaTeX_HEADER: \newfontfamily\hebrewfont{Protosinaitic 1}

I would like to produce some text similar to this

mixed text with english and hebrew characters

I "guess" that it should render with some code similar to this (not sure though:

The pictograph \texthebrew{a} represents strength, the \texthebrew{b} represents the tent. Combined...

or for full paragraphs:

\begin{hebrew}
a b c d e f g
\end{hebrew}\newline

When I do an export to latex/pdf via xelatex, I expect to show the characters as on the second column here.

My second related question is the following: would it be possible to change the font for a section of the text for visual editing within Emacs? Similar to changing a paragraph only font on libreoffice. I am not talking about PDF exporting on this second question, but only for reading within Emacs. I am aware that this second question might not be related to tex.stackexchange.com but since I already asked this on the emacs sub forum without answer, I thought of leaving the question here also.

Could you please help me out, I have never done this on Emacs. Thank you very much.

Best Answer

FIRST STEP

I did not install the fonts in my system. For this example I added the Proto-Sinaitic 15.ttf file to a subdirectory fonts of the working directory and renamed it Proto-Sinaitic15.ttf (without the space). Similarly with Cardo.

The \hebrewfont was defined as

\newfontfamily\hebrewfont[%%  added <<<<<<<<<<<<<
Path=fonts/,
Extension = .ttf,%
UprightFont=*,%
]{Proto-Sinaitic15}

Using your code the character are from the second column of the table (Proto Sinaitic BC 15)

c

SECOND STEP

I installed the font in my system (windows). It shows in the c:\Windows\Fonts with the name Protosinaitic 1 Regular. The name of the file is Proto-Sinaitic15.ttf

Note that the installation performed by Windows removed the space in the file name.

Now using \newfontfamily\hebrewfont{Proto-Sinaitic15.ttf} the same output is obtained.

UPDATE after follow up

This code test inline regular Hebrew, Greek, English and Proto-Sinaitic.

c2

% !TeX TS-program = xelatex

\documentclass[12pt,a4paper]{article}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
\newfontfamily\greekfont[Script=Greek]{Arial Unicode MS}
\newfontfamily\hebrewfont[Script=Hebrew]{Arial Unicode MS}
\newfontfamily\protofont{Proto-Sinaitic15.ttf}

\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{hebrew,greek}    
\newcommand{\textproto}[1]{\bgroup\RLE{\protofont #1}\egroup} % proto text
\parindent=0pt

\begin{document}    
    
\textgreek{εὕρηκα!} \hfill \texthebrew{שלום}
    \medskip

Here is some inline Hebrew \texthebrew{בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ} now in Proto-Sinaitic \textproto{abcd}. And now some random Greek from the Iliad μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος.
        
\end{document}