Closed ronaldtse closed 11 months ago
@ronaldtse there is a related unassigned ticket here https://github.com/metanorma/mn-native-pdf/issues/528.
Currently plurimath-constants-fonts.zip contains STIX Two Math
vs. Noto Math
comparison. Should we expand this for Cambria Math
and Libertinus Math
?
Yes we should definitely add the two fonts! Thanks!
@ronaldtse I've added the list of glyphs for each font in a YAML file (https://github.com/plurimath/plurimath.github.io/pull/11).
But looks like the site generation (bundle exec jekyll build --trace
) doesn't support Liquid markup:
I'll investigate how to enable the Liquid markup in the blog post.
Done:
Further tasks:
@Intelligent2013 can we also add:
@ronaldtse the post updated. I've added a comparison for Cambria Math v5.24
, not 5.28
(the package pclinuxos_webcore_fonts
contains 5.24
).
Thanks @Intelligent2013 !
This is fully done, thanks @Intelligent2013 !
@Intelligent2013 can you also help post instructions on how to generate the PDF file comparison and the output of the YAML file? Thanks.
Source XML file with : Pluramath Latex constants: plurimath_latex_constants.zip
XSL for PDF generation: fonts_comparison.zip
fonts_comparison.xsl
generates glyphs for the font Cambria Math
v6.99 and 5.24, but Java doesn't allow to register two fonts with the same name. Therefore, in FontForge tool, I've extracted Cambria Math
font from cambria.ttc
v5.24 and changed the name to Cambria Math 524
. The font manifest entries fonts looks so:
STIX Two Math:
Regular:
full_name: STIX Two Math Regular
paths:
- C:/Users/TestUser/.fontist/fonts/STIXTwoMath-Regular.otf
Cambria Math:
Regular:
full_name: Cambria Math
paths:
- C:/Windows/Fonts/cambria.ttc
Cambria Math 524:
Regular:
full_name: Cambria Math 524
paths:
- D:/Work/Metanorma/Fonts/Cambria_5.24_updated/CambriaMath524.ttf
Noto Sans Math:
Regular:
full_name: Noto Sans Math Regular
paths:
- C:/Users/TestUser/.fontist/fonts/NotoSansMath-Regular.ttf
Libertinus Math:
Regular:
full_name: Libertinus Math Regular
paths:
- C:/Users/TestUser/.fontist/fonts/LibertinusMath-Regular.otf
Cambria Math 524
font: CambriaMath524.zip
Generate PDF by mn2pdf
tool:
java -Xss5m -Xmx2048m -Djava.awt.headless=true -jar mn2pdf.jar -x plurimath_latex_constants.xml -s fonts_comparison.xsl -o plurimath_latex_constants.pdf -m manifest.yml
plurimath_latex_constants.pdf.err
Copy-paste the lines like these:
Glyph "⥂" (0x2942) not available in font "LibertinusMath-Regular".
Glyph "⥃" (0x2943) not available in font "LibertinusMath-Regular".
to the file missing.xml
.
Then in the text editor that supports regular expressions:
.* \(0x
to <char><unicode>&#x
\) not available in font "
to ;</unicode><font>
".\r\n
to </font></char>\r\n
,.*;
to ;
.<missing>
at the start, and </missing>
at the end of fileNow you get:
<missing>
<char><unicode>&#x2942;</unicode><font>LibertinusMath-Regular</font></char>
<char><unicode>&#x2943;</unicode><font>LibertinusMath-Regular</font></char>
...
</missing>
XSLT for YAML generation from plurimath_latex_constants.xml
and missing.xml
: fonts_yaml.zip
Run YAML generation:
java -jar xalan.jar -IN plurimath_latex_constants.xml -XSL fonts_yaml.xsl -OUT 2023-08-15-font_coverage.yml
@intelligent2013 can you help here with a blog post? Thanks!
plurimath-constants-fonts.zip