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

[makeotf] PUA unicodes automatically assigned to /dieresisacute and /dieresisgrave #1662

Open
BoldMonday opened this issue Jun 13, 2023 · 8 comments

Comments

@BoldMonday
Copy link

BoldMonday commented Jun 13, 2023

When compiling source files with makeotf, glyphs named dieresisacute and dieresisgrave will automatically get PUA unicode values of 0xF6D7 and 0xF6D8.

The supplied GlyphOrderAndAliasDB file does not specify any unicode value for these glyphs and that's also what we expect to be in the generated fonts:

[...]
dieresisacute	dieresisacute
[...]
dieresisgrave	dieresisgrave
[...]

Is there a way to disable any of this automatic mapping by makeotf?

@frankrolf
Copy link
Member

frankrolf commented Sep 26, 2023

makeotf follows the AGL for assigning code points, potentially including this entry:
https://github.com/adobe-type-tools/agl-aglfn/blob/master/glyphlist.txt#L1637-L1640

Two ways to get around this:

  • change the final name (left column)
  • assign a codepoint override (3rd column)

@frankrolf
Copy link
Member

@BoldMonday
Copy link
Author

BoldMonday commented Sep 27, 2023

Thanks for the example.

I wish there was a way to disable any of this automatic mapping when a GlyphOrderAndAliasDB file is supplied during compilation.

At least it would be helpful if makeotf would report automatic mapping during compilation. Now we suddenly ended up with a font containing PUA unicodes where we had no idea where they came from. And subsequently a faulty font because the OS/2 unicode ranges did not have a flag for the PUA range.

@frankrolf
Copy link
Member

frankrolf commented Sep 27, 2023

I think this might be a “careful what you wish for” kind of situation – the AGD mapping is also the reason for glyph names like Aacute to receive the correct code point.

Of course, it’s odd that the AGD would map to PUA, not sure what the reason for that originally was.

I made a little script for you to verify which glyphs go through the AGD:

from afdko import agd, fdkutils
from pathlib import Path
f = CurrentFont()
agd_txt = Path(fdkutils.get_resources_dir()) / 'AGD.txt'

with open(agd_txt, "r") as agd_blob:
    agd_data = agd_blob.read()

agd_dict = agd.dictionary(agd_data)  # this is called dictionary but doesn’t seem to be a proper dict object :-/

for gname in f.templateGlyphOrder:
    agd_glyph = agd_dict.glyphs.get(gname)
    if agd_glyph:
        print(agd_glyph.uni, gname)
    else:
        print('not in AGD', gname)

in a UFO containing .notdef space a b c dieresisacute paulsdieresisacute, I get

None .notdef
0020 space
0061 a
0062 b
0063 c
F6D7 dieresisacute
not in AGD paulsdieresisacute

@BoldMonday
Copy link
Author

In our workflow we always create our own GlyphOrderAndAliasDB files based on the actual mapping in the source files themselves. Therefore glyphs such as Aacute will always be mapped correctly without the help of any automatic mapping done by the FDK.

@frankrolf
Copy link
Member

I am not sure what this comment implies. What does your GlyphOrderAndAliasDB look like?

@BoldMonday
Copy link
Author

BoldMonday commented Sep 28, 2023

What I meant is that each font gets its own GlyphOrderAndAliasDB file which is dynamically generated when exporting FDK files. The content of that file is based on the name and unicode mapping in the source file (which can be a FontLab or UFO file). Below is the one from IBM Plex Sans Bold, for example.

