fontspec
fontspec copied to clipboard
Use allocator for encoding names
Something like
\newencoding\foo
\DeclareUnicodeEncoding{\foo}{...}
This would create a new TU*
NFSS encoding name for each "logical name" \foo
etc.
I think this suggestion might have come from me originally, but...
I'm not sure it helps, if used in that way
looking at the use of a new encoding eg
http://tex.stackexchange.com/questions/349148/lualatex-is-not-rendering-%c5%a5-character-with-andika-new-basic-font/349154#349154
The name TUX needs to be unique (easy in a document, less easy if that was pushed to a package for setting up the font) but an allocator wouldn't help
\newencoding\TUX...
would just mean that the name \TUX had to be unique.
What might help if the allocator could completely anonymise the encoding name, something like
\declareusingnewunicodeencoding{ \input{tuenc.def}% load usual definitions \UndeclareComposite{\v}{t}% This variant has no ť \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \setmainfont{AndikaNewBasic-R.ttf} }
which declares TU223 or whatever internally but then uses that for both the encoding definition and the font setup without having to show the encoding name anywhere.
perhaps...
I see what you mean, but have labels for things been much of a problem up to this point? I also think you can do some other interesting things with labels that you couldn’t do anonymously, such as inheritance. It’s not out of the question we could have:
\DeclareUnicodeEncoding{TUx}{\InheritEncoding{TU}…}
\DeclareUnicodeEncoding{TUy}{\InheritEncoding{TUx}…}
I don’t plan on making any quick changes here, so I’ll keep mulling things over...
I don't remember much about why this was logged originally and I don't think people have been clambering for an improvement so I'll close this one now