2

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.

1 Answer 1

3

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}
5
  • Amazing @Simon Dispa, thank you very much! Is there a way to switch to proto sinaitic and cardo within the same paragraph? I thought about something like \newcommand*{\fontcardo}{\fontfamily{Cardo}\selectfont} and likewise for proto sinaitic, however it doesn't seem to work. Any idea, please? Thanks again! Dec 1, 2021 at 21:56
  • @Albert Vonpupp Thank for your feedback. Now you are switching from cardo (as main font) to hebrew and back, in the same paragraph. Perhaps you can expand your question with an example of the expecting output . Please keep me informed. Dec 1, 2021 at 23:31
  • Sorry for the confusion and thank you again for your good will to help me out @Simon Dispa. What I am trying to ask is if there is a way to have regular hebrew (not the proto sinaitic font) mixed with proto sinaitic font and also english and greek if necessary. All of them on a single line or paragraphs. Something like: Here is some inline Hebrew \texthebrew{בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ} now in Proto-Sinaitic \texthebrewproto{abcd}. And now some random Greek from the /Iliad/ μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος. Dec 2, 2021 at 17:30
  • @Albert Vonpupp Please try the small code I added as update. Dec 2, 2021 at 22:36
  • Thank you very very very much @Simon Dispa. I had to do some minor adaptations since I am using linux and my fonts have different names but thanks to your guidance I could do it successfully. Thanks again, this is amazing, exactly what I was looking for. Dec 4, 2021 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .