48
backward compatibility of LM Math Breskens, The Netherlands, 11 October 2012

Is backward compatibility of LM Math and CM math … compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk Our goal was to prepare new versions of the well known

  • Upload
    ngotu

  • View
    223

  • Download
    1

Embed Size (px)

Citation preview

backward compatibility of LM Math

Breskens, The Netherlands, 11 October 2012

Isbackward compatibility of LM Math

and CM math sensible?

Piotr Strzelczyk

Breskens, The Netherlands, 11 October 2012

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Our goal was to prepare new versionsof the well known (and widely used) fonts:Computer Modern (by Donald E.Knuth).

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Our goal was to prepare new versionsof the well known (and widely used) fonts:Computer Modern (by Donald E.Knuth).

We wanted to achieve compatibilityof the new Latin Modern OTF math font

with the CM original fonts

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Our goal was to prepare new versionsof the well known (and widely used) fonts:Computer Modern (by Donald E.Knuth).

We wanted to achieve compatibilityof the new Latin Modern OTF math font

with the CM original fonts,at least we wanted to keep the widths

of METAFONT prototype.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .

some strange decisions by Knuth(not bugs of course :)

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1z0 2

z0 3

z0 4

z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11

z0 12

z0 13

z0 14 z0 15z0 16

z0 0z0 1

z0 2

z0 3z0 4

z0 5z0 6

z0 7

z0 8z0 9

z0 10z0 11

z0 12

z0 13

z0 14z0 15

z0 16

z0 17

z0 18z0 19

z0 20

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1z0 2

z0 3

z0 4

z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11

z0 12

z0 13

z0 14 z0 15z0 16

z0 0z0 1

z0 2

z0 3z0 4

z0 5z0 6

z0 7

z0 8z0 9

z0 10z0 11

z0 12

z0 13

z0 14z0 15

z0 16

z0 17

z0 18z0 19

z0 20

The character \times has the widthof plus + which makes

the sidebearings of × bigger.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1

z0 2

z0 3z0 4

z0 5

z0 6z0 7z0 8

z0 9

z0 10z0 11

z0 12z0 13

z1 0

z1 1

z1 2

∀ (\forall) has no sidebearings

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1

z0 2

z0 3z0 4

z0 5

z0 6z0 7z0 8

z0 9

z0 10z0 11

z0 12z0 13

z1 0

z1 1

z1 2

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8z0 9

z0 10

z0 11z0 12

∀ (\forall) has no sidebearingsbut ∨ and ∃ have normal margins.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1

z0 2

z0 3

z0 4

z0 5

z0 6

z0 7z0 8z0 9z0 10

z0 11

z0 12z0 13z0 14

z0 15

z0 16z0 17

z0 18

z0 19z0 20z0 21

z0 22

z0 23

z0 24z0 25

\star also has no sidebearings(and who needs such a big star?)

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Strange decisions

z0 0z0 1z0 2

z0 3

z0 4

z0 5

z0 6

z0 7 z0 8z0 9

z0 0

z0 1z0 2

z0 3z0 4

z0 5

z0 0

z0 1z0 2

z0 3z0 4

z0 5

z0 0

z0 1z0 2

z0 3z0 4

z0 5

Widths of the ceiling and floor characters isnon monotonic: \Bigg\lfloor is wider

than \left\lfloor [high formula].

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .

my favorite Unicode.“[. . .] for every character, [. . .]” – really?

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6z0 7

z0 8

z0 9z1 0

z1 1

z1 2

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6

z0 7z0 8

z0 9z1 0

z1 1

z1 2

In CMMI we have \triangleright,

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6z0 7

z0 8

z0 9z1 0

z1 1

z1 2

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6

z0 7z0 8

z0 9z1 0

z1 1

z1 2

In CMMI we have \triangleright,in unicode we have:

U+25B7 WHITE RIGHT-POINTING TRIANGLE

U+25B9 WHITE RIGHT-POINTING SMALL TRIANGLE

U+25BB WHITE RIGHT-POINTING POINTER

and analogous set of LEFT TRIANGLES

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6z0 7

z0 8

z0 9z1 0

z1 1

z1 2

z0 0

z0 1

z0 2z0 3

z0 4

z0 5

z0 6

z0 7z0 8

z0 9z1 0

z1 1

z1 2

In CMMI we have \triangleright,in unicode we have:

U+25B7 WHITE RIGHT-POINTING TRIANGLE

U+25B9 WHITE RIGHT-POINTING SMALL TRIANGLE

U+25BB WHITE RIGHT-POINTING POINTER

and analogous set of LEFT TRIANGLES

none of them is like the Knuth’s triangle!

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2

z0 3

z0 4

z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13

z0 14z0 15

z0 16

z0 17

z0 18

In CMSY we have \smallintegral

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2

z0 3

z0 4

z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13

z0 14z0 15

z0 16

z0 17

z0 18

In CMSY we have \smallintegralbut in Unicode there is no place for it

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

z0 0

z0 1

z0 2

z0 3

z0 4

z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13

z0 14z0 15

z0 16

z0 17

z0 18

In CMSY we have \smallintegralbut in Unicode there is no place for it

(may be 0283: LATIN SMALL LETTER ESH– we know that is really bad, but. . .)

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

In AMS fonts: \notpreceq

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Unicode problems

In AMS fonts: \notpreceq, butin unicode we have:

U+227A PRECEDES

U+2280 DOES NOT PRECEDE

U+227C PRECEDES OR EQUAL TO

