Font subsetting tool that keeps OpenType features?

Primary tabs

9 posts / 0 new
Last post
­­­'s picture
Offline
Joined: 20 Jan 2017 - 9:39am
Font subsetting tool that keeps OpenType features?
0

I am looking for a tool (maybe software or a Web service) that can create subset of a given font containing glyphs for chosen characters only.

All the solutions known to me lack one crucial feature: they don’t know anything about OpenType features (ligatures, figure styles, alternates etc.). I.e. if I request a subset containing “ABCabc123”, the software creates a font with 9 glyphs—without, for instance, small-caps for these letters or sub/superscript for these figures. Requesting a subset of “f” and “i”, I get no glyph for “fi” ligature in resulting font, and so on.

Do you know a tool that can subset font together with all OpenType features for chosen characters?

David Berlow's picture
Offline
Joined: 19 Jul 2004 - 6:31pm
+2

Let's be clear. Who are you? There is no name of gender attatched to your post.

And also, if You request a subset containing “ABCabc123”, and that's it, why should a subsetter include glyphs of features you did not request? I think subsetting tools are there to make the font smaller, so making decisions behind the user's back that make the font larger would be hard to use. Thus, smart subsetting tools require you to name the glyphs and/or the features you wish to be in the font, explicitly.

Hope that helps.

­­­'s picture
Offline
Joined: 20 Jan 2017 - 9:39am
0

David, I entered my name while registering, and I don’t know why this forum doesn’t display it.

I look for a tool that could accomplish this particular task: “take these characters (Unicode characters, not glyphs!) and create the subset of the font that contains ALL glyphs and ALL OpenType features related to these characters”. Seems that I am the only person in the world who has this need. :-(

Theunis de Jong's picture
Offline
Joined: 22 Apr 2008 - 5:06pm
0

If you ask for a subset of 'f' and 'i', do you want just 'fi' and 'ffi' ligatures, or - "ALL OpenType features related" - the ligatures for 'fj' and 'ft' as well? Minding that regular software will *not* be able to access these characters, because you will not be able to use a 'j', since it's not in your font.

And what about OpenType kerning? Do you want *every* character included that kerns against your chosen character?

What is the purpose of your subset font?

­­­'s picture
Offline
Joined: 20 Jan 2017 - 9:39am
+1

Theunis, thank you for the question.

I am a Web developer and I want to speed up loading of font files on my websites. So it would be nice if, instead of bulk files with thousands of glyphs, files containing only the needed glyphs were provided by the server.

Creating these font files manually is not an option, for website content changes constantly. Today, for example, an article with Greek letters could be added, and tomorrow it could be removed from the site, and Greek script glyphs will no longer be needed until the next time.

On my websites, OpenType features are extensively used, especially the ligatures, small capitals and figure styles (e.g. onum + pnum for inline numbers, but lnum + tnum in tables). Ideally, I would be satisfied with a tool that programmatically traverses all the content and, in some magic way, finds out what particular glyphs are needed to render all pages correctly, and then creates the subset of a font with these and only these glyphs.

But this solution would require too much black magic, so I am looking for something more simple. I can programmatically get the list of all codepoints currently used in site’s content, and I wish the tool to find all glyphs that can correspond to these codepoints. I.e. if U+0031 DIGIT ONE is on the list, let the tool include all glyphs representing “1” into the resulting subset. Ideally, again, the “fi” ligature glyph should be included only if “fi” substring is found somewhere in the content, but it would be enough if the tool includes all ligatures for given letters. I.e. if U+0066 LATIN SMALL LETTER F is on the list, let the tool pick all ligatures containing “f” (fi, fl, ffj etc.).

Thomas Phinney's picture
Offline
Joined: 3 Sep 2002 - 11:00am
0

I think it is pretty self-evident that if a client wants a specific characters subset, with related kerning and OT features, then the default delivery would be:
- those characters, their variants, and ligatures whose inputs are *all* among the aforementioned glyphs
- kerning for those pairs (and triplets etc) whose constituent glyphs are *all* in the newly defined subset

Of course, one would verify that with the client, but that would be the obvious answer. Some of Theunis' suggestions seem deliberately twisted to me, but maybe it's just me. :)

Theunis de Jong's picture
Offline
Joined: 22 Apr 2008 - 5:06pm
0

Thomas, it's just exploring the OP's request to the fullest.

So, if I understand it correctly, for my example of "f", only the "ff" ligature and the kerning of "f" against itself ought to be included? And an additional "i" would add "fi", "ffi", and kerning for "f" against "i" and the reverse?

Thomas Phinney's picture
Offline
Joined: 3 Sep 2002 - 11:00am
0

That seems like the rational default implementation, in the absence of other data. It is doing exactly as requested (IMO).

Sami's picture
Offline
Joined: 10 Dec 2008 - 5:18am
+1

Maybe the program You are looking for is DTL OTMaster.
OTM can export the opentype features, remove glyphs and reimport the opentype features.