Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate pre-composed glyphs using advanced OpenType features. #14

Open
krfkeith opened this issue Jan 5, 2017 · 3 comments
Open

Generate pre-composed glyphs using advanced OpenType features. #14

krfkeith opened this issue Jan 5, 2017 · 3 comments

Comments

@krfkeith
Copy link

krfkeith commented Jan 5, 2017

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.

@kohler
Copy link
Owner

kohler commented Jan 6, 2017

Can you give a specific example of how this might work, or a font that lacks a specific glyph?

@krfkeith
Copy link
Author

krfkeith commented Jan 10, 2017

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:

screenshot_117

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:

screenshot_118

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

@kohler
Copy link
Owner

kohler commented Feb 23, 2018

It might simply work to add a character such as “Amacron_acute” to the encoding. Have you tried something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants