Bug 102026

Summary: Add orth file for math (und-zmth)
Product: fontconfig Reporter: Behdad Esfahbod <freedesktop>
Component: orthAssignee: Akira TAGOH <akira>
Status: RESOLVED FIXED QA Contact: Behdad Esfahbod <freedesktop>
Severity: normal    
Priority: medium CC: akira, dr.khaled.hosny, fontconfig-bugs, freedesktop
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Comment 1 Behdad Esfahbod 2017-08-03 13:33:36 UTC
Copying from https://bugs.freedesktop.org/show_bug.cgi?id=94551 :

 Khaled Hosny 2017-08-03 11:48:13 UTC

(In reply to Akira TAGOH from comment #41)
> (In reply to Behdad Esfahbod from comment #34)
> > (In reply to Akira TAGOH from comment #31)
> > > Okay. updated the orth.
> > 
> > Thanks.  Got orth for math as well?  Don't know what should go there. :)
> 
> Hmm, me neither.. we can get some from
> http://www.unicode.org/Public/math/revision-15/MathClass-15.txt say, I guess
> extra glyphs may be included in even a classification.

Math fonts vary greatly in their coverage and there is no clear cut what a math symbol and what is not. I don’t know if MathClass-XX.txt is used in anything in practice, but I guess we can make an orthography file out of it and test it with the existing math fonts, possibly reducing it until we get them all covering math.
Comment 2 Akira TAGOH 2017-08-22 11:40:13 UTC
Added und_zmth.orth to git.

$ ./build/fc-list/fc-list :lang=und-zmth
/usr/share/fonts/lm-math/latinmodern-math.otf: Latin Modern Math:style=Regular
/usr/share/fonts/stix/STIX-Regular.otf: STIX:style=Regular
/usr/share/fonts/tex-gyre-math/texgyrebonum-math.otf: TeX Gyre Bonum Math:style=Regular
/usr/share/fonts/tex-gyre-math/texgyretermes-math.otf: TeX Gyre Termes Math:style=Regular
/usr/share/fonts/Asana-Math/Asana-Math.otf: Asana Math:style=Regular
/usr/share/fonts/tex-gyre-math/texgyredejavu-math.otf: TeX Gyre DejaVu Math:style=Regular
/usr/share/fonts/tex-gyre-math/texgyreschola-math.otf: TeX Gyre Schola Math:style=Regular
/usr/share/fonts/gdouros-symbola/Symbola.ttf: Symbola:style=Regular
/usr/share/fonts/tex-gyre-math/texgyrepagella-math.otf: TeX Gyre Pagella Math:style=Regular
/usr/share/fonts/xits/xits-math.otf: XITS Math:style=Regular
/usr/share/fonts/stix/STIXMath-Regular.otf: STIX Math:style=Regular

I couldn't test with Cambria Math, Minion Math and Lucida Math. if anyone can do that, that would be appreciated.
Comment 3 Khaled Hosny 2017-08-22 21:05:13 UTC
Cambria Math, Minion Math, Lucida Math and Libertinus Math (https://github.com/khaledhosny/libertinus) don’t seem to be recognized as math fonts.
Comment 4 Akira TAGOH 2017-08-23 02:23:01 UTC
(In reply to Khaled Hosny from comment #3)
> Cambria Math, Minion Math, Lucida Math and Libertinus Math
> (https://github.com/khaledhosny/libertinus) don’t seem to be recognized as
> math fonts.

Thank you for testing. adjusted orth for Libertinus Math. can you give me a log for fc-validate -l und-zmth for Cambria Math and Minion Math? so I can improve it much more...
Comment 5 Akira TAGOH 2017-08-23 02:26:01 UTC
meant fc-validate -l und-zmth -v /path/to/font
Comment 6 Khaled Hosny 2017-08-23 03:30:35 UTC
(In reply to Akira TAGOH from comment #5)
> meant fc-validate -l und-zmth -v /path/to/font


cambria.ttc:1 Missing 14 glyph(s) to satisfy the coverage for und-zmth language
  0x03f4
  0x2035
  0x2036
  0x2037
  0x203b
  0x25e6
  0x2662
  0x2663
  0x2664
  0x2665
  0x2667
  0x266d
  0x266e
  0x266f

LucidaBrightMathOT.otf:0 Missing 14 glyph(s) to satisfy the coverage for und-zmth language
  0x0305
  0x033f
  0x03f4
  0x203b
  0x2126
  0x2300
  0x231c
  0x231d
  0x231e
  0x231f
  0x2661
  0x2662
  0x2664
  0x2667

Minion Math seems to be split into multiple font files and I’m not sure if my copy is the latest, so I suggest we ignore it for now.
Comment 7 Akira TAGOH 2017-08-23 03:37:11 UTC
Thank you. updated. hope I'm not missing anything else.
Comment 8 Khaled Hosny 2017-08-23 03:42:36 UTC
All good now!
Comment 9 Akira TAGOH 2017-08-23 04:44:01 UTC
Any other math fonts we should support? maybe getting rid of code points to add und-zmth to all of fonts that has "Math" in their family names isn't a realistic and ends up to have it in lang for non-math fonts. it has to be avoided. that said, if there are anything else having enough coverage to support, good to work before closing this.
Comment 10 Khaled Hosny 2017-08-23 08:12:30 UTC
I think the current orth files covers pretty much all publicly available OpenType math fonts. I’d have been inclined to say any font that has otlayout:math should be considered as math font, but I have seen broken fonts that has otlayout:math but no usable math support.
Comment 11 Akira TAGOH 2017-08-23 08:46:25 UTC
Okay. let's close this with it so far. we could revisit or do something on new one to polish the orth file as needed. thank you.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.