Open krfkeith opened 7 years ago
Can you give a specific example of how this might work, or a font that lacks a specific glyph?
A good example would be letter with double diacritics. For example, the capital A with macron and acute accent doesn't exist as a precomposed glyph in Unicode, and as such it doesn't have a slot in most fonts. Nevertheless, OpenType fonts can specify how to place accents in such scenarios. For example, here is how the character is supposed to look in Libertine:
However, since this character doesn't exist precomposed in the Libertine font, there's no way to access the advanced placement features from within pdfTeX. The only way to even sort of getting anything approximating this character is the \twoacc
command from the covington
package, and even that doesn't work very well:
As you can see, the accent is way too high up, but even if it weren't it doesn't look as good as the former. Ideally, there we would be a way to "synthesize" these missing glyphs on the fly, using the OpenType rules. Something maybe like:
% SYNTHESIZE Amacron acute := Amacronacute
where the generated glyph would be available under the name Amacronacute
. In addition, this would prove useful for generating pseudo-ligatures in place of opentype contextual substitutions. For example, many fonts will substitute an 'f' character which is less wide before characters like 'ä'
% SYNTHESIZE f.short adieresis := f_adieresis
% LIGKERN f adieresis := f_adieresis
It might simply work to add a character such as “Amacron_acute” to the encoding. Have you tried something like that?
Often times, there is a glyph one might want that doesn't exist with it's own slot in the font itself. Unfortunately, using LaTeX to create accented characters has serious drawbacks: not the least of which is that it's impossible to create characters with double diacritics without extra packages and manual tweaking. Furthermore, this doesn't take advantage of OpenType's advanced positioning features to achieve optimal results. What I am looking for is some sort of feature wherein you specify a character and one or more combining characters, and otftotfm would then synthesize this character and put it in whatever slot specified.