.notdef	.notdef
a	a	u0061
a.alt01	a.alt01
b	b	u0062
c	c	u0063
d	d	u0064
e	e	u0065
f	f	u0066
g	g	u0067
g.alt01	g.alt01
g.alt02	g.alt02
h	h	u0068
i	i	u0069
j	j	u006A
k	k	u006B
l	l	u006C
m	m	u006D
n	n	u006E
o	o	u006F
p	p	u0070
q	q	u0071
r	r	u0072
s	s	u0073
t	t	u0074
u	u	u0075
v	v	u0076
w	w	u0077
x	x	u0078
y	y	u0079
z	z	u007A
A	A	u0041
B	B	u0042
C	C	u0043
D	D	u0044
E	E	u0045
F	F	u0046
G	G	u0047
H	H	u0048
I	I	u0049
J	J	u004A
K	K	u004B
L	L	u004C
M	M	u004D
N	N	u004E
O	O	u004F
P	P	u0050
Q	Q	u0051
R	R	u0052
S	S	u0053
T	T	u0054
U	U	u0055
V	V	u0056
W	W	u0057
X	X	u0058
Y	Y	u0059
Z	Z	u005A
zero	zero	u0030
zero.alt01	zero.alt01
zero.alt02	zero.alt02
one	one	u0031
two	two	u0032
three	three	u0033
four	four	u0034
five	five	u0035
six	six	u0036
seven	seven	u0037
eight	eight	u0038
nine	nine	u0039
ampersand	ampersand	u0026
at	at	u0040
hyphen	hyphen	u002D
uni00AD	softhyphen	u00AD
endash	endash	u2013
emdash	emdash	u2014
underscore	underscore	u005F
period	period	u002E
ellipsis	ellipsis	u2026
colon	colon	u003A
comma	comma	u002C
semicolon	semicolon	u003B
uni037E	questiongreek	u037E
quotesingle	quotesingle	u0027
quotedbl	quotedbl	u0022
quoteleft	quoteleft	u2018
quoteright	quoteright	u2019
quotedblleft	quotedblleft	u201C
quotedblright	quotedblright	u201D
quotesinglbase	quotesinglbase	u201A
quotedblbase	quotedblbase	u201E
guilsinglleft	guilsinglleft	u2039
guilsinglright	guilsinglright	u203A
guillemotleft	guillemotleft	u00AB
guillemotright	guillemotright	u00BB
exclamdown	exclamdown	u00A1
exclam	exclam	u0021
questiondown	questiondown	u00BF
question	question	u003F
parenleft	parenleft	u0028
parenright	parenright	u0029
bracketleft	bracketleft	u005B
bracketright	bracketright	u005D
braceleft	braceleft	u007B
braceright	braceright	u007D
slash	slash	u002F
backslash	backslash	u005C
fraction	fraction	u2044
uni2215	divisionslash	u2215
percent	percent	u0025
perthousand	perthousand	u2030
bar	bar	u007C
brokenbar	brokenbar	u00A6
section	section	u00A7
paragraph	paragraph	u00B6
copyright	copyright	u00A9
registered	registered	u00AE
trademark	trademark	u2122
ordfeminine	ordfeminine	u00AA
ordmasculine	ordmasculine	u00BA
degree	degree	u00B0
uni2032	prime	u2032
uni2033	primedbl	u2033
asterisk	asterisk	u002A
dagger	dagger	u2020
daggerdbl	daggerdbl	u2021
numbersign	numbersign	u0023
asciicircum	asciicircum	u005E
asciitilde	asciitilde	u007E
plus	plus	u002B
minus	minus	u2212
plusminus	plusminus	u00B1
multiply	multiply	u00D7
divide	divide	u00F7
equal	equal	u003D
approxequal	approxequal	u2248
notequal	notequal	u2260
less	less	u003C
greater	greater	u003E
lessequal	lessequal	u2264
greaterequal	greaterequal	u2265
periodcentered	periodcentered	u00B7
anoteleia	anoteleia	u0387
bullet	bullet	u2022
lozenge	lozenge	u25CA
logicalnot	logicalnot	u00AC
radical	radical	u221A
integral	integral	u222B
infinity	infinity	u221E
uni212E	estimated	u212E
uni2113	litre	u2113
uni2116	numerosign	u2116
partialdiff	partialdiff	u2202
currency	currency	u00A4
cent	cent	u00A2
Euro	Euro	u20AC
florin	florin	u0192
sterling	sterling	u00A3
dollar	dollar	u0024
yen	yen	u00A5
uni0E3F	baht	u0E3F
uni20A1	coloncurrency	u20A1
uni20A4	lira	u20A4
uni20A6	naira	u20A6
uni20A8	rupee	u20A8
uni20A9	won	u20A9
uni20AA	sheqel	u20AA
uni20AB	dong	u20AB
uni20AD	kip	u20AD
uni20AE	tugrik	u20AE
uni20B1	peso	u20B1
uni20B2	guarani	u20B2
uni20B4	hryvnia	u20B4
uni20B5	cedi	u20B5
uni20B8	tenge	u20B8
uni20B9	rupeeindian	u20B9
uni20BA	liraturkish	u20BA
uni20BD	ruble	u20BD
uni20BF	bitcoin	u20BF
fi	fi	uFB01
fl	fl	uFB02
aacute	aacute	u00E1
abreve	abreve	u0103
uni01CE	acaron	u01CE
acircumflex	acircumflex	u00E2
adieresis	adieresis	u00E4
uni1EA1	adotbelow	u1EA1
agrave	agrave	u00E0
uni1EA3	ahook	u1EA3
amacron	amacron	u0101
aogonek	aogonek	u0105
aring	aring	u00E5
aringacute	aringacute	u01FB
atilde	atilde	u00E3
uni1EAF	abreveacute	u1EAF
uni1EB7	abrevedotbelow	u1EB7
uni1EB1	abrevegrave	u1EB1
uni1EB3	abrevehook	u1EB3
uni1EB5	abrevetilde	u1EB5
uni1EA5	acircumflexacute	u1EA5
uni1EAD	acircumflexdotbelow	u1EAD
uni1EA7	acircumflexgrave	u1EA7
uni1EA9	acircumflexhook	u1EA9
uni1EAB	acircumflextilde	u1EAB
aacute.alt01	aacute.alt01
abreve.alt01	abreve.alt01
uni01CE.alt01	acaron.alt01
acircumflex.alt01	acircumflex.alt01
adieresis.alt01	adieresis.alt01
uni1EA1.alt01	adotbelow.alt01
agrave.alt01	agrave.alt01
uni1EA3.alt01	ahook.alt01
amacron.alt01	amacron.alt01
aogonek.alt01	aogonek.alt01
aring.alt01	aring.alt01
aringacute.alt01	aringacute.alt01
atilde.alt01	atilde.alt01
uni1EAF.alt01	abreveacute.alt01
uni1EB7.alt01	abrevedotbelow.alt01
uni1EB1.alt01	abrevegrave.alt01
uni1EB3.alt01	abrevehook.alt01
uni1EB5.alt01	abrevetilde.alt01
uni1EA5.alt01	acircumflexacute.alt01
uni1EAD.alt01	acircumflexdotbelow.alt01
uni1EA7.alt01	acircumflexgrave.alt01
uni1EA9.alt01	acircumflexhook.alt01
uni1EAB.alt01	acircumflextilde.alt01
ae	ae	u00E6
aeacute	aeacute	u01FD
cacute	cacute	u0107
ccaron	ccaron	u010D
ccedilla	ccedilla	u00E7
ccircumflex	ccircumflex	u0109
cdotaccent	cdotaccent	u010B
dcaron	dcaron	u010F
dcroat	dcroat	u0111
eth	eth	u00F0
eacute	eacute	u00E9
ebreve	ebreve	u0115
ecaron	ecaron	u011B
ecircumflex	ecircumflex	u00EA
edieresis	edieresis	u00EB
edotaccent	edotaccent	u0117
uni1EB9	edotbelow	u1EB9
egrave	egrave	u00E8
uni1EBB	ehook	u1EBB
emacron	emacron	u0113
eogonek	eogonek	u0119
uni1EBD	etilde	u1EBD
uni1EBF	ecircumflexacute	u1EBF
uni1EC7	ecircumflexdotbelow	u1EC7
uni1EC1	ecircumflexgrave	u1EC1
uni1EC3	ecircumflexhook	u1EC3
uni1EC5	ecircumflextilde	u1EC5
uni0259	schwa	u0259
gbreve	gbreve	u011F
gcircumflex	gcircumflex	u011D
gcommaaccent	gcommaaccent	u0123
gdotaccent	gdotaccent	u0121
gbreve.alt01	gbreve.alt01
gcircumflex.alt01	gcircumflex.alt01
gcommaaccent.alt01	gcommaaccent.alt01
gdotaccent.alt01	gdotaccent.alt01
hbar	hbar	u0127
hcircumflex	hcircumflex	u0125
dotlessi	dotlessi	u0131
iacute	iacute	u00ED
ibreve	ibreve	u012D
uni01D0	icaron	u01D0
icircumflex	icircumflex	u00EE
idieresis	idieresis	u00EF
uni1ECB	idotbelow	u1ECB
igrave	igrave	u00EC
uni1EC9	ihook	u1EC9
imacron	imacron	u012B
iogonek	iogonek	u012F
itilde	itilde	u0129
ij	ij	u0133
ijacute	ijacute
uni0237	dotlessj	u0237
jacute	jacute
jcircumflex	jcircumflex	u0135
kcommaaccent	kcommaaccent	u0137
kgreenlandic	kgreenlandic	u0138
lacute	lacute	u013A
lcaron	lcaron	u013E
lcommaaccent	lcommaaccent	u013C
ldot	ldot	u0140
lslash	lslash	u0142
nacute	nacute	u0144
ncaron	ncaron	u0148
ncommaaccent	ncommaaccent	u0146
ntilde	ntilde	u00F1
napostrophe	napostrophe	u0149
eng	eng	u014B
oacute	oacute	u00F3
obreve	obreve	u014F
uni01D2	ocaron	u01D2
ocircumflex	ocircumflex	u00F4
odieresis	odieresis	u00F6
uni1ECD	odotbelow	u1ECD
ograve	ograve	u00F2
uni1ECF	ohook	u1ECF
ohungarumlaut	ohungarumlaut	u0151
omacron	omacron	u014D
oslash	oslash	u00F8
oslashacute	oslashacute	u01FF
otilde	otilde	u00F5
ohorn	ohorn	u01A1
uni1EDB	ohornacute	u1EDB
uni1EE3	ohorndotbelow	u1EE3
uni1EDD	ohorngrave	u1EDD
uni1EDF	ohornhook	u1EDF
uni1EE1	ohorntilde	u1EE1
uni1ED1	ocircumflexacute	u1ED1
uni1ED9	ocircumflexdotbelow	u1ED9
uni1ED3	ocircumflexgrave	u1ED3
uni1ED5	ocircumflexhook	u1ED5
uni1ED7	ocircumflextilde	u1ED7
oe	oe	u0153
racute	racute	u0155
rcaron	rcaron	u0159
rcommaaccent	rcommaaccent	u0157
sacute	sacute	u015B
scaron	scaron	u0161
scedilla	scedilla	u015F
scircumflex	scircumflex	u015D
scommaaccent	scommaaccent	u0219
uni017F	longs	u017F
germandbls	germandbls	u00DF
germandbls.alt01	germandbls.alt01
tbar	tbar	u0167
tcaron	tcaron	u0165
uni021B	tcommaaccent	u021B
uni0163	tcedilla	u0163
thorn	thorn	u00FE
uacute	uacute	u00FA
ubreve	ubreve	u016D
uni01D4	ucaron	u01D4
ucircumflex	ucircumflex	u00FB
udieresis	udieresis	u00FC
uni1EE5	udotbelow	u1EE5
ugrave	ugrave	u00F9
uni1EE7	uhook	u1EE7
uhungarumlaut	uhungarumlaut	u0171
umacron	umacron	u016B
uogonek	uogonek	u0173
uring	uring	u016F
utilde	utilde	u0169
uhorn	uhorn	u01B0
uni1EE9	uhornacute	u1EE9
uni1EF1	uhorndotbelow	u1EF1
uni1EEB	uhorngrave	u1EEB
uni1EED	uhornhook	u1EED
uni1EEF	uhorntilde	u1EEF
uni01D6	udieresismacron	u01D6
uni01D8	udieresisacute	u01D8
uni01DC	udieresisgrave	u01DC
uni01DA	udieresiscaron	u01DA
wacute	wacute	u1E83
wcircumflex	wcircumflex	u0175
wdieresis	wdieresis	u1E85
wgrave	wgrave	u1E81
yacute	yacute	u00FD
ycircumflex	ycircumflex	u0177
ydieresis	ydieresis	u00FF
uni1EF5	ydotbelow	u1EF5
ygrave	ygrave	u1EF3
uni1EF7	yhook	u1EF7
uni1EF9	ytilde	u1EF9
zacute	zacute	u017A
zcaron	zcaron	u017E
zdotaccent	zdotaccent	u017C
Aacute	Aacute	u00C1
Abreve	Abreve	u0102
uni01CD	Acaron	u01CD
Acircumflex	Acircumflex	u00C2
Adieresis	Adieresis	u00C4
uni1EA0	Adotbelow	u1EA0
Agrave	Agrave	u00C0
uni1EA2	Ahook	u1EA2
Amacron	Amacron	u0100
Aogonek	Aogonek	u0104
Aring	Aring	u00C5
Aringacute	Aringacute	u01FA
Atilde	Atilde	u00C3
uni1EAE	Abreveacute	u1EAE
uni1EB6	Abrevedotbelow	u1EB6
uni1EB0	Abrevegrave	u1EB0
uni1EB2	Abrevehook	u1EB2
uni1EB4	Abrevetilde	u1EB4
uni1EA4	Acircumflexacute	u1EA4
uni1EAC	Acircumflexdotbelow	u1EAC
uni1EA6	Acircumflexgrave	u1EA6
uni1EA8	Acircumflexhook	u1EA8
uni1EAA	Acircumflextilde	u1EAA
AE	AE	u00C6
AEacute	AEacute	u01FC
Cacute	Cacute	u0106
Ccaron	Ccaron	u010C
Ccedilla	Ccedilla	u00C7
Ccircumflex	Ccircumflex	u0108
Cdotaccent	Cdotaccent	u010A
Dcaron	Dcaron	u010E
Dcroat	Dcroat	u0110
Eth	Eth	u00D0
Eacute	Eacute	u00C9
Ebreve	Ebreve	u0114
Ecaron	Ecaron	u011A
Ecircumflex	Ecircumflex	u00CA
Edieresis	Edieresis	u00CB
Edotaccent	Edotaccent	u0116
uni1EB8	Edotbelow	u1EB8
Egrave	Egrave	u00C8
uni1EBA	Ehook	u1EBA
Emacron	Emacron	u0112
Eogonek	Eogonek	u0118
uni1EBC	Etilde	u1EBC
uni1EBE	Ecircumflexacute	u1EBE
uni1EC6	Ecircumflexdotbelow	u1EC6
uni1EC0	Ecircumflexgrave	u1EC0
uni1EC2	Ecircumflexhook	u1EC2
uni1EC4	Ecircumflextilde	u1EC4
uni018F	Schwa	u018F
Gbreve	Gbreve	u011E
Gcircumflex	Gcircumflex	u011C
Gcommaaccent	Gcommaaccent	u0122
Gdotaccent	Gdotaccent	u0120
Hbar	Hbar	u0126
Hcircumflex	Hcircumflex	u0124
Iacute	Iacute	u00CD
Ibreve	Ibreve	u012C
uni01CF	Icaron	u01CF
Icircumflex	Icircumflex	u00CE
Idieresis	Idieresis	u00CF
Idotaccent	Idotaccent	u0130
uni1ECA	Idotbelow	u1ECA
Igrave	Igrave	u00CC
uni1EC8	Ihook	u1EC8
Imacron	Imacron	u012A
Iogonek	Iogonek	u012E
Itilde	Itilde	u0128
IJ	IJ	u0132
IJacute	IJacute
Jacute	Jacute
Jcircumflex	Jcircumflex	u0134
Kcommaaccent	Kcommaaccent	u0136
Lacute	Lacute	u0139
Lcaron	Lcaron	u013D
Lcommaaccent	Lcommaaccent	u013B
Ldot	Ldot	u013F
Lslash	Lslash	u0141
Nacute	Nacute	u0143
Ncaron	Ncaron	u0147
Ncommaaccent	Ncommaaccent	u0145
Ntilde	Ntilde	u00D1
Eng	Eng	u014A
Oacute	Oacute	u00D3
Obreve	Obreve	u014E
uni01D1	Ocaron	u01D1
Ocircumflex	Ocircumflex	u00D4
Odieresis	Odieresis	u00D6
uni1ECC	Odotbelow	u1ECC
Ograve	Ograve	u00D2
uni1ECE	Ohook	u1ECE
Ohungarumlaut	Ohungarumlaut	u0150
Omacron	Omacron	u014C
Oslash	Oslash	u00D8
Oslashacute	Oslashacute	u01FE
Otilde	Otilde	u00D5
Ohorn	Ohorn	u01A0
uni1EDA	Ohornacute	u1EDA
uni1EE2	Ohorndotbelow	u1EE2
uni1EDC	Ohorngrave	u1EDC
uni1EDE	Ohornhook	u1EDE
uni1EE0	Ohorntilde	u1EE0
uni1ED0	Ocircumflexacute	u1ED0
uni1ED8	Ocircumflexdotbelow	u1ED8
uni1ED2	Ocircumflexgrave	u1ED2
uni1ED4	Ocircumflexhook	u1ED4
uni1ED6	Ocircumflextilde	u1ED6
OE	OE	u0152
Racute	Racute	u0154
Rcaron	Rcaron	u0158
Rcommaaccent	Rcommaaccent	u0156
Sacute	Sacute	u015A
Scaron	Scaron	u0160
Scedilla	Scedilla	u015E
Scircumflex	Scircumflex	u015C
Scommaaccent	Scommaaccent	u0218
uni1E9E	Germandbls	u1E9E
Tbar	Tbar	u0166
Tcaron	Tcaron	u0164
uni021A	Tcommaaccent	u021A
uni0162	Tcedilla	u0162
Thorn	Thorn	u00DE
Uacute	Uacute	u00DA
Ubreve	Ubreve	u016C
uni01D3	Ucaron	u01D3
Ucircumflex	Ucircumflex	u00DB
Udieresis	Udieresis	u00DC
uni1EE4	Udotbelow	u1EE4
Ugrave	Ugrave	u00D9
uni1EE6	Uhook	u1EE6
Uhungarumlaut	Uhungarumlaut	u0170
Umacron	Umacron	u016A
Uogonek	Uogonek	u0172
Uring	Uring	u016E
Utilde	Utilde	u0168
Uhorn	Uhorn	u01AF
uni1EE8	Uhornacute	u1EE8
uni1EF0	Uhorndotbelow	u1EF0
uni1EEA	Uhorngrave	u1EEA
uni1EEC	Uhornhook	u1EEC
uni1EEE	Uhorntilde	u1EEE
uni01D5	Udieresismacron	u01D5
uni01D7	Udieresisacute	u01D7
uni01DB	Udieresisgrave	u01DB
uni01D9	Udieresiscaron	u01D9
Wacute	Wacute	u1E82
Wcircumflex	Wcircumflex	u0174
Wdieresis	Wdieresis	u1E84
Wgrave	Wgrave	u1E80
Yacute	Yacute	u00DD
Ycircumflex	Ycircumflex	u0176
uni1EF4	Ydotbelow	u1EF4
Ydieresis	Ydieresis	u0178
Ygrave	Ygrave	u1EF2
uni1EF6	Yhook	u1EF6
uni1EF8	Ytilde	u1EF8
Zacute	Zacute	u0179
Zcaron	Zcaron	u017D
Zdotaccent	Zdotaccent	u017B
mu	mu	u00B5
Delta	Delta	u2206
product	product	u220F
summation	summation	u2211
Omega	Omega	u2126
alpha	alpha	u03B1
alpha.alt01	alpha.alt01
beta	beta	u03B2
gamma	gamma	u03B3
delta	delta	u03B4
epsilon	epsilon	u03B5
zeta	zeta	u03B6
eta	eta	u03B7
theta	theta	u03B8
iota	iota	u03B9
kappa	kappa	u03BA
lambda	lambda	u03BB
uni03BC	uni03BC	u03BC
nu	nu	u03BD
xi	xi	u03BE
omicron	omicron	u03BF
pi	pi	u03C0
rho	rho	u03C1
sigma1	sigma1	u03C2
sigma	sigma	u03C3
tau	tau	u03C4
upsilon	upsilon	u03C5
phi	phi	u03C6
chi	chi	u03C7
psi	psi	u03C8
omega	omega	u03C9
Alpha	Alpha	u0391
Beta	Beta	u0392
Gamma	Gamma	u0393
uni0394	uni0394	u0394
Epsilon	Epsilon	u0395
Zeta	Zeta	u0396
Eta	Eta	u0397
Theta	Theta	u0398
Iota	Iota	u0399
Kappa	Kappa	u039A
Lambda	Lambda	u039B
Mu	Mu	u039C
Nu	Nu	u039D
Xi	Xi	u039E
Omicron	Omicron	u039F
Pi	Pi	u03A0
Rho	Rho	u03A1
Sigma	Sigma	u03A3
Tau	Tau	u03A4
Upsilon	Upsilon	u03A5
Phi	Phi	u03A6
Chi	Chi	u03A7
Psi	Psi	u03A8
uni03A9	uni03A9	u03A9
alphatonos	alphatonos	u03AC
alphatonos.alt01	alphatonos.alt01
epsilontonos	epsilontonos	u03AD
etatonos	etatonos	u03AE
iotatonos	iotatonos	u03AF
iotadieresis	iotadieresis	u03CA
iotadieresistonos	iotadieresistonos	u0390
omicrontonos	omicrontonos	u03CC
upsilontonos	upsilontonos	u03CD
upsilondieresis	upsilondieresis	u03CB
upsilondieresistonos	upsilondieresistonos	u03B0
omegatonos	omegatonos	u03CE
Alphatonos	Alphatonos	u0386
Epsilontonos	Epsilontonos	u0388
Etatonos	Etatonos	u0389
Iotatonos	Iotatonos	u038A
Iotadieresis	Iotadieresis	u03AA
Omicrontonos	Omicrontonos	u038C
Upsilontonos	Upsilontonos	u038E
Upsilondieresis	Upsilondieresis	u03AB
Omegatonos	Omegatonos	u038F
uni0430	uni0430	u0430
uni0430.alt01	uni0430.alt01
uni0431	uni0431	u0431
uni0432	uni0432	u0432
uni0433	uni0433	u0433
uni0434	uni0434	u0434
uni0435	uni0435	u0435
uni0436	uni0436	u0436
uni0437	uni0437	u0437
uni0438	uni0438	u0438
uni0439	uni0439	u0439
uni043A	uni043A	u043A
uni043B	uni043B	u043B
uni043C	uni043C	u043C
uni043D	uni043D	u043D
uni043E	uni043E	u043E
uni043F	uni043F	u043F
uni0440	uni0440	u0440
uni0441	uni0441	u0441
uni0442	uni0442	u0442
uni0443	uni0443	u0443
uni0444	uni0444	u0444
uni0445	uni0445	u0445
uni0446	uni0446	u0446
uni0447	uni0447	u0447
uni0448	uni0448	u0448
uni0449	uni0449	u0449
uni044A	uni044A	u044A
uni044B	uni044B	u044B
uni044C	uni044C	u044C
uni044D	uni044D	u044D
uni044E	uni044E	u044E
uni044F	uni044F	u044F
uni0410	uni0410	u0410
uni0411	uni0411	u0411
uni0412	uni0412	u0412
uni0413	uni0413	u0413
uni0414	uni0414	u0414
uni0415	uni0415	u0415
uni0416	uni0416	u0416
uni0417	uni0417	u0417
uni0418	uni0418	u0418
uni0419	uni0419	u0419
uni041A	uni041A	u041A
uni041B	uni041B	u041B
uni041C	uni041C	u041C
uni041D	uni041D	u041D
uni041E	uni041E	u041E
uni041F	uni041F	u041F
uni0420	uni0420	u0420
uni0421	uni0421	u0421
uni0422	uni0422	u0422
uni0423	uni0423	u0423
uni0424	uni0424	u0424
uni0425	uni0425	u0425
uni0426	uni0426	u0426
uni0427	uni0427	u0427
uni0428	uni0428	u0428
uni0429	uni0429	u0429
uni042A	uni042A	u042A
uni042B	uni042B	u042B
uni042C	uni042C	u042C
uni042D	uni042D	u042D
uni042E	uni042E	u042E
uni042F	uni042F	u042F
uni04D3	uni04D3	u04D3
uni04D1	uni04D1	u04D1
uni04D3.alt01	uni04D3.alt01
uni04D1.alt01	uni04D1.alt01
uni04D5	uni04D5	u04D5
uni0453	uni0453	u0453
uni0491	uni0491	u0491
uni0493	uni0493	u0493
uni0495	uni0495	u0495
uni0450	uni0450	u0450
uni0451	uni0451	u0451
uni04D7	uni04D7	u04D7
uni0454	uni0454	u0454
uni04DD	uni04DD	u04DD
uni04C2	uni04C2	u04C2
uni0497	uni0497	u0497
uni04DF	uni04DF	u04DF
uni0499	uni0499	u0499
uni04CF	uni04CF	u04CF
uni04E5	uni04E5	u04E5
uni045D	uni045D	u045D
uni04E3	uni04E3	u04E3
uni045C	uni045C	u045C
uni049B	uni049B	u049B
uni049D	uni049D	u049D
uni04A1	uni04A1	u04A1
uni0459	uni0459	u0459
uni04A3	uni04A3	u04A3
uni045A	uni045A	u045A
uni04A5	uni04A5	u04A5
uni04E7	uni04E7	u04E7
uni0473	uni0473	u0473
uni04E9	uni04E9	u04E9
uni04AB	uni04AB	u04AB
uni04EF	uni04EF	u04EF
uni04F1	uni04F1	u04F1
uni04F3	uni04F3	u04F3
uni045E	uni045E	u045E
uni04AF	uni04AF	u04AF
uni04B1	uni04B1	u04B1
uni04B3	uni04B3	u04B3
uni04F5	uni04F5	u04F5
uni04B7	uni04B7	u04B7
uni04B9	uni04B9	u04B9
uni04F9	uni04F9	u04F9
uni0455	uni0455	u0455
uni045F	uni045F	u045F
uni0456	uni0456	u0456
uni0457	uni0457	u0457
uni0458	uni0458	u0458
uni0452	uni0452	u0452
uni045B	uni045B	u045B
uni04BB	uni04BB	u04BB
uni04D9	uni04D9	u04D9
uni04D2	uni04D2	u04D2
uni04D0	uni04D0	u04D0
uni04D4	uni04D4	u04D4
uni0403	uni0403	u0403
uni0490	uni0490	u0490
uni0492	uni0492	u0492
uni0494	uni0494	u0494
uni0400	uni0400	u0400
uni0401	uni0401	u0401
uni04D6	uni04D6	u04D6
uni0404	uni0404	u0404
uni04DC	uni04DC	u04DC
uni04C1	uni04C1	u04C1
uni0496	uni0496	u0496
uni04DE	uni04DE	u04DE
uni0498	uni0498	u0498
uni04C0	uni04C0	u04C0
uni04E4	uni04E4	u04E4
uni040D	uni040D	u040D
uni04E2	uni04E2	u04E2
uni040C	uni040C	u040C
uni049A	uni049A	u049A
uni049C	uni049C	u049C
uni04A0	uni04A0	u04A0
uni0409	uni0409	u0409
uni04A2	uni04A2	u04A2
uni040A	uni040A	u040A
uni04A4	uni04A4	u04A4
uni04E6	uni04E6	u04E6
uni0472	uni0472	u0472
uni04E8	uni04E8	u04E8
uni04AA	uni04AA	u04AA
uni04EE	uni04EE	u04EE
uni04F0	uni04F0	u04F0
uni04F2	uni04F2	u04F2
uni040E	uni040E	u040E
uni04AE	uni04AE	u04AE
uni04B0	uni04B0	u04B0
uni04B2	uni04B2	u04B2
uni04F4	uni04F4	u04F4
uni04B6	uni04B6	u04B6
uni04B8	uni04B8	u04B8
uni04F8	uni04F8	u04F8
uni0405	uni0405	u0405
uni040F	uni040F	u040F
uni0406	uni0406	u0406
uni0407	uni0407	u0407
uni0408	uni0408	u0408
uni0402	uni0402	u0402
uni040B	uni040B	u040B
uni04BA	uni04BA	u04BA
uni04D8	uni04D8	u04D8
uni2070	zerosuperior	u2070
onesuperior	onesuperior	u00B9
twosuperior	twosuperior	u00B2
threesuperior	threesuperior	u00B3
uni2074	foursuperior	u2074
uni2075	fivesuperior	u2075
uni2076	sixsuperior	u2076
uni2077	sevensuperior	u2077
uni2078	eightsuperior	u2078
uni2079	ninesuperior	u2079
uni2080	zeroinferior	u2080
uni2081	oneinferior	u2081
uni2082	twoinferior	u2082
uni2083	threeinferior	u2083
uni2084	fourinferior	u2084
uni2085	fiveinferior	u2085
uni2086	sixinferior	u2086
uni2087	seveninferior	u2087
uni2088	eightinferior	u2088
uni2089	nineinferior	u2089
onehalf	onehalf	u00BD
uni2153	uni2153	u2153
uni2154	uni2154	u2154
onequarter	onequarter	u00BC
threequarters	threequarters	u00BE
uni2155	uni2155	u2155
uni2156	uni2156	u2156
uni2157	uni2157	u2157
uni2158	uni2158	u2158
uni2159	uni2159	u2159
uni215A	uni215A	u215A
uni2150	uni2150	u2150
uni215B	uni215B	u215B
uni215C	uni215C	u215C
uni215D	uni215D	u215D
uni215E	uni215E	u215E
uni2151	uni2151	u2151
uni2713	checkmark	u2713
uni274C	crossmark	u274C
uni2190	arrowleft	u2190
uni2191	arrowup	u2191
uni2193	arrowdown	u2193
uni2192	arrowright	u2192
uni2196	arrowupleft	u2196
uni2197	arrowupright	u2197
uni2199	arrowdownleft	u2199
uni2198	arrowdownright	u2198
uni21B0	arrowupleftcorner	u21B0
uni21B2	arrowdownleftcorner	u21B2
uni2B11	arrowleftupcorner	u2B11
uni2B0F	arrowrightupcorner	u2B0F
uni2B10	arrowleftdowncorner	u2B10
uni2B0E	arrowrightdowncorner	u2B0E
uni21B1	arrowuprightcorner	u21B1
uni21B3	arrowdownrightcorner	u21B3
uni21C6	arrowleftarrowright	u21C6
uni21C4	arrowrightarrowleft	u21C4
uni2194	arrowleftright	u2194
uni2195	arrowupdown	u2195
uni21B6	arrowdowncounterclockhalf	u21B6
uni21B7	arrowdownclockhalf	u21B7
uni21A9	arrowhookleft	u21A9
uni21AA	arrowhookright	u21AA
uni21BA	arrowupleftcounterclock	u21BA
uni21BB	arrowuprightclock	u21BB
tilde	tilde	u02DC
tilde.alt01	tilde.alt01
macron	macron	u00AF
dotaccent	dotaccent	u02D9
dieresis	dieresis	u00A8
hungarumlaut	hungarumlaut	u02DD
acute	acute	u00B4
grave	grave	u0060
circumflex	circumflex	u02C6
caron	caron	u02C7
breve	breve	u02D8
breve.cyrl	breve.cyrl
ring	ring	u02DA
ringacute	ringacute
uni02BB	commaturnedtop	u02BB
uni02BC	caronslovak	u02BC
cedilla	cedilla	u00B8
ogonek	ogonek	u02DB
tonos	tonos	u0384
dieresistonos	dieresistonos	u0385
uni0303	tildecomb	u0303
uni0304	macroncomb	u0304
uni0307	dotaccentcomb	u0307
uni0308	dieresiscomb	u0308
uni030B	hungarumlautcomb	u030B
uni0301	acutecomb	u0301
uni0300	gravecomb	u0300
uni0302	circumflexcomb	u0302
uni030C	caroncomb	u030C
uni0306	brevecomb	u0306
uni030A	ringcomb	u030A
uni0309	hookcomb	u0309
uni0312	commaturnedtopcomb	u0312
uni0315	caronslovakcomb	u0315
uni031B	horncomb	u031B
uni0327	cedillacomb	u0327
uni0323	dotbelowcomb	u0323
uni0326	commabelowcomb	u0326
uni0328	ogonekcomb	u0328
breveacute	breveacute
brevegrave	brevegrave
brevehook	brevehook
brevetilde	brevetilde
dieresisacute	dieresisacute
dieresiscaron	dieresiscaron
dieresisgrave	dieresisgrave
circumflexacute	circumflexacute
circumflexbreve	circumflexbreve
circumflexgrave	circumflexgrave
circumflexhook	circumflexhook
dieresismacron	dieresismacron
circumflextilde	circumflextilde
tilde.case	tilde.case
tilde.alt01.case	tilde.alt01.case
macron.case	macron.case
dotaccent.case	dotaccent.case
dieresis.case	dieresis.case
hungarumlaut.case	hungarumlaut.case
acute.case	acute.case
grave.case	grave.case
circumflex.case	circumflex.case
caron.case	caron.case
breve.case	breve.case
breve.cyrl_case	breve.cyrl_case
ring.case	ring.case
ringacute.case	ringacute.case
tonos.case	tonos.case
uni0309.case	hookcomb.case
breveacute.case	breveacute.case
brevegrave.case	brevegrave.case
brevehook.case	brevehook.case
brevetilde.case	brevetilde.case
dieresisacute.case	dieresisacute.case
dieresiscaron.case	dieresiscaron.case
dieresisgrave.case	dieresisgrave.case
circumflexacute.case	circumflexacute.case
circumflexbreve.case	circumflexbreve.case
circumflexgrave.case	circumflexgrave.case
circumflexhook.case	circumflexhook.case
dieresismacron.case	dieresismacron.case
circumflextilde.case	circumflextilde.case
space	space	u0020
uni00A0	nbspace	u00A0
uniEFCC	fcclogo	uEFCC
uniECE0	celogo	uECE0

