TransWikia.com

Access a Character from the Private Use Area of a font in LuaLaTex

TeX - LaTeX Asked on November 1, 2021

I am trying to access a character from the private use area of the font Aegean. It is supposed to be the second character-variant of the letter ? (U+10293), but using the font-feature doesn’t yield any results. The char-command also doesn’t work here. MWE:

documentclass{scrartcl}
usepackage{fontspec}

newfontfamilylycian{Aegean}

begin{document}

{lycian ? fontspec{Aegean}[CharacterVariant=2] ?

char"10293

char"1105dc}
end{document}

Any ideas how I can get the character displayed? Here is a screenshot from FontForge to view the font (there is no sign of the character-variant in the picture [»U+xxxxx.cv01« e.g.], but it is the case with other characters, and the above MWE hasn’t worked for them either).

enter image description here

One Answer

New Answer

You clarified in the comment that you are using v13.00 of the font and want the second variant of CV06. You can get that by loading aegean.otf with the options [Script=Lycian, CharacterVariant={6:2}].

documentclass{article}
tracinglostchars=2 % Warn if the font does not contain a character!
usepackage{fontspec}

pagestyle{empty}

defaultfontfeatures{ Renderer=HarfBuzz,
                      Scale=MatchLowercase,
                      Ligatures=TeX }
newfontfamilylycianfont{Aegean.otf}[Script=Lycian] % Requires v13.00

begin{document}
{lycianfont
symbol{"10293}
addfontfeature{CharacterVariant={6:2}}
?
addfontfeature{CharacterVariant={6:4}}
?
}
end{document}

Aegean font sample

If you copy and paste from this document, you will get ? ? ?.

The zip file from the Unicode Fonts for Ancient Scripts website should come with a document (in both PDF and ODT format) that lists every variant in the font. Otherwise, you can inspect the substitution tables in FontForge, under Elements > Font Info > Substitutions.

Original Answer

First, you seem to be using an older version of the font. The latest version of Aegean, in OTF format, is available here. However, this version has a more-restrictive license and claims to be free only “for personal use.”

With the version of the font you’re using, some investigation shows that the variant you want is actually Stylistic Alternative 2 for the Lycian script, or can also be accessed through symbol.

documentclass{article}
tracinglostchars=2 % Warn if the font does not contain a character!
usepackage{fontspec}

pagestyle{empty}

defaultfontfeatures{ Renderer=HarfBuzz,
                      Scale=MatchLowercase,
                      Ligatures=TeX }
newfontfamilyaegean{Aegean.ttf}[Script=Lycian] % Requires v6.14

begin{document}
{aegean
symbol{"10293}
addfontfeature{Alternate=2}
? (symbol{"F0286})
}
end{document}

Aegean font sample

As of 2020, version 13.0 of the font no longer uses the Private Use Area for this symbol, but supports the Unicode character ? (U+10143).

documentclass{article}
tracinglostchars=2 % Warn if the font does not contain a character!
usepackage{fontspec}

pagestyle{empty}

defaultfontfeatures{ Renderer=HarfBuzz,
                      Scale=MatchLowercase,
                      Ligatures=TeX }
newfontfamilyaegean{Aegean.otf}[Script=Lycian] % Requires v13.00

begin{document}
{aegean
symbol{"10293}
symbol{"10143} (?)
}
end{document}

Aegean Font Sample

This means that you can patch an installation with only the older font to support the ? character with

usepackage{newunicodechar}
newunicodechar{?}{{aegeansymbol{"F0286}}}

By the way, the way to check for glyph substitutions in FontForge is either to go into the substitution tables within Glyph Info, or to select View > Substitutions and go through the possible tables.

Answered by Davislor on November 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP