Automatic “dtls” feaures

The automatic dtls feature should add the following mappings if the corresponding .dtls glyphs are missing from the font (provided that the target glyphs are in the font, off course, and ideally it should do so by checking for the relevant unicodes since most math fonts don’t use nice names):

sub i by idotless;
sub j by jdotless;
sub iitlaic-math by idotlessitalic-math;
sub jitlaic-math by jdotlessitalic-math;

What possible setups can be there? Those four pairs above? And what .dtls can be there?

Ideally the font would also include .dtls variants for other math i and j glyphs that don’t have encoded dotless versions. There might also be .ssty variants as well e.g.: i.ssty (or i.ssty1 and i.ssty2) and idotless.ssty etc.

Can you post a typical feature code?

Something like this:

	sub i by idotless;
	sub j by jdotless;
	sub iitalic-math by idotlessitalic-math;
	sub jitalic-math by jdotlessitalic-math;
	sub iitalicdoubleStruck by iitalicdoubleStruck.dtls;
	sub jitalicdoubleStruck by jitalicdoubleStruck.dtls;
	sub ibold-math by ibold-math.dtls;
	sub jbold-math by jbold-math.dtls;
	sub ibolditalic-math by ibolditalic-math.dtls;
	sub jbolditalic-math by jbolditalic-math.dtls;
	sub i-fraktur by ifraktur.dtls;
	sub j-fraktur by jfraktur.dtls;
	sub iBold-fraktur by iBold-fraktur.dtls;
	sub jBold-fraktur by jBold-fraktur.dtls;
	sub idoubleStruck by idoubleStruck.dtls;
	sub jdoubleStruck by jdoubleStruck.dtls;
	sub isans-math by isans-math.dtls;
	sub jsans-math by jsans-math.dtls;
	sub isansbold-math by isansbold-math.dtls;
	sub jsansbold-math by jsansbold-math.dtls;
	sub isansitalic-math by isansitalic-math.dtls;
	sub jsansitalic-math by jsansitalic-math.dtls;
	sub isansbolditalic-math by isansbolditalic-math.dtls;
	sub jsansbolditalic-math by jsansbolditalic-math.dtls;
	sub imono-math by imono-math.dtls;
	sub jmono-math by jmono-math.dtls;
	sub iscript-math by iscript-math.dtls;
	sub jscript-math by jscript-math.dtls;
	sub iboldscript-math by iboldscript-math.dtls;
	sub jboldscript-math by jboldscript-math.dtls;

I think .ssty variants can be ignored and ssty feature made to be the last feature.

What would be a good default sorting for this feature? This is the order used:

aalt
ccmp
locl
mgrk
subs
sinf
sups
numr
dnom
frac
afrc
ordn
lnum
pnum
tnum
onum
calt
hist
c2sc
smcp
c2pc
pcap
case
unic
isol
init
medi
med2
fina
fin2
fin3
rlig
hlig
dlig
liga
zero
ornm
cpsp
nukt
akhn
rphf
rkrf
pref
blwf
half
vatu
pstf
cjct
blws
psts
pres
abvs
haln
abvm
blwm
fwid
hkna
hojo
hwid
jp04
jp78
jp83
nalt
nlck
pkna
pwid
ital
qwid
ruby
trad
twid
vert
vkna
vrt2
titl
swsh
rand
ssty
salt
ssXX
cvXX

Where in this list would you put dtls?

There are not that many features that are used in math fonts. They are flac, dtls and ssty. flac affects accents over capitals (something like *.case accents), so there is not interaction between it and dtls, so this leaves ssty which should be last. So I’d put dtls right before ssty.

It is in the latest update.

1 Like

I’m on 3237 build but it is still missing:

sub i by dotlessi;
sub j by dotlessj;
sub uni1D456 by uni1D6A4;
sub uni1D457 by uni1D6A5;

I renamed the glyphs to Glyphs names for testing, and I got:

sub iitalic-math by idotlessitalic-math;
sub jitalic-math by jdotlessitalic-math;

but still no sub i by idotless; nor sub j by jdotless;. (for my actual project I can’t used the nice names for legacy reasons, so I had hopped glyphs would handle these by the Unicode values not glyph names).

I made it work with unicodes. Thanks for the suggestion.

But shouldn’t it be possible to use design names in the .glyphs file and production names for the final font?

1 Like

Thanks.

I’m collaborating on a project with someone else and renaming glyphs en mass will likely cause unneeded disruptions, so I’m trying to avoid this as much as possible.

Looks good now, thanks.

We need also to auto generate languagesystem math dflt; to fonts that has any of ssty, dtls, or flac features.

I also notice that dtls will be added now to any font that has idotless or jdotless, this is probably not needed for most fonts, so may be autogenerate the feature only of there is at least one .dtls glyph?

Even if the math script is not mentioned in the code?

done in 3241

1 Like

Yes. Several implementations will apply these features only for the math script.

Thanks!

And would that mean we need to register those lookups for the math script, too?

Aren’t they registered automatically if we have languagesystem math dflt?

Right. Added the automatic “math” line, too.

1 Like