@frankrolf
Copy link
Member

Thank you for the example, I get it now. You probably are aware of all the following, but I’ll do a run-down for everyone else reading this issue:

How does the GlyphOrderAndAliasDB work?

The GlyphOrderAndAliasDB is basically a spreadsheet. Each entry can have up to three columns, with the 3rd being optional. The column order is as follows:

final name friendly name Unicode override

final name

This is the name which ends up in the font file. This name used to carry meaning (especially in pre-Unicode times), but modern software should really not rely on glyph names for text layout. Therefore, the importance of this name within the font file is low.

However, makeotfexe will interpret this name to assign a code point to a glyph.

  • if the name is something like A or Aacute, an expected code point will be assigned (because history). This code point is not based on data in the AGL repo (as suggested above) or the FDK’s own AGD resource file, as assumed later – it comes from a C header file which is “baked” into makeotfexe and tx upon compilation.
  • if the name is uniXXXX or uXXXX, that code point will be assigned to the glyph
  • if the name is something else, no code point will be assigned

“friendly” or human-readable name

This is the name we deal with in the font editor, in OT feature code, kerning, etc. Note that the characters which can be used here are relaxed in comparison to the final name (hyphens are allowed, for example).
It makes a big difference for dealing with alphabets like Cyrillic – no more looking at uni042F, or (even worse) afii10049, we can just call it cyr-Ya (or similar).

