3

I am writing a package in LaTeX, and would like to have basic macros (e.g. \vulture) for printing almost all the Egyptian hieroglyphs (e.g. U+13150 𓅐 - Egyptian Hieroglyph G14 - Vulture).

As far as I checked, there is no font in CTAN that covers all the available hieroglyphs and also, I would like to be able to use Noto Sans Egyptian Hieroglyph font which is in .ttf format. After some research, I understand that in order to use TrueType fonts in LaTeX I need to convert them to formats that TeX can understand such as .tfm, .fd, .mapΒ  etc. but got lost. How do I make these non-latin characters and their fonts available for LaTeX?

I have checked the hieroglf package, some hieroglyphs are defined in this package but they are very limited, so this package has no use for me.

I have found similar questions:

but the answers suggest XeLaTeX and LuaTex, so they are not applicable in my case.

The package needs to be compatible with LaTeX, so I am not looking for solutions in XeLaTeX or LuaTeX.

Long story short, I want something like:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}    % I don't know if T1 supports Egyptian hieroglyphs.
\usepackage{mypackage}      % defines \vulture

\begin{document}
\vulture                    % prints 𓅐
\end{document}

And be able to have the output: 𓅐 in a pdf file.

Do you have any idea how to implement this?

7
  • 1
    Can you maybe add why you need latex and not lua- or xelatex? Jan 5 at 16:45
  • @samcarter_is_at_topanswers.xyz the package is intended for LaTeX, it has to work with LaTeX engine. Isn't it possible to work with non-latin characters in LaTeX?
    – aralto
    Jan 5 at 16:53
  • 1
    well there are around 1000 character in this code block. So you would have to setup 4-5 fonts. Some info how to do it can be found in the fontinstallation guide, in tug.org/TUGboat/tb30-1/tb94thanh.pdf and in the pdftex manual. Easier would be to make lots of images and to include them with \includegraphics, see ctan.org/tex-archive/macros/latex/contrib/twemojis, where all symbols are in one large pdf. Jan 5 at 17:13
  • 4
    it really makes no sense not to use a Unicode TeX such as lualatex for this, classic tex fonts can have at most characters 0-255 so arranging to use a Unicode font set such as Noto requires building dozens of custom fonts and arranging macros to map input to the right range. With lualatex, the Noto fonts "just work". lualatex is latex built from the same source but using luatex engine rather than etex or pdftex Jan 5 at 17:24
  • 1
    Follow up to my previous comment: … LuaLaTeX and XeLaTeX also handle TTF fonts natively (which David Carlisle also just said with much more precision).
    – Miyase
    Jan 5 at 17:24

1 Answer 1

4

Using lualatex (or xelatex) you can directly use the truetype or opentype fonts with characters in Unicode order:

enter image description here

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Noto Sans}
\newfontfamily\Hiero{NotoSansEgyptianHieroglyphs-Regular.ttf}
\begin{document}

Some text.

{\Hiero
𓁷
𓏀
π“ŽŸ
π“€€
𓁐
π“₯
𓃀
π“ˆ–
π“Œ±
π“…“
π“Ž›
π“…±
π“€”
π“ˆ–
π“Œ±
π“…“
π“Ž›
𓇋
𓇋
𓏏
𓁐
𓐍
π“‚‹
π“‹΄
𓂝
π“Ž›
π“‹©
𓉔
π“Šͺ
𓏛
π“‹΄
𓐠
π“„Ώ
π“‚‹
𓏏
π“Œ—
𓀁
π“Œ·
𓂝
𓏏
𓏭
𓏛
𓇾
𓏏
π“…“
π“…±
π“€€
𓁐
π“ͺ
𓃀
π“Œ’
π“Œ’
π“ˆ–
π“ˆ–
𓏛
𓁷
𓏀
π“ŽŸ
π“€€
𓁐
π“₯
𓃀
π“ˆ–
π“Œ±
π“…“
π“Ž›
π“…±
π“€”
π“ˆ–
π“Œ±
π“…“
π“Ž›
𓇋
𓇋
𓏏
𓁐
𓐍
π“‚‹
π“‹΄
𓂝
π“Ž›
π“‹©
𓉔
π“Šͺ
𓏛
π“‹΄
𓐠
π“„Ώ
π“‚‹
𓏏
π“Œ—
𓀁
π“Œ·
𓂝
𓏏
𓏭
𓏛
𓇾
𓏏
π“…“
π“…±
π“€€
𓁐
π“ͺ
𓃀
π“Œ’
π“Œ’
π“ˆ–
π“ˆ–
𓏛
 

}

\end{document}
5
  • Thank you for your answer David, with Unicode TeX this problem can be handled easily. My concern is that the users of my package should be able to generate pdf files with (pdf)LaTeX if they do not have access to XeLaTeX or LuaLaTeX. Ulrike mentioned font installation, that is probably what I am looking for. But if I can't manage to find a solution then I think I will implement it with XeLaTeX.
    – aralto
    Jan 5 at 19:57
  • 2
    @aralto asking users to install the multiple font, map and metric files needed for pdftex is much harder than asking them to use luatex (given the choice I would use luatex rather than xetex) Jan 5 at 20:03
  • 1
    @aralto it is rather hard to get access to pdflatex but not lualatex and xelatex. All three are part of texlive and miktex and very few people install a self-standing pdftex not part of a standard distributon Jan 5 at 20:21
  • Alright. I have one more question: How do I make sure that anyone who uses my package has the required font? Right now I am planning to use Noto Sans but I might change it to a custom font. Thanks for your replies.
    – aralto
    Jan 5 at 20:25
  • @aralto simplest if it is not already in texlive is to document it I did not have this but I clicked the link in your question clicked download and then ran lualatex, it's hard to make it much simpler Jan 5 at 20:28

You must log in to answer this question.

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