This is a continuation of the reddit thread; it'd be great to get support for OpenType working, or at least a primitive version. I tried to get Latin Modern Math working today and this is how much I've accomplished so far. It would be great to get your mentorship and progress further.
Run python3 rexify.py latinmodern-math.otf out/lmmodern in the rex-fonts directory to generate the files (e.g., glyphs.rs).
Issue. Due to changes changes in Rust 2018 and my recent PR, you need to change the glyphs.mako.rs file. I will submit a PR soon.
Integration
Create a new crate in ReX/fonts, and copy over the files generated in the previous step. However, the styles.rs, kernings.rs and macros.rs (and lib.rs) are missing, so I just copied them over from the ReX/fonts/stix2 directory. Note that kernings.rs is supposed to be generated during the previous script, but the rexify.py reports that no kerning tables are found.
In the root Cargo.toml file, point stix2 are the new crate (never mind the fact that it's still called "stix2").
cargo build --release
[Bug.] In the generated styles.rs, we need to add the following lines. It's interesting that the python script doesn't generate these lines automatically, but they are somehow found in the stix2 package.
Copy over the font from the first step, and change main.rs so the generated SVG reads from the correct file.
Here is the SVG produced for \sum_{n\geq1} \frac{1}{n^2} = \pi^2/6, which looks like this. The problem is that operator symbols are somehow not working. I would need some assistance to figure out how to fix this -- where does the code look for these tables? (My guess is that the automatically generated symbols.rs somehow is not working.)
Hi cbreeden,
This is a continuation of the reddit thread; it'd be great to get support for OpenType working, or at least a primitive version. I tried to get Latin Modern Math working today and this is how much I've accomplished so far. It would be great to get your mentorship and progress further.
Setup
Generating static files
python3 rexify.py latinmodern-math.otf out/lmmodern
in therex-fonts
directory to generate the files (e.g.,glyphs.rs
).Issue. Due to changes changes in Rust 2018 and my recent PR, you need to change the
glyphs.mako.rs
file. I will submit a PR soon.Integration
Create a new crate in
ReX/fonts
, and copy over the files generated in the previous step. However, thestyles.rs
,kernings.rs
andmacros.rs
(andlib.rs
) are missing, so I just copied them over from theReX/fonts/stix2
directory. Note thatkernings.rs
is supposed to be generated during the previous script, but therexify.py
reports that no kerning tables are found.In the root
Cargo.toml
file, point stix2 are the new crate (never mind the fact that it's still called "stix2").cargo build --release
[Bug.] In the generated
styles.rs
, we need to add the following lines. It's interesting that the python script doesn't generate these lines automatically, but they are somehow found in thestix2
package.Copy over the font from the first step, and change
main.rs
so the generated SVG reads from the correct file.Here is the SVG produced for
\sum_{n\geq1} \frac{1}{n^2} = \pi^2/6
, which looks like this. The problem is that operator symbols are somehow not working. I would need some assistance to figure out how to fix this -- where does the code look for these tables? (My guess is that the automatically generatedsymbols.rs
somehow is not working.)