Unicode override

This optional column allows assigning a code point that’s different from the ones auto-assigned or implied by makeotfexe. Also, it allows assigning multiple code points to a single glyph.

example for assigning a different code point:

zero.sups	zero.sups	uni2070
one.sups	one.sups	uni00B9
two.sups	two.sups	uni00B2
three.sups	three.sups	uni00B3
four.sups	four.sups	uni2074
five.sups	five.sups	uni2075
six.sups	six.sups	uni2076
seven.sups	seven.sups	uni2077
eight.sups	eight.sups	uni2078
nine.sups	nine.sups	uni2079

The .sups suffix implies an alternate glyph, which makeotfexe won’t automatically assign a code point to. Since those superiors also exist in Unicode, it makes sense to add that override here.
The override itself can be uXXXX or uniXXXX. If a code point beyond the BMP is desired, it needs to be uXXXXX.

example for assigning multiple code points:

space	space	uni0020,uni00A0
hyphen	hyphen	uni002D,uni00AD,uni2010,uni2011

In this case, the space will act as normal and non-breaking space; the hyphen will be used (in addition to the default hyphen) for non-breaking hyphen, soft hyphen, and “hyphen-minus” as well. The benefit here is that there’s no possibility for advance widths going out of sync – also, the feature code is simplified.

