custom font don't stretch up
Opened this issue · 3 comments
Describe the bug
Recently I have decided to use custom font instead of default font. I have a little problem because some glyphs don't stretch up and it looks wierd when I display it. I don't know if there is a problem with my font or there is a bug in the library.
To Reproduce
- Download font from link https://drive.google.com/file/d/1eYEoNWXoonjhSVx_AN_H0pghTOnjT8WC/view?usp=sharing
- AddOverride above font
- You will see that some glyphs don't stretch up ( Newton symbol, square roots)
Expected behavior
All glyphs should stretch up.
Additional context
Does your font set OTF math tables? Without correct information you will not get stretched glyphs.
Ah a TTF font. You should edit your font to use OTF math tables instead.
Hey. I converted my font to OTF and I have a little problem. When I add my font, sometimes text is not visible. I thought that there is something wrong with my font, but I added default CSharpMath font and this bug also occurs. See screen below.
Here is the code:
Assembly assembly = Assembly.GetExecutingAssembly();
using (Stream stream = assembly.GetManifestResourceStream("latinmodern-math.otf"))
{
CSharpMath.Settings.GlobalTypefaces.AddOverride(new Typography.OpenFont.OpenFontReader().Read(stream));
}
textView.LaTeX = "Sample text $$x+3$$";
As you see, when I AddOverride default CSharpMath font, a part of text is invisible. Is there something wrong with above script?