U+22E0 DOES NOT PRECEDE OR EQUAL

U+2AAF PRECEDES ABOVE SINGLE-LINE EQUALS SIGN

U+2AB1 PRECEDES ABOVE SINGLE-LINE NOT EQUAL TO

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .the precision of OTF metrics.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Easy?

Like you might expect,it’s rather hard because of. . .the precision of OTF metrics.

In TFM we have 32-bit numbers with12-bits on the left side of the decimal point;

precision is about 10−5 pt.In OTF fonts, width is an integer numberscaled by font matrix; with the resulting

precision only 10−2 pt.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Possible?

So achieving exact compatibilitylooks imposible

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Possible?

So achieving exact compatibilitylooks imposible

so we just abandoned it.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Possible?

So achieving exact compatibilitylooks imposible

so we just abandoned it.

We decided to alter (to improve?)some Knuth’s “decisions”.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Changes

z0 0z0 1

z0 2z0 3

z0 4z0 5

z0 6z0 7

z0 8z0 9

z0 10z0 11z1 0

z1 1

z1 2

We added sidebearingsin the \forall char.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Changes

z0 0

z0 1

z0 2

z0 3

z0 4z0 5

z0 6

z0 7z0 8

z0 9

z0 10

z0 11

z0 12z0 13

z0 14

z0 15z0 16

z0 0z0 1

z0 2

z0 3z0 4z0 5

z0 6

z0 7z0 8z0 9

z0 10

z0 11z0 12z0 13

z0 14

z0 15z0 16z0 17

z0 18

z0 19z0 20

But (for now) we haven’t changedthe sidebearings of \times and \star.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Other changes

We also decided to correctsome other “features”

(which don’t change the metric of the font)

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Other changes

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7

z0 8 z0 9z0 10 z0 0

z0 1z0 2

z0 3z0 4

z0 5

z0 6 z0 7z0 8

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7

z0 8 z0 9z0 10 z0 0

z0 1z0 2

z0 3z0 4

z0 5

z0 6 z0 7z0 8

z0 0

z0 1z0 2

z0 3z0 4

z0 5 z0 6

z0 7

We rounded the endsof the \*ceil and \*floor characters.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Other changes

z0 0z0 1z0 2

z0 3

z0 4

z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11

z0 12

z0 13

z0 14 z0 15z0 16

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10

z0 11z0 12z0 13

z0 14 z0 15

z0 16z0 17z0 18

z0 19 z0 20z0 21

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11z0 12z0 13

z0 14 z0 15

z0 16

z0 17

z0 18

z0 19 z0 20z0 21

In CM fonts some operatorswere positioned oddly.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Other changes

z0 0z0 1z0 2

z0 3z0 4

z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11z0 12

z0 13

z0 14 z0 15z0 16

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7

z0 8z0 9

z0 10

z0 11z0 12z0 13

z0 14 z0 15

z0 16z0 17z0 18

z0 19 z0 20z0 21

z0 0z0 1z0 2

z0 3 z0 4z0 5

z0 6z0 7z0 8

z0 9 z0 10

z0 11z0 12z0 13

z0 14 z0 15

z0 16z0 17

z0 18

z0 19 z0 20z0 21

We moderated them a little.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Yet some more changes

z0 0z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0

z0 1

z0 2

z0 3

z0 4z0 5

z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13

z0 14

z0 15z0 16

z0 17

z0 18

z0 19

z0 20 z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12z0 13z0 14

z0 15

z0 16

z0 17z0 18

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Yet some more changes

z0 0z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10z0 11z0 12

z0 0

z0 1

z0 2

z0 3

z0 4z0 5

z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13

z0 14

z0 15z0 16

z0 17

z0 18

z0 19

z0 20 z0 0z0 1

z0 2

z0 3

z0 4z0 5

z0 6z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6z0 7

z0 8

z0 9

z0 10

z0 11

z0 12

z0 13z0 14

z0 15z0 16

z0 17

z0 18

z0 19z0 20 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12z0 13

z0 14

z0 15

z0 16

z0 17z0 18 z0 0

z0 1

z0 2

z0 3

z0 4z0 5z0 6

z0 7

z0 8

z0 9

z0 10

z0 11

z0 12z0 13z0 14

z0 15

z0 16

z0 17z0 18

We added more sizesfor braces and parentheses.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Yet some more changes

We also decided to remove some sstychains,

only the variants alfabets have this feature.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Results

Despite all, we made an effort tokeep the widths of Knuthian glyphs.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Results

Despite all, we made an effort tokeep the widths of Knuthian glyphs.

Most of math should typesetbeing very similar to the originals.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Dilemmas

There are still many questions. . .

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Dilemmas

There are still many questions. . .

• sidebearings of \times• sizes of parenthesis

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Dilemmas

There are still many questions. . .

• sidebearings of \times• sizes of parenthesis• scope of the repertoire

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Dilemmas

There are still many questions. . .

• sidebearings of \times• sizes of parenthesis• scope of the repertoire• etc., etc.

Backward compatibility of LM Math EuroTEX 2012 & 6th ConTEXt Meeting P. Strzelczyk

Reportoire

The set of characters is hard to define:

• old Knuth’s CM set• enhanced AMS/LATEX set• our TG Math set• combination of both above• extended by some Unicode complement.

The end?

Breskens, The Netherlands, 11 October 2012

The end. . .is still far away

but the way is marked out.

Breskens, The Netherlands, 11 October 2012