example for assigning no code point:

dieresisacute	dieresisacute	None
dieresisacute	dieresisgrave	None

This is a feature I wasn’t aware of before embarking on this issue – and it is the answer to the question “Is there a way to disable any of this automatic mapping”


Analysis of supplied GlyphOrderAndAliasDB

With all the above in mind, here’s an unsolicited review of the supplied GlyphOrderAndAliasDB file:

a	a	u0061
b	b	u0062
c	c	u0063

This won’t hurt, but the same can be achieved via

u0061	a
u0062	b
u0063	c

or even

a	a
b	b
c	c

This …

uni0430	uni0430	u0430
uni0431	uni0431	u0431
uni0432	uni0432	u0432

… is equivalent to …

uni0430	uni0430
uni0431	uni0431
uni0432	uni0432

… and could be made more user-friendly by doing something like

uni0430	cyr-a
uni0431	cyr-be
uni0432	cyr-ve

This …

space	space	u0020
uni00A0	nbspace	u00A0

… could become that

space	space	u0020,u00A0

Conclusion

There’s no question that assigning an unexpected PUA code point is annoying. I will remove those from agl2uv.h, and a future AFDKO build should no longer do this.

frankrolf added a commit that referenced this issue Sep 29, 2023
Upon a rebuild of the FDK, this should probably address #1662.
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